Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/alibaba/open-code-review
/ functions
Functions
7,484 in github.com/alibaba/open-code-review
⨍
Functions
7,484
◇
Types & classes
809
Function
TestRunner_Output
(t *testing.T)
internal/gitcmd/runner_test.go:158
Function
TestRunner_OutputFailedCommandBoundsStderr
A failing command with a huge stderr stream must surface bounded stderr on the ExitError, matching the old exec.Cmd.Output retention policy.
internal/gitcmd/runner_pipe_test.go:224
Function
TestRunner_RecordUsage
(t *testing.T)
internal/reviewtask/loop_test.go:458
Function
TestRunner_RecordWarning
(t *testing.T)
internal/reviewtask/loop_test.go:439
Function
TestRunner_Run
(t *testing.T)
internal/gitcmd/runner_test.go:135
Function
TestRunner_RunCancelledWithOrphanHoldingStdout
A cancelled Run must also return early when a descendant holds the pipe.
internal/gitcmd/runner_pipe_test.go:76
Function
TestRunner_RunSplit
(t *testing.T)
internal/gitcmd/runner_test.go:172
Function
TestRunner_RunSplitKeepsFullStderr
RunSplit keeps the full stderr stream: callers there want the whole diagnostic, not just the head and tail.
internal/gitcmd/runner_pipe_test.go:247
Function
TestRunner_RunSplitReportsStderr
RunSplit must still expose stderr on the returned error path.
internal/gitcmd/runner_pipe_test.go:169
Function
TestRunner_Run_InvalidCommand
(t *testing.T)
internal/gitcmd/runner_test.go:148
Function
TestRunner_Stream
(t *testing.T)
internal/gitcmd/runner_test.go:186
Function
TestRunner_StreamCancelledWithOrphanHoldingStdout
A cancelled Stream whose descendant retains only stdout must return shortly after its deadline instead of waiting for that descendant (#1909, probe A)
internal/gitcmd/runner_pipe_test.go:46
Function
TestRunner_StreamFailureIncludesStderr
The Stream contract (consume drains stdout) must keep working, including the stderr text attached to a failing command. `git show` is used instead of
internal/gitcmd/runner_pipe_test.go:153
Function
TestRunner_SuccessWithLateDescendantOutput
A successful command whose descendant flushes late must still succeed with complete output. This is the success-path regression that exec.Cmd.WaitDela
internal/gitcmd/runner_pipe_test.go:128
Function
TestRunner_Warnings_RoundTrip
(t *testing.T)
internal/scan/agent_test.go:378
Function
TestRuntimeConfigSHA256
(t *testing.T)
internal/agent/manifest_hash_test.go:153
Function
TestSameRepoPath_OneDirectorySpelledTwoWays
(t *testing.T)
internal/session/delete_test.go:213
Function
TestSanitizeEndpointHost
(t *testing.T)
cmd/opencodereview/misc_helpers_test.go:33
Function
TestSanitizeMarkdownCollapsesNewlines
(t *testing.T)
cmd/opencodereview/background_file_test.go:143
Function
TestSanitizeMarkdownNormalizesCRLF
(t *testing.T)
cmd/opencodereview/background_file_test.go:151
Function
TestSanitizeMarkdownPreservesNewlinesAndTabs
(t *testing.T)
cmd/opencodereview/background_file_test.go:135
Function
TestSanitizeMarkdownTrims
(t *testing.T)
cmd/opencodereview/background_file_test.go:159
Function
TestSanitizeReasonControlByteInTokenDoesNotLeakTail
A control byte embedded inside a secret must not let the tail of the token survive: UTF-8 coercion + control-char stripping run before the redaction r
internal/session/manifest_test.go:779
Function
TestSanitizeReasonQuotedValue
A quoted secret value with spaces must be fully redacted (no partial leak).
internal/session/manifest_test.go:790
Function
TestSanitizeReasonStripsControlChars
sanitizeReason strips control chars, ANSI escapes and Unicode line separators, and coerces invalid UTF-8 — so nothing survives to inject into a termin
internal/session/manifest_test.go:756
Function
TestSanitizeReasonStripsSecrets
sanitizeReason must strip high-confidence secret shapes and never let the secret substring survive into the stored reason.
internal/session/manifest_test.go:668
Function
TestSanitizeReasonTruncatesAndSingleLine
Reasons are capped to maxReasonLen runes (rune-safe) and collapsed to one line.
internal/session/manifest_test.go:694
Function
TestSanitizeTerminal
(t *testing.T)
cmd/opencodereview/output_test.go:82
Function
TestSarifFingerprints_EmptyExistingCodeFallback
When ExistingCode is empty, fingerprint must fall back to StartLine to avoid collisions between same-file, same-category findings.
cmd/opencodereview/sarif_test.go:611
Function
TestSarifFingerprints_Stable
--- partialFingerprints stability ---
cmd/opencodereview/sarif_test.go:591
Function
TestSarifInvocation_ExecutionSuccessful
--- invocations: executionSuccessful derived from manifest ---
cmd/opencodereview/sarif_test.go:634
Function
TestSarifInvocation_NonCompleteAddsManifestNotification
Non-complete manifest states add a manifest notification so consumers can distinguish "clean scan" from "partial/skipped".
cmd/opencodereview/sarif_test.go:707
Function
TestSarifInvocation_WarningsAsNotifications
--- invocations: warnings become toolExecutionNotifications ---
cmd/opencodereview/sarif_test.go:676
Function
TestSarifResultFromComment_EmptyPath
--- Helper: sarifResultFromComment edge cases ---
cmd/opencodereview/sarif_test.go:525
Function
TestSarifResultFromComment_FixesWithEmptyPath
Fixes must be omitted when Path is empty even if SuggestionCode and ExistingCode are non-empty, because fixes reference Path as the artifactLocation U
cmd/opencodereview/sarif_test.go:569
Function
TestSarifResultFromComment_InvertedLineNumbers
Inverted line range (StartLine > EndLine) must omit region AND fixes (deletedRegion is required, so fixes cannot be emitted without a valid region).
cmd/opencodereview/sarif_test.go:538
Function
TestSarifResults_DuplicateFingerprints
Duplicate fingerprints (same file + category + ExistingCode) get an occurrence index appended so GitHub tracks them as separate alerts.
cmd/opencodereview/sarif_test.go:729
Function
TestSarifRules
--- AC-10: Rule definition completeness ---
cmd/opencodereview/sarif_test.go:332
Function
TestSarifSeverityLevel
--- AC-5 & AC-6: Severity → Level mapping ---
cmd/opencodereview/sarif_test.go:208
Function
TestSaveConfig
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:43
Function
TestSaveConfigEnforcesModeOnExistingFile
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:85
Function
TestSavedSecretFingerprint_TrimsLeadingWhitespace
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2030
Function
TestScanAgent_Fingerprints
TestScanAgent_Fingerprints covers initScanFingerprints (map build) and scanItemFingerprint's cached-hit branch versus the fallback compute.
internal/scan/getters_more_test.go:49
Function
TestScanAgent_ResumeInfo
TestScanAgent_ResumeInfo covers both the nil and non-nil branches, and that the returned pointer is a defensive copy.
internal/scan/getters_more_test.go:32
Function
TestScanAgent_SessionID_Persistent
TestScanAgent_SessionID_Persistent covers the non-empty return of SessionID: a session with a JSONL writer reports its persisted ID.
internal/scan/getters_more_test.go:15
Function
TestScanAgent_WaitBackground_NoLeakOnRun
(t *testing.T)
internal/scan/agent_test.go:477
Function
TestScanBudgetJSON
TestScanBudgetJSON is the end-to-end contract for #771: a real *scan.Agent, real enumeration, real budget gate, through the shared emitRunResult pipel
cmd/opencodereview/scan_budget_json_test.go:51
Function
TestScanClarificationChainCompletesWithMergedLists
(t *testing.T)
acp/internal/intent/natural_test.go:279
Function
TestScanGettersOnEmptyAgent
TestScanGettersOnEmptyAgent exercises the small ResultProvider getters that scan implements as zero values or nil-safe guards, so review and scan can
internal/scan/getters_test.go:14
Function
TestScanItem_AsDiff
(t *testing.T)
internal/model/model_test.go:107
Function
TestScanItem_AsDiff_Binary
(t *testing.T)
internal/model/model_test.go:144
Function
TestScanItem_AsDiff_Nil
(t *testing.T)
internal/model/model_test.go:136
Function
TestScanLines
(t *testing.T)
internal/tool/filereader_test.go:78
Function
TestScanMaxToolsFlagUsageUsesSubtask
(t *testing.T)
cmd/opencodereview/flags_test.go:427
Function
TestScanNoFilesEventParentsToIncomingContext
TestScanNoFilesEventParentsToIncomingContext covers the empty-scan path (#1713 review): with nothing reviewable, the event.scan.no.files event must st
internal/scan/trace_parent_test.go:230
Function
TestScanPathScopeResumeRoundTrip
(t *testing.T)
internal/session/persist_test.go:509
Function
TestScanRejectsWhitespacePaddedPaths
(t *testing.T)
acp/internal/contract/intent_test.go:392
Function
TestScanRequestsCarryNoIdentity
TestScanRequestsCarryNoIdentity is the gate that keeps scan out of the retry report. It covers scan's three own request types; the three it reaches th
internal/scan/retry_identity_test.go:79
Function
TestScanSubtaskSpansDoNotParentToEnumerate
TestScanSubtaskSpansDoNotParentToEnumerate guards the trace hierarchy fix for #1710 on the scan side: after scan.enumerate ends, scan.subtask.* spans
internal/scan/trace_parent_test.go:102
Function
TestScanSubtaskSpansParentToRunRoot
TestScanSubtaskSpansParentToRunRoot extends the #1710 guard with the affirmative half: under a scan.run root (the span the scan command creates), scan
internal/scan/trace_parent_test.go:164
Function
TestScopedSearchBatchesAndPatterns
(test *testing.T)
internal/behaviortask/scope_test.go:127
Function
TestSealSelectedClosesDenominator
SealSelected closes the denominator: RegisterSelected fails afterwards, while Mark* against the sealed set still works. sealed is distinct from frozen
internal/session/manifest_test.go:440
Function
TestSealedInputPinsRunToAdmittedCommits
TestSealedInputPinsRunToAdmittedCommits is the guarantee that lets the resume decision live entirely before the run exists. The command resolves the
internal/agent/sealed_input_test.go:61
Function
TestSearchDeniedPathsNeverReturned
(test *testing.T)
internal/behaviortask/scope_test.go:17
Function
TestSearchPathsBoundaryIndexConflicts
(test *testing.T)
internal/behaviortask/search_test.go:198
Function
TestSearchPathsBoundaryWindowsAndLiteralPatterns
(test *testing.T)
internal/behaviortask/search_test.go:234
Function
TestSearchProviderBoundaryFiltering
(test *testing.T)
internal/behaviortask/search_test.go:26
Function
TestSearchProviderBoundaryOutcomes
(test *testing.T)
internal/behaviortask/search_test.go:96
Function
TestSecondSignalExitsImmediately
TestSecondSignalExitsImmediately covers the issue #1141 acceptance criterion: after the first SIGINT started the graceful shutdown, a second SIGINT mu
cmd/opencodereview/interrupt_test.go:237
Function
TestSecondSignalExitsWithBlockedStderr
TestSecondSignalExitsWithBlockedStderr is a regression test for the case where the child's stderr is a full pipe whose reader stopped consuming: the f
cmd/opencodereview/interrupt_test.go:291
Function
TestSecondTurnPairsEveryToolCall
TestSecondTurnPairsEveryToolCall is the regression test for the review on #1394: the second request replays the whole assistant turn, so every tool ca
cmd/opencodereview/llm_cmd_test.go:185
Function
TestSecurityHeadersOmitsHSTS
The viewer serves plain HTTP on loopback; HSTS would wrongly pin localhost.
internal/viewer/securityheaders_test.go:38
Function
TestSecurityHeadersSetsAllHeaders
(t *testing.T)
internal/viewer/securityheaders_test.go:13
Function
TestSelectBackground
(t *testing.T)
cmd/opencodereview/background_file_test.go:198
Function
TestSelectFilesDeletionGate
TestSelectFilesDeletionGate covers the one gate selectFiles adds over the static ones: a deletion is never selected, however reviewable its path looks
internal/agent/preview_test.go:575
Function
TestSelectFilesDropsFilteredPaths
(t *testing.T)
internal/agent/coverage_test.go:163
Function
TestSelectFilesTooLarge
(t *testing.T)
internal/agent/agent_test.go:612
Function
TestSelectFilesTooLarge_Boundary
TestSelectFilesTooLarge_Boundary pins the 80% threshold exactly: with MaxTokens=100 the limit is 80, so an 80-token diff is kept and an 81-token one i
internal/agent/agent_test.go:646
Function
TestSelectFilesTooLarge_ZeroMaxTokens
(t *testing.T)
internal/agent/agent_test.go:665
Function
TestSelectFiles_Starlark
(t *testing.T)
internal/agent/preview_test.go:593
Function
TestSelectScanItems_Large
(t *testing.T)
internal/scan/agent_test.go:296
Function
TestSelectScanItems_LargeBoundary
TestSelectScanItems_LargeBoundary pins the 80% threshold exactly: with MaxTokens=100 the limit is 80, so an 80-token item is kept and an 81-token one
internal/scan/agent_test.go:334
Function
TestSelectScanItems_NoLimit
(t *testing.T)
internal/scan/agent_test.go:352
Function
TestSelectScanItems_Reviewability
(t *testing.T)
internal/scan/coverage_test.go:112
Function
TestSelectedCustomProvider_NotCustomTab
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:546
Function
TestSelectedCustomProvider_OutOfBounds
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:554
Function
TestSelectedModelFromState_CustomModelInput
--- selectedModelFromState tests ---
cmd/opencodereview/provider_tui_funcs_test.go:1674
Function
TestSelectedModelFromState_OutOfBounds
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1684
Function
TestSelectedWinsOverExcluded
An item_id is never in both sets, and the selected set wins either way: excluding a selected item is rejected, selecting an excluded one replaces it.
internal/session/manifest_test.go:945
Function
TestSensitiveHeader
(t *testing.T)
internal/llm/raw_test.go:338
Function
TestSessionAcceptsPromptAfterCancellation
(t *testing.T)
acp/internal/adapter/lifecycle_test.go:120
Function
TestSessionCompareCmd_HelpRoutes
TestSessionCompareCmd_HelpRoutes mirrors the parent-command routing checks: `session compare --help` must resolve through the session command tree.
cmd/opencodereview/session_cmd_test.go:982
Function
TestSessionCompareCompletesBothPositionals
TestSessionCompareCompletesBothPositionals pins that typing the first session id does not stop completion of the second.
cmd/opencodereview/session_cmd_test.go:998
Function
TestSessionDisplayDoesNotInferLegacyComplete
(t *testing.T)
cmd/opencodereview/session_cmd_test.go:560
Function
TestSessionDisplayUsesManifestStatusAndCoverage
(t *testing.T)
cmd/opencodereview/session_cmd_test.go:525
Function
TestSessionDisplayUsesUnknownForInvalidManifestStatus
(t *testing.T)
cmd/opencodereview/session_cmd_test.go:549
Function
TestSessionEndEmbedsRetryReport
TestSessionEndEmbedsRetryReport pins that a frozen report reaches session_end under llm_retry_report, so a session can be diagnosed on its own without
internal/session/final_retry_report_test.go:15
Function
TestSessionEndIncludesFailures
(t *testing.T)
internal/session/persist_test.go:385
Function
TestSessionEndOmitsAbsentRetryReport
TestSessionEndOmitsAbsentRetryReport pins the other half: a run with nothing to report must leave the field out entirely rather than write an empty ob
internal/session/final_retry_report_test.go:46
Function
TestSessionFilePath_EmptyID
--- SessionFilePath ---
internal/session/resume_test.go:18
← previous
next →
6,001–6,100 of 7,484, ranked by callers