MCPcopy Create free account

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

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

↓ 10 callersFunctionsilenceStdout
silenceStdout redirects os.Stdout to /dev/null for the duration of fn so the delegate commands' Printf output does not clutter test logs.
cmd/opencodereview/delegate_exec_test.go:67
↓ 10 callersMethodwithLock
(ctx context.Context, fn func() error)
internal/chatgptauth/store.go:166
↓ 10 callersFunctionwriteConfig
writeConfig writes an OCR config file to a temp dir and returns its path.
internal/llm/bedrock_test.go:16
↓ 10 callersFunctionyKey
()
cmd/opencodereview/provider_tui_test.go:1142
↓ 9 callersFunctionAnyToAttr
AnyToAttr converts an arbitrary value to an OTel attribute.KeyValue.
internal/telemetry/span.go:132
↓ 9 callersFunctionCollectToolDefs
CollectToolDefs gathers tool definitions from MCP clients, filtering out tools that conflict with built-in tools or were not successfully registered.
internal/mcp/provider.go:99
↓ 9 callersFunctionNewProvider
NewProvider creates a Provider for range mode: from..to (via merge-base).
internal/diff/git.go:100
↓ 9 callersFunctionPreview
Preview loads diffs and applies the same selection the real run applies before dispatch, returning structured preview data without dispatching any LLM
internal/agent/preview.go:51
↓ 9 callersFunctionResolve
Resolve builds the parsing endpoint from the startup flags and the OCR_ACP_PARSER_* environment variables, with the flags taking precedence.
acp/internal/intent/llm/resolve.go:75
↓ 9 callersMethodRestore
Restore re-enables stdout. Safe to call multiple times.
cmd/opencodereview/shared.go:408
↓ 9 callersMethodRunSplit
RunSplit executes a git command and returns stdout and stderr separately.
internal/gitcmd/runner.go:407
↓ 9 callersMethodSealSelected
SealSelected closes the selected set. After it returns, RegisterSelected and RegisterExcluded fail and the coverage denominator is fixed; per-item Mar
internal/session/manifest.go:590
↓ 9 callersMethodTotalInputTokens
()
cmd/opencodereview/shared.go:769
↓ 9 callersFunctionValidateProtocol
ValidateProtocol accepts the four canonical protocol names and rejects everything else.
internal/llm/protocol.go:65
↓ 9 callersFunctionWithRequestMeta
WithRequestMeta attaches m to ctx so the retry observer can associate every HTTP attempt made under that context with one logical request. It is the o
internal/llm/retry_meta.go:132
↓ 9 callersMethodclear
()
extensions/vscode/src/extension/providers/lineOffset.ts:20
↓ 9 callersFunctionconfigValues
(calls)
scripts/github-actions/action-contract.test.js:331
↓ 9 callersFunctiondownKey
()
cmd/opencodereview/provider_tui_test.go:34
↓ 9 callersFunctionemit
(result runResult)
acp/testdata/mock-ocr/main.go:82
↓ 9 callersMethodexecuteGroupReviewFilter
executeGroupReviewFilter runs the REVIEW_FILTER_TASK for a file group. When from is non-nil, only comments at indices >= from[path] for each path are
internal/agent/agent.go:1843
↓ 9 callersFunctionexpandBraces
expandBraces turns "{a,b,c}" style patterns into individual strings. e.g. "*.go.{java,kotlin}" → ["*.go.java", "*.go.kotlin"]. If no braces exist, ret
internal/config/rules/system_rules.go:182
↓ 9 callersMethodfile
extensions/idea/src/test/kotlin/com/alibaba/opencodereview/idea/FrontendSources.kt:29
↓ 9 callersFunctiongroupingSkipTemplate
groupingSkipTemplate is a template whose GROUPING_TASK is configured, so that a test asserting client.called == false proves the fast path skipped the
internal/agent/grouping_test.go:296
↓ 9 callersFunctionisConfigReady
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/ConfigUtils.kt:22
↓ 9 callersFunctionlocalAuthorization
(local string)
internal/chatgptauth/recovery_test.go:73
↓ 9 callersFunctionmakeComments
(n)
scripts/github-actions/post-review-comments.test.js:1715
↓ 9 callersFunctionnewModelTUIConfig
(cfg modelTUIConfig)
cmd/opencodereview/provider_tui.go:2715
↓ 9 callersFunctionnotifySink
(s progressSink)
acp/internal/adapter/presentation/helpers_test.go:70
↓ 9 callersFunctionofficialDashscopeModelTUI
(t *testing.T, configPath string, extraModels []string)
cmd/opencodereview/provider_tui_test.go:1513
↓ 9 callersFunctionopen
()
extensions/frontend/src/webview/components/CommentCard.tsx:18
↓ 9 callersFunctionoutputPreviewText
(p *agent.DiffPreview, out io.Writer)
cmd/opencodereview/output.go:792
↓ 9 callersFunctionparsePorcelain
* Parses `git status --porcelain` output. * Each line is XY<space>path, where X is the staged status, Y the worktree status, and `??` means untracked
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/GitMap.kt:27
↓ 9 callersMethodpost_note
(self, body)
examples/gitlab_ci/post_review_test.py:151
↓ 9 callersFunctionreadWorkspaceFileForDiff
(repoDir, relPath string)
internal/diff/workspace_file.go:19
↓ 9 callersFunctionrequireClarify
(t *testing.T, r Result, wantMissing ...string)
acp/internal/intent/fake_test.go:94
↓ 9 callersFunctionresolveWorkingDir
resolveWorkingDir returns (absPath, isGitRepo, err). When requireGit is true, returns an error if the directory is not a git repo. When false, returns
cmd/opencodereview/shared.go:153
↓ 9 callersFunctionrunGit
(cwd: string, args: string[])
extensions/vscode/src/extension/services/GitService.ts:503
↓ 9 callersFunctionrunSessionShowCompat
runSessionShowCompat provides test compatibility for old-style runSessionShow([]string{...}) calls.
cmd/opencodereview/compat_test.go:82
↓ 9 callersMethodselectedCustomProvider
()
cmd/opencodereview/provider_tui.go:422
↓ 9 callersFunctionsetBrowserWaitWindow
setBrowserWaitWindow overrides the wait window for one test. Tests in this package run sequentially, so mutating the package variable is safe.
internal/viewer/browser_exec_test.go:81
↓ 9 callersFunctiontaskDoneResponseWithArguments
(arguments string)
internal/reviewtask/loop_test.go:41
↓ 9 callersFunctionvalidationStep
()
scripts/github-actions/action-contract.test.js:213
↓ 9 callersFunctionwithTempDir
(fn)
scripts/github-actions/check-plugin-contract.test.js:834
↓ 9 callersFunctionwriteCommit
writeCommit writes content to name, stages it, and commits with msg.
internal/diff/git_resolve_test.go:41
↓ 8 callersFunctionBuildReviewArgs
BuildReviewArgs constructs OCR CLI arguments from ReviewIntent. Returns error if intent is invalid, required fields are missing, or Extra contains a f
acp/internal/contract/intent.go:87
↓ 8 callersFunctionCloseAll
CloseAll closes every client concurrently and returns all failures in configuration order, or stops waiting when ctx expires. CommandTransport bounds
internal/mcp/client.go:221
↓ 8 callersFunctionDefaultStore
()
internal/chatgptauth/store.go:85
↓ 8 callersMethodGetDiffSet
GetDiffSet returns both reviewable diffs and those excluded by the provider's built-in directory rules. It preserves GetDiff's filtering behavior whil
internal/diff/git.go:218
↓ 8 callersFunctionInit
Init initializes global TracerProvider and MeterProvider based on environment variables and optional config file. Returns true when enabled. Safe to c
internal/telemetry/provider.go:32
↓ 8 callersMethodIsUserIncluded
IsUserIncluded reports whether the given path matches any user include pattern. The check is case-insensitive: both path and pattern are lowercased. R
internal/config/rules/system_rules.go:249
↓ 8 callersFunctionLoadSummary
LoadSummary loads a single session's Summary. Errors when the session file is missing or unreadable.
internal/session/list.go:152
↓ 8 callersMethodName
Name returns the tool's identifier name.
internal/tool/definitions.go:67
↓ 8 callersMethodRecordAttempt
RecordAttempt appends one observed HTTP attempt for m. startedAt and endedAt bracket the real HTTP call: the observer takes them immediately before a
internal/llm/retry_report.go:289
↓ 8 callersFunctionRecordLLMResult
RecordLLMResult sets the outcome of an LLM request on the span.
internal/telemetry/span.go:115
↓ 8 callersMethodRecordWarning
RecordWarning adds a non-fatal warning.
internal/llmloop/loop.go:139
↓ 8 callersFunctionResolveBinary
ResolveBinary discovers and validates OCR exactly once. An invalid explicit path is an error and never falls back to the environment or PATH.
acp/internal/orchestrator/resolve.go:48
↓ 8 callersFunctionResolveIdentity
ResolveIdentity computes the identity a review with these args would record, without creating anything: no session, manifest, runner or LLM call. Resu
internal/agent/identity.go:45
↓ 8 callersMethodSetPendingFailureCause
SetPendingFailureCause records the classification Finalize must use when it sweeps items that never received a Mark*. It records no run_failure and tr
internal/session/manifest.go:480
↓ 8 callersMethodSetWriteDeadline
(time.Time)
acp/internal/adapter/transport/connection.go:34
↓ 8 callersMethodTotalOutputTokens
()
cmd/opencodereview/shared.go:770
↓ 8 callersMethodValidateScanOptions
ValidateScanOptions verifies that the previous session was a full-file scan.
internal/session/resume.go:300
↓ 8 callersFunctionagentTaskDoneResponse
()
internal/agent/agent_test.go:68
↓ 8 callersMethodapplyEditCustomProviderSave
()
cmd/opencodereview/provider_tui.go:1364
↓ 8 callersFunctionbuildCheckpointMarker
(payload)
scripts/github-actions/post-review-comments.js:3028
↓ 8 callersFunctionclampLineRange
* Clamp a 1-based inclusive range to the document bounds and return a 0-based inclusive range. * Edits after review or differences between diff sides
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/providers/CommentAnchor.kt:215
↓ 8 callersFunctioncompleteEnum
(values ...string)
cmd/opencodereview/shared_flags.go:75
↓ 8 callersFunctioncompletionError
(t *testing.T, client *OpenAIClient)
internal/llm/provider_error_test.go:43
↓ 8 callersMethodcustomProviderEntry
(name string, fallback ProviderEntry)
cmd/opencodereview/provider_tui.go:600
↓ 8 callersMethoddispose
()
extensions/vscode/src/extension/providers/CommentProvider.ts:326
↓ 8 callersFunctionemitFailureUsage
emitFailureUsage writes a best-effort structured usage record to stderr when a review fails, so the outer caller still sees the cost of the failed att
cmd/opencodereview/output.go:723
↓ 8 callersFunctionentry_of
(ri, path="main.go")
examples/gerrit_ci/post_review_test.py:53
↓ 8 callersFunctionenumeratePaths
enumeratePaths returns the sorted paths NewProvider selects for the given --path selectors, so a case reads as selector in, file list out.
internal/scan/provider_paths_test.go:127
↓ 8 callersMethodload
()
internal/chatgptauth/store.go:101
↓ 8 callersFunctionmergeModelLists
(lists ...[]string)
cmd/opencodereview/config_cmd.go:981
↓ 8 callersFunctionnewBudget
(maximum int64)
internal/behaviortask/budget.go:22
↓ 8 callersFunctionnewQuietHandle
newQuietHandle routes [ocr] progress lines away from stdout so they cannot corrupt a structured output document. What it does depends on why stdout ne
cmd/opencodereview/shared.go:388
↓ 8 callersFunctionoutputAnalysisText
(writer io.Writer, output *analysisOutput)
cmd/opencodereview/analysis_output.go:24
↓ 8 callersFunctionparseGroupingResponse
(content string, diffs []model.Diff)
internal/agent/grouping.go:263
↓ 8 callersFunctionparseNameStatus
* Parses `git diff --name-status` / `git show --name-status` output. * Tab-separated: `status<TAB>path`; a rename is `R<score><TAB>old<TAB>new`, take
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/GitMap.kt:199
↓ 8 callersFunctionprepareReviewCodeTools
(ctx context.Context, repoDir string, opts reviewOptions, runner *gitcmd.Runner, resolution *diff.InputResolut
cmd/opencodereview/code_access.go:22
↓ 8 callersMethodread
(self)
examples/gitlab_ci/post_review_test.py:106
↓ 8 callersFunctionreadCheckpointComment
({ github, owner, repo, prNumber, appSlug = "", resolveSelfLogin = null, log })
scripts/github-actions/post-review-comments.js:3207
↓ 8 callersFunctionreadEnvAssignments
(file)
scripts/github-actions/action-contract.test.js:319
↓ 8 callersFunctionresolveRepoDir
resolveRepoDir resolves the repo dir for `ocr rules check`. It delegates to resolveWorkingDir(requireGit=true) so it anchors at the git top-level just
cmd/opencodereview/review_cmd.go:543
↓ 8 callersFunctionresponse
(name, arguments string)
internal/behaviortask/runner_test.go:30
↓ 8 callersFunctionretryCodesMiddleware
retryCodesMiddleware returns an HTTP middleware that forces the SDK to retry responses whose status code is in the given set, by injecting the x-shoul
internal/llm/client.go:460
↓ 8 callersFunctionreviewModeFromOptions
(opts reviewOptions)
cmd/opencodereview/review_cmd.go:529
↓ 8 callersFunctionrunBrowserCmd
runBrowserCmd starts one opener and reports whether it worked. Checking only Start() is not enough: it returns as soon as fork/exec succeeds, while xd
internal/viewer/browser.go:165
↓ 8 callersFunctionrunMock
runMock executes the test double, returning stdout and the exit code. stderr is discarded: these tests assert on the stdout contract only.
acp/internal/contract/mock_contract_test.go:57
↓ 8 callersMethodrunRaw
* Runs arbitrary CLI arguments: stderr is streamed back line by line, the full stdout is returned at the end, * and a non-zero exit throws CliExc
extensions/idea/src/main/kotlin/com/alibaba/opencodereview/idea/services/CliService.kt:167
↓ 8 callersFunctionrunReview
runReview provides test compatibility for the pre-cobra runReview(args) entry point: parse flags, then execute the review.
cmd/opencodereview/compat_test.go:36
↓ 8 callersFunctionrunReviewCapturingBoth
End-to-end coverage of the #368 P5 wiring: a real review run against the fake Anthropic server, driven through runReview so review_cmd.go's own Freeze
cmd/opencodereview/retry_report_e2e_test.go:29
↓ 8 callersFunctionsanitizeReason
sanitizeReason is the single, best-effort redaction+truncation floor applied to every reason the builder stores, so no caller path can write an unreda
internal/session/manifest.go:721
↓ 8 callersFunctionunmarshalResponsesBody
(t *testing.T, body string)
internal/llm/responses_client_test.go:1083
↓ 8 callersFunctionvalidateSkillFrontmatter
(file, dirName, content)
scripts/github-actions/check-plugin-contract.js:427
↓ 8 callersMethodwaitFor
extensions/idea/src/test/kotlin/com/alibaba/opencodereview/idea/services/CliServiceTreeKillTest.kt:69
↓ 8 callersFunctionwithCapturedStdout
(fn)
scripts/github-actions/check-plugin-contract.test.js:945
↓ 8 callersMethodwrap
(client llm.LLMClient)
internal/behaviortask/budget.go:26
↓ 7 callersMethodBudgetExceeded
BudgetExceeded reports whether the aggregate token budget gate stopped the run before all files were reviewed. It is a diagnostic signal only — it fee
cmd/opencodereview/shared.go:792
↓ 7 callersFunctionBuildReLocationMessages
BuildReLocationMessages renders the re-location prompt for cm against d. Returns nil when the task template is absent or empty, which the caller treat
internal/diff/relocation.go:28
← previousnext →401–500 of 7,390, ranked by callers