Skip to content

Defaults name current models, and review stops reading "the HIGH branch" as a HIGH finding (GST-3462) - #4678

Merged
capy-ai[bot] merged 4 commits into
mainfrom
fix/model-defaults-and-review-log-severity
Nov 22, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
fix/model-defaults-and-review-log-severity

Conversation

@garrytan

@garrytan garrytan commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Three defaults gstack picks now name current models, and a reviewer's mention of a code name like "the HIGH branch" no longer becomes a HIGH finding.
Why: our rule is no older-generation model in a role we choose, and the review parser forced a ruling on two notes that only quoted code.
Nothing to do: no settings change; overrides work as before.

What changed

Review parser labels before and after: code names like the HIGH branch no longer count as HIGH findings, and CRITICAL keeps its label

Review parser labels before and after. Code names like "the HIGH branch" no longer count as HIGH findings, and CRITICAL keeps its label.

Evidence

test/r116-model-defaults.test.ts (3 tests) and test/review-ledger-name-use.test.ts (2 tests, with the captured reply from #4612's review) fail on main and pass here. The existing review-parser suites, including the never-weaker-than-main invariant and the "reaches the CRITICAL write path" control, pass.

Before/after as text: Review parser labels before and after: code names like the HIGH branch no longer count as HIGH findings, and CRITICAL keeps its label
--- Before · before.txt · captured output
+++ After · after.txt · captured output
+INFORMATIONAL In the redact-doc HIGH and scanner-failure branches, the size check runs before the scan.
+INFORMATIONAL The cleanup runs after the HIGH branch has already removed the file.
-HIGH          In the redact-doc HIGH and scanner-failure branches, the size check runs before the scan.
-HIGH          The cleanup runs after the HIGH branch has already removed the file.
 CRITICAL      the HIGH and CRITICAL write paths drop the auth check (store.ts:40)
 HIGH          HIGH: auth.ts:9 skips the token check.
 

A reviewer who wrote "the redact-doc HIGH and scanner-failure branches" about redact-doc's HIGH exit path got that line collected as a HIGH finding nobody could lower. Now a capitalized HIGH, MEDIUM or LOW used as the name of something in the code ("the HIGH branch", "the MEDIUM and LOW tiers") collects at INFORMATIONAL when it is the line's only label, so the reviewer's own Severity fields decide. CRITICAL is never read as a name, even in "the HIGH and CRITICAL write paths", and a word that rates a finding ("the HIGH finding", "the HIGH vulnerability") keeps its label.

The design prototype script sent gpt-4o, which cannot drive the image tool's current model. It now builds its request with the design binary's own helper, so it takes the binary's models and stops with the binary's fix-it message on a pairing OpenAI would reject. A Gemini run whose CLI reports no model is labelled and priced as Gemini 4 Argon instead of Gemini 2.5 Pro, and gstack-context-bill --exact counts tokens with Claude Opus 5.5 instead of Opus 4.5. The judge model is unchanged, because it moves only with a recalibration run.

Why

"No gpt-4o or older-generation model sits in a role we choose." Three defaults still did. Separately, a review of #4612 collected two notes that only quoted code as HIGH findings, and the lead had to rule on them by hand.

Blast radius

The parser change touches every /ship and /review reply the review parser collects. It can only lower HIGH, MEDIUM or LOW on a line with no Severity field, and blockingRow counts only rank 4 (CRITICAL or P0), so no blocker can drop (lib/review-ledger.ts read; the 31 test files that import the parser pass, 516 tests). The model defaults touch a dev-only script, a test adapter's fallback label and one CLI default.

Pre-Landing Review

Two rounds. Round 1 found that the first version of the parser change read "the HIGH and CRITICAL write paths" as a code name and dropped a CRITICAL to INFORMATIONAL; two reviewers found it independently, and it is fixed with controls. Round 1 also moved the prototype onto the design binary's request helper. Round 2 found nothing at the blocking floor. Second-model review (GPT-6.2 Astra): completed.

Deferred findings

Blocking findings in code this PR did not change (review scope: frozen). They stay on this PR and are not filed as issues.

  • Deferred: CRITICAL test/helpers/providers/gemini.ts:167 run() passes only opts.model to resultFromGeminiStream, so a model requested through extraArgs is labelled with the unreported-model fallback when the stream omits it. Pre-existing; line 167 is unchanged by this PR.
Review notes

Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.

  • INFORMATIONAL lib/context-bill.ts:66 Divisor header should say which tokenizer a refit uses.
  • INFORMATIONAL test/helpers/providers/gemini.ts:79 Unreported-model label is a guess recorded as if reported.
  • INFORMATIONAL sf-9864856e2e60 security finding, details recorded privately
Exploratory QA

Three probes on the changed code, all pass: a code-name line collects INFORMATIONAL while a real HIGH lead stays HIGH; CRITICAL, Blocks: yes and a rating noun keep CRITICAL, CRITICAL and HIGH; the prototype bundles with its new import (no live API call).

Eval Results

No prompt, template or judge changed, so paid evals were not run. The selector lists behavior probes only because they import the review parser.

Scope Drift

Scope Check: CLEAN

Documentation

Status: updated. One factual addition to the review collection policy.

Scope: base c2b4f0d to HEAD dea7de7 (3 commits, 8 files: design/prototype.ts, lib/context-bill.ts, lib/review-ledger.ts, test/helpers/providers/gemini.ts, a changelog.d fragment and tests). There were no staged, unstaged or new files outside that set.

Documentation health:

  • docs/review-policy.md: Updated. It now says that a capitalized HIGH, MEDIUM or LOW that names something in the code ("the HIGH branch") collects at INFORMATIONAL, while CRITICAL and Blocks: yes keep blocking (GSTA-711).
  • docs/standalone-binaries.md: Current. The gstack-context-bill --exact description names no model.
  • docs/designs/DESIGN_TOOLS_V1.md: Current (historical design record). Its gpt-4o snippets record the original design, not live reference.
  • changelog.d/fix-model-defaults-and-review-log-severity.md: Current. It describes every user-visible change.

Coverage debt: The --exact-model default (now claude-opus-5-5) is documented only in the CLI usage text. The Gemini fallback model (gemini-4-argon) lives only in a test helper and needs no user documentation. design/prototype.ts is an internal script with no docs.

Diagram drift: none.

Tests
  • Focused tests (the 31 files that import lib/review-ledger.ts, module-size-ratchet, context-bill): 516 pass, 0 fail
  • Full free suite in CI at this head: Free Tests run 44994642386, green (1,745 files)
TODOS

No TODO items completed in this PR.

Agent notes

Agent notes

Fixes GST-3462 items 3 (part) and 5 (parser); GSTA-711. Plan: exempt as a bug fix with failing-first tests.

Approvals

Approved: yes (record r-5fb7b3f2a382). The full approval record stays private.
Plan: exempt: bug fix with failing-first tests (kind=fix, no plan review)
Plan check: exempt bug fix

REVIEW_LOOP: passes=2 blocking_found=6 deferred=1 noted=6 fixed=6 scope=frozen open=2 unbound=1 ledgers_read=4 dispatches=4
Ruled note: p1/adversarial-native#1 at fe6809c ruled by GSTA-36 (relayed from GSTA-794:2026-11-22T07:22:49.482Z) at 2026-11-22T07:22:49.668Z: fixed in 79542ff and confirmed by round 2's Red Team; open only because the round-2 row omitted them. (approval a-11c24559db76)
Ruled note: p1/outside-voice#1 at fe6809c ruled by GSTA-36 (relayed from GSTA-794:2026-11-22T07:22:49.482Z) at 2026-11-22T07:22:49.770Z: fixed in 79542ff and confirmed by round 2's Red Team; open only because the round-2 row omitted them. (approval a-46b6723028e0)
Gate edits: none detected (gate scan tagged 0 hunks)

{
  "schema_version": 1,
  "pr": 4678,
  "head": "fe6809cf9cbacfdab7a701976c405a86e3d99fcd",
  "version": "1.102.2.0",
  "base": "main",
  "gate": {
    "free": {
      "pass": 1745,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "free",
      "run": 44994642386,
      "attempt": 1,
      "tree": "2eec6a9cfcedff3d2a664140e59b3fd3922b376e"
    }
  ],
  "calls": 42,
  "session_kind": "unattended",
  "run": "ship-4678",
  "head_tree": "2eec6a9cfcedff3d2a664140e59b3fd3922b376e",
  "product_patch_id": "3b5b098fb1cb6cc13c2b4b42584ded8294efcd8b",
  "gstack_version": "1.102.2.0",
  "review_depth": {
    "depth": "full",
    "class": "code",
    "runtime_lines": 41,
    "rules": "630fd3101899e28e",
    "base": "7c0659a69fd731e20a9dd3833eb0a6a8aa165bdf",
    "registry": "7c0659a69fd731e20a9dd3833eb0a6a8aa165bdf",
    "gate_scan": {
      "tagged": 0,
      "head": "fe6809cf9cbacfdab7a701976c405a86e3d99fcd"
    },
    "reasons": [
      "risk:money",
      "runtime=41"
    ],
    "risk": [
      "money"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @2eec6a9cfced (8 checks, current for fe6809cf9cba)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44994642386/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=2eec6a9cfced tests=38820 skipped=89 runs=44994642386/1 profiles=ci-reuse/free-tests heads=fe6809cf9cba verified=2026-11-22T07:12:14.076Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "README.md, CONTRIBUTING.md, AGENTS.md, CLAUDE.md and docs/ (155 files); updated docs/review-policy.md"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 6,
    "deferred": 1,
    "noted": 6,
    "fixed": 6,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 4,
    "unbound": 1,
    "dispatches": {
      "specialist": 2,
      "red-team": 2
    }
  },
  "ruled_notes": [
    {
      "finding": "p1/adversarial-native#1",
      "head": "fe6809cf9cbacfdab7a701976c405a86e3d99fcd",
      "by": "GSTA-36",
      "reason": "fixed in 79542ff and confirmed by round 2's Red Team; open only because the round-2 row omitted them.",
      "at": "2026-11-22T07:22:49.668Z",
      "approval": "a-11c24559db76",
      "relayed": "GSTA-794:2026-11-22T07:22:49.482Z"
    },
    {
      "finding": "p1/outside-voice#1",
      "head": "fe6809cf9cbacfdab7a701976c405a86e3d99fcd",
      "by": "GSTA-36",
      "reason": "fixed in 79542ff and confirmed by round 2's Red Team; open only because the round-2 row omitted them.",
      "at": "2026-11-22T07:22:49.770Z",
      "approval": "a-46b6723028e0",
      "relayed": "GSTA-794:2026-11-22T07:22:49.482Z"
    }
  ],
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "money"
    ],
    "rules": "b3f6f8b4843c0c30",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "3b5b098fb1cb6cc13c2b4b42584ded8294efcd8b",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

Open in Capy

…IGH branch as no severity

The design prototype takes its models from design/src/models.ts, an
unreported Gemini model is labelled Gemini 4 Argon, context-bill --exact
counts with Claude Opus 5.5, and a capitalized severity word that names code
in a reviewer's reply collects at INFORMATIONAL.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 22, 2026 06:22
… HIGH, MEDIUM or LOW, and the prototype builds its request with the design binary's helper

Review-Finding: p1/adversarial-native#1 reader=adversarial-native
Review-Finding: p1/outside-voice#1 reader=outside-voice
Review-Finding: p1/adversarial-native#5 reader=adversarial-native
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/adversarial-native#6 reader=adversarial-native
Review-Finding: p1/outside-voice#3 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ed label

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant