MCPcopy Create free account

hub / github.com/alibaba/open-code-review / functions

Functions7,484 in github.com/alibaba/open-code-review

FunctionTestRunner_Output
(t *testing.T)
internal/gitcmd/runner_test.go:158
FunctionTestRunner_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
FunctionTestRunner_RecordUsage
(t *testing.T)
internal/reviewtask/loop_test.go:458
FunctionTestRunner_RecordWarning
(t *testing.T)
internal/reviewtask/loop_test.go:439
FunctionTestRunner_Run
(t *testing.T)
internal/gitcmd/runner_test.go:135
FunctionTestRunner_RunCancelledWithOrphanHoldingStdout
A cancelled Run must also return early when a descendant holds the pipe.
internal/gitcmd/runner_pipe_test.go:76
FunctionTestRunner_RunSplit
(t *testing.T)
internal/gitcmd/runner_test.go:172
FunctionTestRunner_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
FunctionTestRunner_RunSplitReportsStderr
RunSplit must still expose stderr on the returned error path.
internal/gitcmd/runner_pipe_test.go:169
FunctionTestRunner_Run_InvalidCommand
(t *testing.T)
internal/gitcmd/runner_test.go:148
FunctionTestRunner_Stream
(t *testing.T)
internal/gitcmd/runner_test.go:186
FunctionTestRunner_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
FunctionTestRunner_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
FunctionTestRunner_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
FunctionTestRunner_Warnings_RoundTrip
(t *testing.T)
internal/scan/agent_test.go:378
FunctionTestRuntimeConfigSHA256
(t *testing.T)
internal/agent/manifest_hash_test.go:153
FunctionTestSameRepoPath_OneDirectorySpelledTwoWays
(t *testing.T)
internal/session/delete_test.go:213
FunctionTestSanitizeEndpointHost
(t *testing.T)
cmd/opencodereview/misc_helpers_test.go:33
FunctionTestSanitizeMarkdownCollapsesNewlines
(t *testing.T)
cmd/opencodereview/background_file_test.go:143
FunctionTestSanitizeMarkdownNormalizesCRLF
(t *testing.T)
cmd/opencodereview/background_file_test.go:151
FunctionTestSanitizeMarkdownPreservesNewlinesAndTabs
(t *testing.T)
cmd/opencodereview/background_file_test.go:135
FunctionTestSanitizeMarkdownTrims
(t *testing.T)
cmd/opencodereview/background_file_test.go:159
FunctionTestSanitizeReasonControlByteInTokenDoesNotLeakTail
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
FunctionTestSanitizeReasonQuotedValue
A quoted secret value with spaces must be fully redacted (no partial leak).
internal/session/manifest_test.go:790
FunctionTestSanitizeReasonStripsControlChars
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
FunctionTestSanitizeReasonStripsSecrets
sanitizeReason must strip high-confidence secret shapes and never let the secret substring survive into the stored reason.
internal/session/manifest_test.go:668
FunctionTestSanitizeReasonTruncatesAndSingleLine
Reasons are capped to maxReasonLen runes (rune-safe) and collapsed to one line.
internal/session/manifest_test.go:694
FunctionTestSanitizeTerminal
(t *testing.T)
cmd/opencodereview/output_test.go:82
FunctionTestSarifFingerprints_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
FunctionTestSarifFingerprints_Stable
--- partialFingerprints stability ---
cmd/opencodereview/sarif_test.go:591
FunctionTestSarifInvocation_ExecutionSuccessful
--- invocations: executionSuccessful derived from manifest ---
cmd/opencodereview/sarif_test.go:634
FunctionTestSarifInvocation_NonCompleteAddsManifestNotification
Non-complete manifest states add a manifest notification so consumers can distinguish "clean scan" from "partial/skipped".
cmd/opencodereview/sarif_test.go:707
FunctionTestSarifInvocation_WarningsAsNotifications
--- invocations: warnings become toolExecutionNotifications ---
cmd/opencodereview/sarif_test.go:676
FunctionTestSarifResultFromComment_EmptyPath
--- Helper: sarifResultFromComment edge cases ---
cmd/opencodereview/sarif_test.go:525
FunctionTestSarifResultFromComment_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
FunctionTestSarifResultFromComment_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
FunctionTestSarifResults_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
FunctionTestSarifRules
--- AC-10: Rule definition completeness ---
cmd/opencodereview/sarif_test.go:332
FunctionTestSarifSeverityLevel
--- AC-5 & AC-6: Severity → Level mapping ---
cmd/opencodereview/sarif_test.go:208
FunctionTestSaveConfig
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:43
FunctionTestSaveConfigEnforcesModeOnExistingFile
(t *testing.T)
cmd/opencodereview/provider_cmd_test.go:85
FunctionTestSavedSecretFingerprint_TrimsLeadingWhitespace
(t *testing.T)
cmd/opencodereview/provider_tui_test.go:2030
FunctionTestScanAgent_Fingerprints
TestScanAgent_Fingerprints covers initScanFingerprints (map build) and scanItemFingerprint's cached-hit branch versus the fallback compute.
internal/scan/getters_more_test.go:49
FunctionTestScanAgent_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
FunctionTestScanAgent_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
FunctionTestScanAgent_WaitBackground_NoLeakOnRun
(t *testing.T)
internal/scan/agent_test.go:477
FunctionTestScanBudgetJSON
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
FunctionTestScanClarificationChainCompletesWithMergedLists
(t *testing.T)
acp/internal/intent/natural_test.go:279
FunctionTestScanGettersOnEmptyAgent
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
FunctionTestScanItem_AsDiff
(t *testing.T)
internal/model/model_test.go:107
FunctionTestScanItem_AsDiff_Binary
(t *testing.T)
internal/model/model_test.go:144
FunctionTestScanItem_AsDiff_Nil
(t *testing.T)
internal/model/model_test.go:136
FunctionTestScanLines
(t *testing.T)
internal/tool/filereader_test.go:78
FunctionTestScanMaxToolsFlagUsageUsesSubtask
(t *testing.T)
cmd/opencodereview/flags_test.go:427
FunctionTestScanNoFilesEventParentsToIncomingContext
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
FunctionTestScanPathScopeResumeRoundTrip
(t *testing.T)
internal/session/persist_test.go:509
FunctionTestScanRejectsWhitespacePaddedPaths
(t *testing.T)
acp/internal/contract/intent_test.go:392
FunctionTestScanRequestsCarryNoIdentity
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
FunctionTestScanSubtaskSpansDoNotParentToEnumerate
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
FunctionTestScanSubtaskSpansParentToRunRoot
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
FunctionTestScopedSearchBatchesAndPatterns
(test *testing.T)
internal/behaviortask/scope_test.go:127
FunctionTestSealSelectedClosesDenominator
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
FunctionTestSealedInputPinsRunToAdmittedCommits
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
FunctionTestSearchDeniedPathsNeverReturned
(test *testing.T)
internal/behaviortask/scope_test.go:17
FunctionTestSearchPathsBoundaryIndexConflicts
(test *testing.T)
internal/behaviortask/search_test.go:198
FunctionTestSearchPathsBoundaryWindowsAndLiteralPatterns
(test *testing.T)
internal/behaviortask/search_test.go:234
FunctionTestSearchProviderBoundaryFiltering
(test *testing.T)
internal/behaviortask/search_test.go:26
FunctionTestSearchProviderBoundaryOutcomes
(test *testing.T)
internal/behaviortask/search_test.go:96
FunctionTestSecondSignalExitsImmediately
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
FunctionTestSecondSignalExitsWithBlockedStderr
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
FunctionTestSecondTurnPairsEveryToolCall
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
FunctionTestSecurityHeadersOmitsHSTS
The viewer serves plain HTTP on loopback; HSTS would wrongly pin localhost.
internal/viewer/securityheaders_test.go:38
FunctionTestSecurityHeadersSetsAllHeaders
(t *testing.T)
internal/viewer/securityheaders_test.go:13
FunctionTestSelectBackground
(t *testing.T)
cmd/opencodereview/background_file_test.go:198
FunctionTestSelectFilesDeletionGate
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
FunctionTestSelectFilesDropsFilteredPaths
(t *testing.T)
internal/agent/coverage_test.go:163
FunctionTestSelectFilesTooLarge
(t *testing.T)
internal/agent/agent_test.go:612
FunctionTestSelectFilesTooLarge_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
FunctionTestSelectFilesTooLarge_ZeroMaxTokens
(t *testing.T)
internal/agent/agent_test.go:665
FunctionTestSelectFiles_Starlark
(t *testing.T)
internal/agent/preview_test.go:593
FunctionTestSelectScanItems_Large
(t *testing.T)
internal/scan/agent_test.go:296
FunctionTestSelectScanItems_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
FunctionTestSelectScanItems_NoLimit
(t *testing.T)
internal/scan/agent_test.go:352
FunctionTestSelectScanItems_Reviewability
(t *testing.T)
internal/scan/coverage_test.go:112
FunctionTestSelectedCustomProvider_NotCustomTab
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:546
FunctionTestSelectedCustomProvider_OutOfBounds
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:554
FunctionTestSelectedModelFromState_CustomModelInput
--- selectedModelFromState tests ---
cmd/opencodereview/provider_tui_funcs_test.go:1674
FunctionTestSelectedModelFromState_OutOfBounds
(t *testing.T)
cmd/opencodereview/provider_tui_funcs_test.go:1684
FunctionTestSelectedWinsOverExcluded
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
FunctionTestSensitiveHeader
(t *testing.T)
internal/llm/raw_test.go:338
FunctionTestSessionAcceptsPromptAfterCancellation
(t *testing.T)
acp/internal/adapter/lifecycle_test.go:120
FunctionTestSessionCompareCmd_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
FunctionTestSessionCompareCompletesBothPositionals
TestSessionCompareCompletesBothPositionals pins that typing the first session id does not stop completion of the second.
cmd/opencodereview/session_cmd_test.go:998
FunctionTestSessionDisplayDoesNotInferLegacyComplete
(t *testing.T)
cmd/opencodereview/session_cmd_test.go:560
FunctionTestSessionDisplayUsesManifestStatusAndCoverage
(t *testing.T)
cmd/opencodereview/session_cmd_test.go:525
FunctionTestSessionDisplayUsesUnknownForInvalidManifestStatus
(t *testing.T)
cmd/opencodereview/session_cmd_test.go:549
FunctionTestSessionEndEmbedsRetryReport
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
FunctionTestSessionEndIncludesFailures
(t *testing.T)
internal/session/persist_test.go:385
FunctionTestSessionEndOmitsAbsentRetryReport
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
FunctionTestSessionFilePath_EmptyID
--- SessionFilePath ---
internal/session/resume_test.go:18
← previousnext →6,001–6,100 of 7,484, ranked by callers