Add a binary cache fallback mechanism to ensure ocr remains available
while the background auto-upgrade is running npm i -g.
Before the upgrade, the current binary is copied to
~/.opencodereview/bin/ as a safety net. resolveNativeBinary() now
checks this cache path as a last resort before returning null.
This fixes:
- Unix: the gap window where binary is deleted before new one installs
- Windows: broken installs when npm i -g fails due to file locks
* feat(examples/gitlab): add fail-open category/severity publication controls
Port the GitHub Action publication policy (#478/#529) to the GitLab CI
example so MRs can badge findings and optionally route low-signal
categories/severities to summary notes without dropping them.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(examples/gitlab): sanitize metadata in route_comment
Align routing with build_badge so control characters in LLM
category/severity values do not desync badge labels from policy matching.
---------
Co-authored-by: Cursor <cursoragent@cursor.com>
Parent commands (session, config, delegate, llm, rules) were defined
without a RunE function. In Cobra, when a parent command has no RunE
and receives an unrecognized subcommand, it falls back to displaying
help and returns nil (exit 0). This is inconsistent with the root
command and leaf commands, which correctly return exit code 1 with an
error message.
Add RunE: func(cmd *cobra.Command, args []string) error { return cmd.Help() }
to all five parent commands so Cobra properly reports "unknown command"
errors instead of silently succeeding.
Includes tests verifying:
- unknown subcommands produce a non-nil error containing "unknown command"
- known subcommands still route correctly
- bare parent commands (no args) still print help and return nil
Closes#641
Adds a new 'ocr session comments <session-id>' subcommand that prints the
review comments persisted in a session, rendered in the same style as
'ocr review' terminal output (path, line range, severity badge, suggestion
diff). Supports --json for machine-readable output and --severity/--category
comma-separated filters.
Comments are read from the review_item_done / review_item_reused checkpoint
records via a new session.LoadComments, mirroring resume replay semantics:
a later checkpoint for the same fingerprint supersedes the earlier one and a
subsequent failure drops it.
Also adds shell tab completion for session ids (session show, session
comments, and review --resume) and for the --severity/--category values.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
These file categories pass through all existing filters but provide
little review value: auto-generated protobuf/codegen output and
test fixture data that is never manually authored.
New patterns: __snapshots__/**, *.snap, testdata/**, fixtures/**,
*.generated.*, *.gen.go, *.pb.go, *.pb.cc, *.pb.h
* feat(session): add run manifest coverage data model and builder
First slice of issue #367 (run manifest coverage contract): the data
model and state machine only. Not yet wired into the agent or CLI, so
existing review/scan output is unchanged.
Introduce the versioned, immutable RunManifest (schema ocr.run-manifest/v1)
and a concurrency-safe ManifestBuilder that tracks per-file coverage
(selected/completed/reused/failed/waived) and freezes into a terminal
state.
- terminal state derived solely from coverage sets, never comments/warnings
(complete/partial/failed/skipped)
- Finalize sweeps any undecided selected item to failed/unknown so no item
is silently dropped
- single-mutex builder: first terminal state wins, frozen after Finalize,
nil-receiver safe
- fixed failure classification enum with an unknown catch-all
- redaction floor on failure/waive reasons (strip secrets, cap length) as a
single write entry so callers cannot bypass it
- 22 unit tests, race-clean
Refs: issue #367
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(session): harden run manifest per adversarial review
Address findings from the concurrency / JSON-contract / PR#306-coupling
adversarial review of the manifest data model (still slice 1; not wired to
agent or CLI).
- SetSweepClass: Finalize can classify undispatched items as cancelled/budget
instead of a blanket unknown (the one real model gap the review found)
- ItemID(fingerprint)=SHA-256 canonical mint helper; an item_id is never a raw
fingerprint, keeping the resume cross-reference explicit and mix-ups caught
- sanitizeReason: strip control/ANSI chars, coerce valid UTF-8, redact quoted
secret values, guarantee single line
- Finalize returns deep-copied coverage slices so the frozen snapshot is never
aliased across the two outlets
- RegisterSelected: nil-safe (lazy-init map) + documents that only the
post-deletion/post-filter dispatchable set may be registered
+7 unit tests (29 total), race-clean.
Refs: issue #367
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(manifest): wire input identity, config hashes and run-level failure (shard ②d)
- Freeze per-mode input identity (mode + resolved_base/head + exact_range +
source_artifact_sha256) via diff.ResolveInput/commitParents, and repository
identity via RemoteIdentity/canonicalRemote (credential-free).
- Add rule_config_sha256 and runtime_config_sha256 over an allowlist of
non-secret fields using a length-prefixed SHA-256 framework (no tokens/URLs).
- Replace SetRunLevelFailure(bool) with structured SetRunFailure(class, reason)
and set ManifestInput.mode; fill execution.* (ocr version, provider, model,
concurrency, config hashes).
- Thread error returns through Finalize/WriteSessionEnd (main review path
surfaces them; skip/all-failed/scan paths hardened in follow-up).
- Tests: manifest_hash, canonical_config, git_resolve.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(manifest): propagate persistence errors and harden remote/error classification
Merged review themes A/B/E from the 07-22 consolidated assessment.
Theme A — Finalize / session_end delivery errors no longer swallowed:
- agent.go no-files path returns the Finalize error instead of nil (A1)
- agent.go loadDiffs failure joins the Finalize error via errors.Join (A2)
- session.Finalize uses sync.Once + cached finalizeErr: written exactly
once, concurrency-safe, and every caller replays the same result so a
retry cannot falsely report success (A3)
- scan/agent.go wires both Finalize call sites to surface the error (A4)
Theme B — canonicalRemote rewritten (internal/diff/git.go):
- keep the port (u.Host, not u.Hostname) so endpoints differing only by
port stay distinct (B1)
- split scp syntax on the first ':' so an '@' inside the path survives (B2)
- recognize local/file/Windows/UNC remotes and omit identity rather than
misparsing a path as a host (B3; local-remote policy still open)
Theme E — main_task-empty is now a sentinel (errMainTaskEmpty) classified
via errors.Is instead of matching error text.
Theme D (TOCTOU) deferred to shard 4 per issue #367 open-issues OI-12.
Tests: go build ./... + go vet + go test ./... all green (23 pkgs).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(manifest): report both dispatch and persistence errors on the normal path
The success-path Finalize wiring used `ferr != nil && err == nil`, so when the
review (or scan) failed AND session_end also failed to persist, the persistence
error was dropped and only the dispatch error surfaced — the caller never
learned the session/manifest was not saved.
Join both with errors.Join when both occur (matching the loadDiffs path), so a
persistence failure is always reported even alongside a dispatch failure. This
closes the last gap in the OI-10 contract.
- internal/agent/agent.go: review normal path
- internal/scan/agent.go: scan normal path (+ errors import)
Tests: go build ./... + go vet + go test ./... all green (23 pkgs).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(manifest): 接入 CLI 与 viewer 并补齐验收用例
- 使用冻结 manifest 统一 review JSON、文本与退出状态\n- session CLI 和 viewer 展示五集合覆盖并兼容 legacy/aborted\n- 补充本地 mock、跨出口一致性及安全验收用例
* test(manifest): 补齐验收矩阵缺口并修复审核发现的缺陷
验收用例:configuration 分类(run 级 sweep + item 级映射)、budget/timeout/panic 混合 partial 隔离、跨出口一致性改为规范化原始字节比对、flag 校验失败无产物断言。
代码修复:sanitizeReason 先剥控制字符再脱敏(堵控制字节绕过)、失败项异分类二次标记报冲突错误、source_artifact_sha256 按 item_id 去重并稳定排序、sortItems 改 SliceStable 对齐设计用词。
全仓 go test 23 包通过。
* test(manifest): 补充 provider transition resume 测试用例
覆盖 issue #367 验收标准 provider transition:resume 时 provider/model 改变后,子 manifest 记录当前值而非继承父运行,并经 parent_run_id 链接父会话以支持审计。用 mock client,不依赖真实 provider key。
* fix(manifest): 对齐预算终态与持久化语义
统一聚合预算停止时的 coverage、status 与退出码。传播 session writer 初始化错误,并补齐 merge first-parent 输入身份及回归测试。移除代码注释中的外部设计文档引用。
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: kite <254839944+lizhengfeng101@users.noreply.github.com>
On Windows, child_process.spawn cannot find npm.cmd / npx.cmd without
shell: true, causing the VS Code extension to falsely report 'npm not
detected' and disable CLI features.
probeCommand now hardcodes ['--version'] and adds shell: true only on
win32. runRaw is intentionally left unchanged — it receives user-controlled
args and must not use shell: true for security.
Fixes#453
The supported top-level config keys lived both in the switch/case in setConfigValue and, hardcoded again, in the unknown-key error message, so adding a key meant updating two places. Move them into a supportedConfigKeys slice and generate the error message from it. The message content is unchanged.
Closes#637
runConfig manually dispatched config subcommands and parseConfigArgs did manual arg slicing, duplicating the routing the production config command already defines with cobra. Rebuild runConfig as a fresh cobra tree mirroring production (matching the runSession pattern), and drop parseConfigArgs, configAction, and configParseError, which are no longer used. Dispatch behavior is unchanged and stays covered by the existing runConfig/config_dispatch tests.
Closes#638
Forwarding extra_body.stream to the non-streaming Chat Completions and
Anthropic Messages APIs made the server return text/event-stream (SSE)
while the SDK's non-streaming New() expects a JSON body, causing every
call to fail with "expected destination type of 'string' or '[]byte'
for responses with content-type 'text/event-stream;charset=utf-8' that
is not 'application/json'".
The OpenAIResponsesClient already had this fix (it drops the stream key
in CompletionsWithCtx). Apply the same pattern to OpenAIClient and
AnthropicClient so the three non-streaming clients behave consistently.
For OpenAIClient the streaming decision is preserved: only boolean
true triggers NewStreaming (which sets stream=true itself); other value
types (string "true", bool false) now have the key dropped from the
wire body so the server returns JSON instead of SSE.
* fix(diff): honor .gitignore negation patterns
Patterns were resolved with a first-match-wins scan that discarded any
`!` line outright ("negation patterns are not needed for exclusion
purposes"). That holds for a blocklist .gitignore, but inverts the result
for the allow-list idiom github/gitignore ships per language: `*` to
ignore everything, then `!` lines to re-include. Because a bare `*`
basename-matches every file, every path in such a repository resolved as
excluded.
The failure is silent. `ocr review` reports "0 reviewable / 0 total" and
`--preview` prints "No files changed", both of which read as a clean
review of a repository that was never looked at. It reaches `ocr scan`
and the agent's file_find tool too, since both filter through the same
matcher.
Resolve patterns the way git does — in file order, last match wins, `!`
inverting that pattern's verdict — and while in here support the two
constructs the allow-list idiom needs: a leading `/` anchoring a pattern
to the repository root, and `**`, routed through doublestar (already a
dependency) since filepath.Match cannot express it.
Two deliberate asymmetries:
- The hardcoded directory blocklist (.git/, node_modules/, vendor/…)
still short-circuits, so a negation cannot re-admit those.
- A negated directory-only pattern is inert. Git uses `!*/` to keep
descending into subdirectories, not to re-admit the files inside
them; honouring it against file paths would readmit everything below
the root. Positive directory-only patterns now also match on
directory components only, so `vendor/` no longer matches a file
named `vendor`.
MatchGitignorePattern keeps its existing contract: a negated pattern
reports false, so callers testing one pattern in isolation still read it
as "does this exclude the path". Ordered resolution, where negations
carry meaning, lives in isPathExcluded.
Verified against a repository using Go.AllowList.gitignore: file
discovery goes from 0 reviewable / 0 total to 9 reviewable / 18 total,
with the ignore file untouched.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* fix(diff): anchor the path-suffix match on a component boundary
The suffix fallback compared raw strings, so a pattern containing "/" also
matched a path whose directory merely ends in the pattern's first component:
"src/main.go" excluded "othersrc/main.go", which git never matches — a
pattern with a "/" is anchored to the repository root.
Requiring the suffix to start at "/" keeps the intentionally loose
"generated/api.go" matches "src/generated/api.go" behaviour while dropping
the partial-component case. Two cases added to TestMatchGitignorePattern.
Pre-existing rather than introduced here; the line is in this diff because
of the anchored-pattern guard, and the fix is a one-liner, so it is folded
in rather than deferred.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub rejects an entire createReview batch with HTTP 422 when any one
inline comment points at a line outside the PR diff. The previous fallback
degraded to N separate per-comment reviews, producing N timeline entries
for what is logically one review — the churn described in #624.
The batch path now filters out the comments it can PROVE are unresolvable
against the PR diff and re-sends the survivors as a single review. Dropped
comments are reported in the summary with their original span.
Correctness constraints, each of which can make things worse if relaxed:
- Classification is tri-state (valid/invalid/unknown), not boolean.
"invalid" is a claim that must be proven, because it permanently routes
a finding to the summary without ever attempting to post it. Missing
diff metadata — a patchless binary or oversized file, a truncated file
walk — is "unknown", not "invalid". Treating absent metadata as proof
of out-of-diff would silently void an entire batch with zero posting
attempts, which is strictly worse than the pre-existing behavior.
Only "valid" comments are re-batched; "unknown" keeps the per-comment path.
- The 422 gate is conservative. GitHub documents 422 on this endpoint as
"Validation failed, OR the endpoint has been spammed", so the status
code alone is not evidence of a line-resolution problem. The fallback
activates only on a confirmed line/diff validation error; anything else,
including spam/abuse detection, falls through to the per-comment loop.
- Both the primary and the secondary batch run the same cooldown and
idempotency reconciliation (cooldownAndReconcile). A secondary batch
that fails with a 5xx or network error may still have LANDED with its
response lost; retrying it blindly would repost every comment and
recreate the exact duplication this change removes.
- Diff hunks are parsed as {start,end} ranges, one per hunk, so a
multi-line span must satisfy start_line <= line within a SINGLE hunk.
A flat per-file line set would accept cross-hunk and reversed spans,
which GitHub then rejects with another 422.
The diff inventory is fetched once per run and paginated through the
existing readWithPacing helper, so it shares the repo's read retry and
pacing discipline rather than bypassing it.
Verified against live GitHub, not only against mocks. Driving the real
runPostReviewComments at a real PR with two in-diff and two out-of-diff
comments produced: one 422 on the initial batch, one listFiles read, one
successful secondary batch, and EXACTLY ONE review timeline entry holding
the two surviving comments, with the two unresolvable ones reported in the
summary. The observed 422 body is
{ "message": "Unprocessable Entity",
"errors": ["Line could not be resolved and Line could not be resolved"],
"status": "422" }
which pins two things the implementation silently depended on. First, this
endpoint returns errors[] as plain STRINGS, so the structured entry.field
branch is unreachable here (kept as defensive cover for other endpoints,
now annotated as such). Second, the decisive wording reaches us only through
Octokit's composed error.message; response.data.message alone is
"Unprocessable Entity" and matches no pattern, so narrowing the gate to the
structured field would disable the fallback while leaving every test green.
That footgun is now documented at the call site and pinned by a regression
test built from the verbatim live payload.
Known limitations:
- The 422 gate matches known line-resolution wordings. Live probing found
"Line could not be resolved" (line outside a hunk, past EOF, negative,
LEFT side, or a span straddling hunks), "Start position could not be
resolved" (inverted span) and "Path could not be resolved" (path not in
the PR), all covered by /could not be resolved/i. A future wording
outside these patterns would fall through to the per-comment loop:
never worse than the pre-existing behavior, but it would quietly
disable the grouping.
- Only RIGHT-side comments are modeled. A LEFT-side comment classifies
as "unknown" and takes the per-comment path. The producer emits
RIGHT-side comments today.
npm run test:github-actions passes, covering secondary landed-then-5xx
reconciliation (fully and partially landed), secondary 429 cooldown
followed by the per-comment retry, non-line 422s, patchless files,
cross-hunk and reversed spans, listFiles truncation, and inventory caching.
Refs: #624
* refactor(cli): migrate to Cobra framework for shell completion support
Replace the hand-rolled ocrFlagSet + switch dispatch with spf13/cobra,
enabling native bash/zsh/fish/powershell completion via `ocr completion`.
Key changes:
- Add root.go (rootCmd definition, version flag with -V shorthand)
- Add completion.go (ocr completion [bash|zsh|fish|powershell])
- Add shared_flags.go (reusable flag registration helpers + validation)
- Rewrite all *_cmd.go to use cobra.Command with RunE
- Delete flags.go (ocrFlagSet, expandShortFlags, parseXxxFlags)
- Add compat_test.go (test compatibility wrappers for existing tests)
- Promote github.com/spf13/cobra from indirect to direct dependency
Behavioral improvements over the previous implementation:
- Shell completion for all commands, flags, and enum values
- "Did you mean?" suggestions for misspelled commands
- cobra.NoArgs on review/scan prevents silent positional arg ignoring
- Cleaner error messages on unknown flags (no full flag dump)
- Consistent help output format across all subcommands
Closes#576
* fix(cli): add Args: cobra.NoArgs to viewerCmd
Prevents `ocr viewer localhost:3000` from silently ignoring the
positional argument and starting on the default address.
Consistent with reviewCmd and scanCmd.
* feat(cli): add "Did you mean?" suggestions for misspelled flags
Cobra only suggests corrections for unknown subcommands, not flags.
Add a levenshtein-distance based suggestion that fires when cobra
returns an "unknown flag" error, matching the same UX pattern.
Examples:
--hel → Did you mean this? --help
--audienc → Did you mean this? --audience
--comit → Did you mean this? --commit
* fix(deps): promote spf13/pflag to direct dependency
After the Cobra migration, pflag is directly imported but was still
marked as indirect in go.mod, causing CI's go-mod-tidy check to fail.
* refactor(cli): use idiomatic cobra patterns for args validation and flag errors
Replace hand-rolled argument validation in configSetCmd/configUnsetCmd
with cobra.ExactArgs, and move flag typo suggestions from post-hoc error
string parsing into SetFlagErrorFunc where cobra provides the command
context directly.
Parse review_item_done/review_item_reused JSONL records to extract
LLM-generated review comments. Display them in the session detail page
grouped by file, with severity/category badges, line ranges, and
side-by-side code diff panels (existing vs suggested). Also add a
comment count column to the sessions list page.
Add TestSystemRulesIntegrity covering four invariants between the
embedded system_rules.json and rule_docs/:
- every referenced rule file (default_rule + path_rule_map values)
exists in the embedded rule_docs/
- every path_rule_map glob is a valid doublestar pattern, validated
post brace-expansion to match Resolve()'s runtime semantics
- every embedded rule_docs/*.md is referenced (no orphan files)
- no duplicate pattern keys in path_rule_map, caught via the ordered
streaming decode in SystemRule.UnmarshalJSON
Closes#620.
Treat FAILED and missing completion as review failures, and retry
invalid task_done states instead of accepting them as success.
Keep partial scan output and session history aligned with those states.
Co-authored-by: 4-1-1 <4401981+4-1-1@users.noreply.github.com>
Co-authored-by: kite <254839944+lizhengfeng101@users.noreply.github.com>
Follow-up to #562 (which documented the openai-responses protocol). Adds
the one clarification #562 lacked: for openai-responses, the `url` field
accepts either the API base URL or the full `/responses` endpoint, since
ensureResponsesEndpoint normalizes both forms. Added in en/zh/ja.
Signed-off-by: FenjuFu <92919259+FenjuFu@users.noreply.github.com>
The Java implementation referenced by these comments
(processTargetLineCode, TaskCheckPoint, subtaskExecutor, the Java-side
LlmConversation) does not exist in this repository, so the
cross-references cannot be verified. Trim or reword each comment to keep
the behavioral explanation without the stale Java reference.
Comment-only change; no behavior is affected.
Redesign the OCR viewer interface with a modern developer-tool aesthetic:
- New color system with layered surfaces and indigo accents
- Dark mode with deeper tones and refined contrast
- Branded navigation with official OCR logo (inline SVG)
- Improved card, table, and accordion components
- Subtle animations with prefers-reduced-motion support
- System font stack (no external dependencies)
- color-mix() with proper fallbacks for older browsers
- Responsive layout improvements
The "Rule resolution per file" table in en/ja/zh was missing 11 entries
(go, astro, python, protobuf, po, pot, graphql, prisma, julia, terraform,
bicep) that exist in internal/config/rules/system_rules.json. Rows are now
ordered to match the declaration order in system_rules.json.
Also adds pages/src/content/docs/ru/review-rules.md, translating the full
page to Russian (the ru locale only had installation.md and quickstart.md
so far) and registers it in the docs index so the ru site shows the
translated page instead of the English fallback.
Closes#608
Wire ru into the docs site language switcher and i18n strings, add
quickstart/installation translations, README Russian screenshots, and
include ru in the docs translation-sync guard. Remaining docs pages
fall back to English.
Add a runtime token-budget guardrail to the diff-review path so a large MR
stops itself before runaway cost (issue #409: ~90.4M tokens in one failed
attempt), instead of timing out and losing all structured output.
New `ocr review` flag (mirror scan's proven --max-tokens-budget):
- --max-tokens-budget N : cap aggregate token usage; dispatch stops once the
running total + a per-file look-ahead would exceed it (0 = unlimited).
Mechanism mirrors scan/agent.go's dispatchBatch gate exactly: read the
existing atomic Runner counters (no duplicate counter — a second one would be
a drift bug) before acquiring the semaphore, and break the dispatch loop on
exceed. In-flight workers are allowed to finish (overrun bounded by the
in-flight count, <= concurrency), matching scan's documented contract.
Budget exhaustion returns the partial comments already produced with a nil
error (not a Go error — the failure path suppresses output), and signals
budget-exceeded out-of-band so the output layer sets a typed `budget_exceeded`
status distinct from success / completed_with_warnings / completed_with_errors.
Additional changes tied to the invariants:
- Pre-review scale warning (files, diff tokens, configured budget) printed
before any model spend; non-blocking, warn-only.
- Structured usage emitted on the failure path (stderr) so the cost of a
failed attempt is never lost. Carries only token/tool tallies — no
credentials or prompts. Reports the agent's actual BudgetExceeded() state so
the residual budget-trip + all-dispatched-fail edge can never contradict the
typed status.
- summary.budget_exceeded JSON field (additive, omitempty) so old parsers are
unaffected; default 0/unlimited restores prior behavior.
Internal/scan gains only the BudgetExceeded() accessor (returns false) so the
shared ResultProvider interface compiles; scan keeps its own token budget and
its JSON output is unchanged.
Tests mirror internal/scan/budget_test.go: token-budget gate stops dispatch
early and sets BudgetExceeded(); unlimited default runs all files; estimate
helpers project sane values (with a humanTokens parity table so the two copies
cannot diverge); JSON output asserts the typed status and the failure-path
usage record. Full `make test` (-race) green.
Add category/severity-aware, fail-open publication controls to the reusable
GitHub Action: render a CLI-consistent `[category · severity]` badge on every
comment, and add one opt-in routing destination that moves low-severity or
selected-category findings from inline comments to the PR summary.
No finding is ever silently dropped: unknown/malformed metadata on a finding
never matches the policy (routes to its normal inline destination), and a
malformed policy itself degrades to no-routing. A new `routed` accounting
bucket is disjoint from summary/skipped/failed, so destination counts still
sum to the raw input total.
- buildBadge: byte-matches the CLI's buildBadge degeneration
([cat · sev] / [cat] / [sev] / ""), with control-char sanitization that is
intentionally stricter than the CLI (strips \t/\n to defend Markdown layout).
- buildPolicy / routeComment: pure fail-open policy decision. A finding matches
when its severity is at-or-below the threshold OR its category is in the list;
unknown metadata never matches.
- Partition loop: routing is a placement decision (route OUT of reviewComments),
so routed findings never enter any createReview write path (no double-post on
retry) and carry no idempotency id.
- Accounting: new comments_routed output and summary bullet; render order is
counts -> no-line -> routed -> failed.
- action.yml: opt-in route_severity_below and route_categories string inputs
(empty defaults = today's behavior) plus the comments_routed output.
With no routing input set, behavior is byte-equivalent to today except for the
additive badge prefix on comments that carry category/severity metadata.
* Add CodeUp CI integration (issue #517)
Adds examples/codeup_ci with:
- post_review.py: runs ocr review --format json and posts a
GLOBAL_COMMENT summary via CodeUp's CreateChangeRequestComment API
- post_review_test.py: unit tests (27 passing)
- codeup-flow.yml: example Yunxiao Flow pipeline
- README.md: setup docs and known limitations (v1 = summary
comment only, inline comments as a follow-up)
* chore: ignore Python cache files
* Add actual file contents for CodeUp CI integration
* Use generic placeholder for OCR_LLM_MODEL example
* Address review: remove local .gitignore, add trailing newlines, simplify testing docs
extensions/vscode's resolutions pinned minimatch to ^9.0.7, which yarn
resolves to 9.0.9 -- still pulling brace-expansion@2.1.2, inside the
vulnerable range of GHSA-mh99-v99m-4gvg / CVE-2026-14257 (unbounded brace
expansion can OOM the process; expand() bounds result count but not
result length). The resolutions block also explicitly caps brace-expansion
below 3.0 (">=2.1.2 <3"), which was likely intentional: minimatch 9.0.9
calls brace-expansion via __importDefault(...).default, a shape
brace-expansion's 5.0.8 CJS build (named `expand` export only, no
module.exports = expand, no __esModule marker) doesn't satisfy -- a
straight override to 5.0.8 would throw TypeError at runtime.
minimatch@10.2.6 calls brace-expansion via the compatible named-export
form (const { expand } = require('brace-expansion'); expand(pattern,
...)), so bumping minimatch itself -- not just overriding brace-expansion
in isolation -- is the actual fix. No application code imports minimatch
directly (grep confirmed); it's purely a transitive dependency of
typescript-eslint/eslint tooling here, which lowers the risk of the major
version bump surfacing elsewhere.
Verified: yarn install clean, `yarn lint` 0 errors (1 pre-existing
unrelated warning), `yarn build` all three webpack bundles compile
successfully, `yarn test` 11/11 suites and 96/96 tests pass.