MCPcopy Create free account

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

Functions4,576 in github.com/alibaba/open-code-review

↓ 7 callersMethodFinalize
Finalize performs the hard-validated close of the run and returns the immutable manifest. In order it: sweeps any item still selected into failed (col
internal/session/manifest.go:742
↓ 7 callersFunctionIsPathExcluded
IsPathExcluded returns true when relPath matches any of the supplied gitignore-style patterns or any default excluded directory prefix (see ExcludedDi
internal/diff/gitignore.go:25
↓ 7 callersFunctionLoadSummary
LoadSummary loads a single session's Summary. Errors when the session file is missing or unreadable.
internal/session/list.go:142
↓ 7 callersFunctionNewProvider
NewProvider creates a Provider for range mode: from..to (via merge-base).
internal/diff/git.go:67
↓ 7 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
↓ 7 callersMethodRunManifest
RunManifest returns the frozen v1 coverage result for review runs. Scan remains legacy and returns nil.
cmd/opencodereview/shared.go:621
↓ 7 callersMethodSessionID
SessionID returns the current scan's persisted session ID. It returns an empty string when no session file exists.
internal/scan/agent.go:177
↓ 7 callersMethodTotalCacheReadTokens
()
cmd/opencodereview/shared.go:599
↓ 7 callersMethodTotalCacheWriteTokens
()
cmd/opencodereview/shared.go:600
↓ 7 callersMethodTotalOutputTokens
()
cmd/opencodereview/shared.go:597
↓ 7 callersFunctionactiveModelForProvider
(cfg *Config, providerName string, entry ProviderEntry)
cmd/opencodereview/config_cmd.go:741
↓ 7 callersFunctionagentTaskDoneResponse
()
internal/agent/agent_test.go:41
↓ 7 callersMethodapplySessionStart
(rec resumeRecord)
internal/session/resume.go:189
↓ 7 callersFunctionbuildCheckpointMarker
(payload)
scripts/github-actions/post-review-comments.js:2287
↓ 7 callersFunctionclassifyCommentAgainstDiff
(item, diff)
scripts/github-actions/post-review-comments.js:2101
↓ 7 callersFunctioncompleteEnum
(values ...string)
cmd/opencodereview/shared_flags.go:77
↓ 7 callersFunctionconfigValues
(calls)
scripts/github-actions/action-contract.test.js:318
↓ 7 callersFunctioncustomConfigModelTUI
(t *testing.T, configPath string, models []string)
cmd/opencodereview/provider_tui_funcs_test.go:1081
↓ 7 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:650
↓ 7 callersFunctionencodeRepoPath
(p string)
internal/session/persist.go:76
↓ 7 callersMethodfilterLargeDiffs
filterLargeDiffs drops diffs whose diff content alone consumes more than 80% of MaxTokens.
internal/agent/agent.go:1947
↓ 7 callersFunctioninitRepoWithChange
initRepoWithChange creates a real git repository with one committed file and an uncommitted working-tree modification, returning the repo dir. There i
internal/diff/git_test.go:48
↓ 7 callersFunctionloadLLMRuntime
loadLLMRuntime loads tool defs from toolConfigPath, reads the app config from the user's default config path (applying the configured language to tpl
cmd/opencodereview/shared.go:213
↓ 7 callersMethodmapResponsesResponse
mapResponsesResponse converts the SDK Response into the shared ChatResponse. Text output is read via the SDK's OutputText() helper (it walks all outpu
internal/llm/responses_client.go:249
↓ 7 callersFunctionmetaFactory
metaFactory builds the same closure internal/agent injects, so these tests exercise the review wiring rather than a test-only shape.
internal/llmloop/retry_identity_test.go:72
↓ 7 callersFunctionoutputPreviewText
(p *agent.DiffPreview, out io.Writer)
cmd/opencodereview/output.go:719
↓ 7 callersFunctionparseGroupingResponse
(content string, diffs []model.Diff)
internal/agent/grouping.go:166
↓ 7 callersFunctionparseTemplate
(name string)
internal/viewer/server.go:175
↓ 7 callersFunctionpeekSession
peekSession reads the first record, all review_item records (for comment count), and the last record of a JSONL file.
internal/viewer/store.go:140
↓ 7 callersMethodrepoRoot
()
extensions/vscode/src/extension/services/GitService.ts:261
↓ 7 callersMethodrequests
()
internal/llmloop/retry_identity_test.go:56
↓ 7 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:25
↓ 7 callersFunctionsetTestHome
setTestHome redirects the user home resolved by os.UserHomeDir() to dir for the duration of the test. Setting HOME alone is NOT enough on Windows: os.
internal/agent/test_home_test.go:13
↓ 7 callersMethodsyncSessionModelSelection
()
cmd/opencodereview/provider_tui.go:608
↓ 7 callersFunctionvalidateReviewRefs
validateReviewRefs rejects ref-option injection (#112): any --from/--to/ --commit value must be a real commit ref and must not start with '-'.
cmd/opencodereview/review_cmd.go:461
↓ 7 callersMethodwriteRecordLocked
(rec map[string]any)
internal/session/persist.go:125
↓ 6 callersFunctionCanonicalPath
CanonicalPath returns an absolute path with symlinks resolved.
internal/pathutil/path.go:13
↓ 6 callersMethodIsUserExcluded
IsUserExcluded reports whether the given path matches any user exclude pattern. The check is case-insensitive: both path and pattern are lowercased.
internal/config/rules/system_rules.go:233
↓ 6 callersFunctionLoadDetail
LoadDetail returns the summary plus per-file item records for one session.
internal/session/list.go:151
↓ 6 callersMethodMarkReused
MarkReused records that the item was reused from a parent session checkpoint.
internal/session/manifest.go:696
↓ 6 callersMethodMarkWaived
MarkWaived records that the user explicitly waived this selected item, which must still be in the pre-terminal (selected) state. reason is required an
internal/session/manifest.go:713
↓ 6 callersFunctionNewFileReadDiff
(dm DiffMap)
internal/tool/file_read_diff.go:37
↓ 6 callersFunctionNewStub
(t Tool)
internal/tool/stub.go:14
↓ 6 callersFunctionParseEffort
ParseEffort validates a user-supplied effort value.
internal/config/template/effort.go:41
↓ 6 callersFunctionParseHunks
ParseHunks parses raw unified diff text for a single file into a slice of Hunks. Lines before the first @@ header (file-level headers like "diff --git
internal/diff/hunk.go:40
↓ 6 callersFunctionPrintTraceSummary
PrintTraceSummary prints a one-line summary of the review to stdout. If SessionID is non-empty, an "[ocr] Session: <id>" line follows the summary.
internal/telemetry/events.go:86
↓ 6 callersFunctionReLocateComment
ReLocateComment calls the LLM to regenerate a precise existing_code snippet when text-based matching fails, then retries ResolveComment with the new s
internal/diff/relocation.go:49
↓ 6 callersMethodRecordReviewItemReused
RecordReviewItemReused records that this run reused a checkpoint from another session.
internal/session/history.go:269
↓ 6 callersFunctionResolveComment
ResolveComment attempts to resolve StartLine/EndLine for a single comment by matching ExistingCode against the diff. Returns true on success.
internal/diff/resolver.go:62
↓ 6 callersMethodReviseLastAttempt
ReviseLastAttempt rewrites the last attempt of m as an error. It is the client-boundary correction for what the observer cannot see: an error surfaci
internal/llm/retry_report.go:381
↓ 6 callersMethodSession
Session returns the session history associated with this Agent.
internal/scan/agent.go:173
↓ 6 callersFunctionSessionsDir
SessionsDir returns the on-disk directory that holds JSONL session files for a given repository. It does not create the directory.
internal/session/list.go:98
↓ 6 callersFunctionStartLLMSpan
StartLLMSpan creates a span for an LLM request with standard attributes.
internal/telemetry/span.go:109
↓ 6 callersFunctionStripMarkdownFences
StripMarkdownFences removes ```json and ``` wrappers some models add around structured outputs. Exposed so callers (e.g. agent's review-filter post-st
internal/llmloop/compression.go:162
↓ 6 callersMethodValidate
()
internal/config/template/template.go:250
↓ 6 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
↓ 6 callersFunctionactionScriptSource
(stepName)
scripts/github-actions/post-review-comments.test.js:4130
↓ 6 callersFunctionapplyCLIExcludes
applyCLIExcludes appends user-supplied --exclude patterns (already split into a []string) onto cc.FileFilter.Exclude. Creates the FileFilter if none w
cmd/opencodereview/shared.go:281
↓ 6 callersFunctionapplyCustomProviderConfig
(configPath string, cfg *Config, result providerTUIResult)
cmd/opencodereview/provider_cmd.go:157
↓ 6 callersMethodassert_line
(self, c, want_line)
examples/gerrit_ci/post_review_test.py:56
↓ 6 callersFunctioncharKey
(c rune)
cmd/opencodereview/provider_tui_test.go:42
↓ 6 callersFunctioncompareReadmeStructures
(files)
scripts/github-actions/check-translation-sync.js:127
↓ 6 callersMethodconfig
(self)
examples/gitlab_ci/post_review_test.py:536
↓ 6 callersFunctiondescribeStatus
(s session.Summary)
cmd/opencodereview/session_cmd.go:547
↓ 6 callersFunctioneffectivePath
(d model.Diff)
internal/agent/preview.go:114
↓ 6 callersFunctionensureMetrics
()
internal/telemetry/metrics.go:32
↓ 6 callersMethodenterEditCustomProvider
()
cmd/opencodereview/provider_tui.go:1102
↓ 6 callersFunctionexecuteDelegatePreview
(opts delegateOptions)
cmd/opencodereview/delegate_cmd.go:157
↓ 6 callersFunctionextractHeadings
(markdown)
scripts/github-actions/check-translation-sync.js:59
↓ 6 callersFunctionextractSideLines
extractSideLines extracts one side of the diff from a hunk. When newSide is true, returns context+added lines with new-file line numbers. When newSide
internal/diff/resolver.go:186
↓ 6 callersFunctionfileGroupKey
fileGroupKey returns a deterministic key for a file group: sorted paths joined by comma.
internal/agent/grouping.go:274
↓ 6 callersFunctiongetPrDiffHunks
({ github, owner, repo, prNumber, commitSha, log, cache })
scripts/github-actions/post-review-comments.js:2159
↓ 6 callersFunctiongroupBatches
groupBatches partitions items according to strategy, then slices each natural group into BatchSize-sized chunks (when size > 0). Within a batch the in
internal/scan/batch.go:45
↓ 6 callersFunctionhandleRepos
(w http.ResponseWriter, r *http.Request, root string)
internal/viewer/handler.go:12
↓ 6 callersFunctioninitBareRepo
initBareRepo creates an empty (unborn) git repository with identity configured but no commits, returning the repo dir.
internal/diff/git_resolve_test.go:30
↓ 6 callersFunctioninitRepo
initRepo creates a git repo with one commit containing the given files and returns the repo dir and the commit SHA.
internal/config/rules/sniffer_test.go:29
↓ 6 callersFunctionlistCursorPrefix
(isCursor bool)
cmd/opencodereview/provider_tui.go:2073
↓ 6 callersFunctionloadPackageJSON
(t *testing.T)
internal/release/asset_naming_test.go:34
↓ 6 callersFunctionlooksLikeFilePath
looksLikeFilePath returns true when s is likely a file path (not inline content). Heuristic: multi-line text is always inline; single-line text withou
internal/config/rules/system_rules.go:545
↓ 6 callersFunctionmaskedSecretPlaceholder
()
cmd/opencodereview/provider_tui.go:881
↓ 6 callersFunctionmax
(a, b int)
internal/suggestdiff/diff.go:73
↓ 6 callersFunctionnewCustomModelTUI
newCustomModelTUI builds a modelTUIModel backed by a custom provider with a writable config path, so add/delete/persist operations exercise the save p
cmd/opencodereview/provider_tui_modeltui_test.go:16
↓ 6 callersFunctionnewOpenAITestServer
newOpenAITestServer returns an httptest server that captures each request's headers and JSON body and responds with a minimal valid chat completion.
internal/llm/client_test.go:1337
↓ 6 callersFunctionparseBpeData
parseBpeData parses the base64-encoded BPE data format. Each line: <base64-token> <rank>
internal/llm/embedded_loader.go:56
↓ 6 callersMethodread
()
extensions/vscode/src/extension/services/ConfigService.ts:20
↓ 6 callersFunctionreadme
(headings)
scripts/github-actions/check-translation-sync.test.js:32
↓ 6 callersFunctionrunActionScript
(source, { github, context, core, env })
scripts/github-actions/post-review-comments.test.js:4147
↓ 6 callersFunctionrunConfig
runConfig provides test compatibility: dispatches config subcommands through a fresh cobra command tree that mirrors the production config command, so
cmd/opencodereview/compat_test.go:142
↓ 6 callersFunctionrunConfigUnset
(key string)
cmd/opencodereview/config_cmd.go:149
↓ 6 callersFunctionrunGitCmd
(repoDir string, args ...string)
cmd/opencodereview/git.go:12
↓ 6 callersMethodrunRaw
运行任意参数,流式回调日志,结束返回 stdout 全文。退出码非 0 时 reject,并带上 CLI 报错文本。
extensions/vscode/src/extension/services/CliService.ts:108
↓ 6 callersFunctionrunRulesCheck
(filePath string)
cmd/opencodereview/rules_cmd.go:45
↓ 6 callersFunctionscriptCore
()
scripts/github-actions/post-review-comments.test.js:4165
↓ 6 callersFunctionseedParentManifest
seedParentManifest gives a hand-built ResumeState the parent manifest a real resume always has, matching the identity a already resolved. Without one
internal/agent/manifest_integration_test.go:119
↓ 6 callersFunctionsel
(id string)
internal/session/manifest_test.go:16
↓ 6 callersMethodtrace
(msg: string)
extensions/vscode/src/extension/services/GitService.ts:20
↓ 6 callersMethodtryApplyPendingCompression
tryApplyPendingCompression checks whether a background compression has completed and swaps the rebuilt messages into place. Returns true if applied.
internal/llmloop/compression.go:336
↓ 6 callersFunctionunmarshalResponsesBody
--- helpers ---
internal/llm/responses_client_test.go:707
↓ 6 callersFunctionunwritableConfigPath
unwritableConfigPath returns a config path that is itself a directory, so any saveConfig / loadOrCreateConfig against it fails. This is the lever used
cmd/opencodereview/provider_tui_savefail_test.go:24
↓ 6 callersFunctionupKey
()
cmd/opencodereview/provider_tui_funcs_test.go:382
← previousnext →301–400 of 4,576, ranked by callers