MCPcopy Create free account

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

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

FunctionTestRawFileWriter_EncodeFailureWarnsAndRecovers
TestRawFileWriter_EncodeFailureWarnsAndRecovers pins the no-silent-drop contract: an unencodable record (e.g. an invalid RawMessage from a future call
internal/session/raw_writer_test.go:322
FunctionTestRawFileWriter_LandsPerRecordOnDisk
(t *testing.T)
internal/session/raw_writer_test.go:92
FunctionTestRawFileWriter_OpenFailure
(t *testing.T)
internal/session/raw_writer_test.go:207
FunctionTestRawFileWriter_RecoversFromTransientWriteFailure
TestRawFileWriter_RecoversFromTransientWriteFailure pins the recovery contract: one disk failure must drop only the one record in flight and warn once
internal/session/raw_writer_test.go:281
FunctionTestRawFileWriter_StampsSessionIDAndTimestamp
(t *testing.T)
internal/session/raw_writer_test.go:55
FunctionTestRawHolder_ConcurrentSetAndWrite
TestRawHolder_ConcurrentSetAndWrite exercises the holder's locking under concurrent writers and captures.
internal/llm/raw_test.go:894
FunctionTestRawLoggingEnabled
(t *testing.T)
internal/llm/raw_test.go:52
FunctionTestRawMiddleware_BodyReadErrorPropagates
(t *testing.T)
internal/llm/raw_test.go:561
FunctionTestRawMiddleware_CapturesRawBodiesAndMeta
(t *testing.T)
internal/llm/raw_test.go:88
FunctionTestRawMiddleware_CapturesResponseHeaders
(t *testing.T)
internal/llm/raw_test.go:283
FunctionTestRawMiddleware_DurationCoversBodyRead
(t *testing.T)
internal/llm/raw_test.go:171
FunctionTestRawMiddleware_EmptyBodies
TestRawMiddleware_EmptyBodies guards the edges: nil request body and nil response body must not panic and must yield empty captures.
internal/llm/raw_test.go:861
FunctionTestRawMiddleware_JoinsRequestBodyReadErrorWithNextError
When next() fails for an independent reason (e.g. the context is cancelled before the replayed body is read), the record must keep the body-read root
internal/llm/raw_test.go:431
FunctionTestRawMiddleware_MultiValueHeadersAreJoined
Repeated headers are legal on the wire; capture must keep every value in the RFC 9110 comma-list form instead of silently truncating to the first.
internal/llm/raw_test.go:261
FunctionTestRawMiddleware_NoMetaOmitsIdentityAndFallsBackToBodyModel
(t *testing.T)
internal/llm/raw_test.go:603
FunctionTestRawMiddleware_NoWriterIsPassthrough
(t *testing.T)
internal/llm/raw_test.go:672
FunctionTestRawMiddleware_NonJSONRequestGoesToRequestBodyText
The SDK marshals every request body, so this path is unreachable today; if a future middleware mangles the bytes, the record must survive with them ve
internal/llm/raw_test.go:516
FunctionTestRawMiddleware_NonJSONResponseGoesToResponseBodyText
(t *testing.T)
internal/llm/raw_test.go:484
FunctionTestRawMiddleware_RecordsNon200StatusCode
HTTP-level failures are not transport errors — the SDK retries them and the body lands in the record as-is — so status_code must carry the signal.
internal/llm/raw_test.go:457
FunctionTestRawMiddleware_RedactsAuthHeaders
(t *testing.T)
internal/llm/raw_test.go:223
FunctionTestRawMiddleware_RequestBodyReadErrorReplayed
A request-body read failure must be replayed to the SDK exactly as it would surface without capture: a clean truncated body would turn the client-side
internal/llm/raw_test.go:392
FunctionTestRawMiddleware_ResponseHeadersOmittedOnTransportError
A transport error has no response, so response_headers must be omitted from the JSON rather than written as an empty map.
internal/llm/raw_test.go:312
FunctionTestRawMiddleware_TimestampIsAttemptStart
Timestamp must be the attempt start, so that [timestamp, timestamp + duration_ms] reconstructs the attempt interval. The TTFB sleep inside next() is w
internal/llm/raw_test.go:197
FunctionTestRawMiddleware_TraceID
TestRawMiddleware_TraceID covers the run-level join key: a valid OTel span context on the request ctx is captured as trace_id, and without one the fie
internal/llm/raw_test.go:628
FunctionTestRawMiddleware_TransportErrorRecordsErrorOnly
(t *testing.T)
internal/llm/raw_test.go:360
FunctionTestRawSubDirIsSeparateFromSessions
TestRawSubDirIsSeparateFromSessions guards the isolation contract: raw captures must never land in the session checkpoint directory. UseTestSessions (
internal/session/raw_writer_test.go:231
FunctionTestReLocateComment_CodeBlockStillUnresolvable
TestReLocateComment_CodeBlockStillUnresolvable covers the rollback branch: the model returned a well-formed snippet that still does not appear in the
internal/diff/relocation_test.go:224
FunctionTestReLocateComment_LLMError
(t *testing.T)
internal/diff/relocation_test.go:156
FunctionTestReLocateComment_LLMReturnsInvalidContent
(t *testing.T)
internal/diff/relocation_test.go:132
FunctionTestReLocateComment_LLMReturnsValidCode
(t *testing.T)
internal/diff/relocation_test.go:103
FunctionTestReLocateComment_NoMessages
The caller skips the session record and the request entirely when there are no messages, so ReLocateComment must not reach the client on that path.
internal/diff/relocation_test.go:254
FunctionTestReLocation_Identity
TestReLocation_Identity pins the field that is easy to get wrong: FilePath is the comment's path, which is the file session the re-location record was
internal/reviewtask/retry_identity_test.go:275
FunctionTestReLocation_NoRequestWithoutTemplate
TestReLocation_NoRequestWithoutTemplate covers the branch that skips both the session record and the request: with no prompt there is nothing to send,
internal/reviewtask/retry_identity_test.go:338
FunctionTestReadDelegateExamples
(t *testing.T)
internal/delegate/instructions_test.go:147
FunctionTestReadJSONLLinesDiscardsPartialDataOnNonEOFError
(t *testing.T)
internal/viewer/store_load_test.go:36
FunctionTestReadLines_Disk_AbsolutePathStaysUnderRepo
(t *testing.T)
internal/tool/file_read_test.go:211
FunctionTestReadLines_Disk_AllowsParentSegmentWithinRepo
(t *testing.T)
internal/tool/file_read_test.go:194
FunctionTestReadLines_Disk_AllowsSymlinkInsideRepo
(t *testing.T)
internal/tool/file_read_test.go:283
FunctionTestReadLines_Disk_EmptyFile
(t *testing.T)
internal/tool/file_read_test.go:74
FunctionTestReadLines_Disk_FullFile
(t *testing.T)
internal/tool/file_read_test.go:25
FunctionTestReadLines_Disk_MissingFilePreservesReadError
(t *testing.T)
internal/tool/file_read_test.go:232
FunctionTestReadLines_Disk_NoTrailingNewline
(t *testing.T)
internal/tool/file_read_test.go:132
FunctionTestReadLines_Disk_RejectsParentTraversal
(t *testing.T)
internal/tool/file_read_test.go:170
FunctionTestReadLines_Disk_RejectsSymlinkOutsideRepo
(t *testing.T)
internal/tool/file_read_test.go:259
FunctionTestReadLines_Disk_StartBeyondEOF
(t *testing.T)
internal/tool/file_read_test.go:92
FunctionTestReadLines_Disk_TrailingNewline
(t *testing.T)
internal/tool/file_read_test.go:110
FunctionTestReadLines_Disk_Window
(t *testing.T)
internal/tool/file_read_test.go:50
FunctionTestReadLines_GitShow_Window
(t *testing.T)
internal/tool/file_read_test.go:151
FunctionTestReadRuleFileSafe_ConfineRejectsOutside
TestReadRuleFileSafe_ConfineRejectsOutside verifies the confinement check itself.
internal/config/rules/system_rules_test.go:1847
FunctionTestReadRuleFileSafe_Missing
(t *testing.T)
internal/config/rules/system_rules_test.go:1677
FunctionTestReadRuleFileSafe_NormalFile
── readRuleFileSafe tests ──
internal/config/rules/system_rules_test.go:1634
FunctionTestReadRuleFileSafe_TooLarge
(t *testing.T)
internal/config/rules/system_rules_test.go:1663
FunctionTestReadRuleFileSafe_UnsupportedExt
(t *testing.T)
internal/config/rules/system_rules_test.go:1650
FunctionTestReadWorkspaceFileForDiffReadsInternalSymlink
(t *testing.T)
internal/diff/workspace_file_test.go:132
FunctionTestReadWorkspaceFileForDiffReadsRegularFile
(t *testing.T)
internal/diff/workspace_file_test.go:42
FunctionTestReadWorkspaceFileForDiffRejectsAbsolutePath
(t *testing.T)
internal/diff/workspace_file_test.go:29
FunctionTestReadWorkspaceFileForDiffRejectsDirectory
(t *testing.T)
internal/diff/workspace_file_test.go:73
FunctionTestReadWorkspaceFileForDiffRejectsNonexistentFile
(t *testing.T)
internal/diff/workspace_file_test.go:153
FunctionTestReadWorkspaceFileForDiffRejectsParentSymlinkEscape
(t *testing.T)
internal/diff/workspace_file_test.go:88
FunctionTestReadWorkspaceFileForDiffRejectsPathTraversal
(t *testing.T)
internal/diff/workspace_file_test.go:61
FunctionTestReadWorkspaceFileForDiffReturnsSymlinkTarget
(t *testing.T)
internal/diff/workspace_file_test.go:108
FunctionTestReadWorkspaceFileForDiffWithLimit
(t *testing.T)
internal/diff/workspace_file_test.go:14
FunctionTestRealBinaryUnreadStdoutExits
(t *testing.T)
acp/cmd/ocr-acp/stdio_test.go:21
FunctionTestRealEndpointToolCall
TestRealEndpointToolCall is opt-in because it calls a real, configured endpoint. The core regression never depends on it.
acp/internal/intent/llm/real_llm_test.go:17
FunctionTestRealLatestCommitIntent
This optional semantic check sends only synthetic requests through the real parser prompt. It neither sends repository content nor starts an OCR revie
acp/internal/intent/llm/real_llm_test.go:48
FunctionTestRealOCRBinaryScanMultiplePaths
(t *testing.T)
acp/internal/contract/real_cli_test.go:123
FunctionTestRealOCRReviewShapeDecodes
(t *testing.T)
acp/internal/contract/real_cli_test.go:73
FunctionTestRealOCRScanShapeDecodes
(t *testing.T)
acp/internal/contract/real_cli_test.go:107
FunctionTestRecordAttemptAcceptsUnclassifiedSuccessStatus
The guard keys off the same boundary as classifyAttempt, so a 2xx never trips it: an unclassified 200 is the normal success path, and an unclassified
internal/llm/retry_report_test.go:313
FunctionTestRecordAttemptDerivesTimings
Both durations are derived from the observed timestamps, so a caller cannot report a backoff it never measured. The first attempt has no predecessor a
internal/llm/retry_report_test.go:232
FunctionTestRecordAttemptDropsRequestsWithoutIdentity
(t *testing.T)
internal/llm/retry_report_test.go:324
FunctionTestRecordAttemptFloorsInvertedTimestamps
Timestamps from time.Now carry a monotonic reading and cannot invert, so this only guards hand-built times. It still has to hold: a negative duration
internal/llm/retry_report_test.go:264
FunctionTestRecordAttemptNumbersAndDerivesOutcome
(t *testing.T)
internal/llm/retry_report_test.go:204
FunctionTestRecordAttemptRejectsUnclassifiedErrorStatus
An observer that reports a non-2xx status without classifying it contradicts the strongest fact it had. The failure mode this closes is silence, not n
internal/llm/retry_report_test.go:287
FunctionTestRecordFunctions_DisabledTelemetry
(t *testing.T)
internal/telemetry/metrics_test.go:14
FunctionTestRecordFunctions_EnabledTelemetry
(t *testing.T)
internal/telemetry/metrics_test.go:35
FunctionTestRecordLLMResult_Error
(t *testing.T)
internal/telemetry/span_test.go:167
FunctionTestRecordLLMResult_NilSpan
(t *testing.T)
internal/telemetry/span_test.go:174
FunctionTestRecordLLMResult_Success
(t *testing.T)
internal/telemetry/span_test.go:160
FunctionTestRecordMetrics_ConcurrentFirstUse
The review fans out per-file goroutines (--concurrency, default 8) that record LLM and tool metrics, so the first use of the metric handles is concurr
internal/telemetry/metrics_test.go:71
FunctionTestRecordReviewItem_EmptyFilePathUsesNewPath
TestRecordReviewItem_EmptyFilePathUsesNewPath covers the filePath == "" → filePath = newPath branch of each checkpoint recorder. Without persistence t
internal/session/list_more_test.go:75
FunctionTestRecordReviewItem_NilReceiver
TestRecordReviewItem_NilReceiver covers the sh == nil guard on all three checkpoint recorders (no panic, no-op).
internal/session/list_more_test.go:65
FunctionTestRecordToItem
TestRecordToItem covers the non-item type (returns false) and the empty-FilePath fallback to NewPath for a recognized item record.
internal/session/list_error_test.go:46
FunctionTestRecordToolCall
(t *testing.T)
internal/llmloop/runner_test.go:109
FunctionTestRecordToolResult_Error
(t *testing.T)
internal/telemetry/span_test.go:136
FunctionTestRecordToolResult_NilSpan
(t *testing.T)
internal/telemetry/span_test.go:143
FunctionTestRecordToolResult_Success
(t *testing.T)
internal/telemetry/span_test.go:129
FunctionTestRecordUsage
(t *testing.T)
internal/llmloop/runner_test.go:149
FunctionTestRecordWarning
(t *testing.T)
internal/llmloop/runner_test.go:91
FunctionTestRecordingTelemetryIgnoresOTLPEnvironment
(t *testing.T)
internal/scan/trace_parent_test.go:76
FunctionTestRecordingTelemetryIgnoresOTLPEnvironment
(t *testing.T)
internal/agent/trace_parent_test.go:87
FunctionTestRedactURLDropsUserInfoAndQuery
(t *testing.T)
acp/internal/intent/llm/resolve_test.go:151
FunctionTestRefreshCommitAfterCancellation
(t *testing.T)
internal/chatgptauth/recovery_test.go:24
FunctionTestRefreshFailuresAndCancellation
(t *testing.T)
internal/chatgptauth/lifecycle_test.go:142
FunctionTestRefreshModelSelectionAfterAdd
(t *testing.T)
cmd/opencodereview/provider_tui_rollback_test.go:211
FunctionTestRefreshRecoveryAfterVerificationFailure
(t *testing.T)
internal/chatgptauth/refresh_recovery_test.go:17
FunctionTestRefreshRejectsIncompleteRotation
(t *testing.T)
internal/chatgptauth/auth_test.go:312
FunctionTestRefreshRotationAndConcurrency
(t *testing.T)
internal/chatgptauth/auth_test.go:281
FunctionTestRegisterAll_AllowedFilter
(t *testing.T)
internal/mcp/provider_test.go:44
FunctionTestRegisterAll_Basic
(t *testing.T)
internal/mcp/provider_test.go:27
← previousnext →5,101–5,200 of 7,169, ranked by callers