Skip to content

v1.92.17.0 fix(review): pass takes DIFF_BASE from the origin merge base (GST-716) - #3780

Merged
capy-ai[bot] merged 4 commits into
mainfrom
gst-716-dispatch-origin-base
Nov 1, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
gst-716-dispatch-origin-base

Conversation

@garrytan

@garrytan garrytan commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3780,
  "head": "f84db7a7b303ef9f6a0000a662503bad3297e328",
  "version": "1.92.10.0",
  "base": "main",
  "gate": {
    "focused": {
      "pass": 50,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "3a791004c3b34174afda4881f8879d7eb0fa0bcb",
  "product_patch_id": "6641f6f4531d7c806fd7b90968c78f3ad3cb34a6",
  "gstack_version": "1.92.6.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 5,
    "rules": "150435b0a543019a",
    "base": "3f79d816730e8cd3633f31dc20351c0501ad958e",
    "registry": "3f79d816730e8cd3633f31dc20351c0501ad958e",
    "gate_scan": {
      "tagged": 0,
      "head": "f84db7a7b303ef9f6a0000a662503bad3297e328"
    },
    "reasons": [
      "runtime=5<=50"
    ]
  },
  "pregate": "requires-remote cleared @3a791004c3b3 (7 checks, current for f84db7a7b303)",
  "requires_remote": [
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41266514861",
    "pregate.json/remote_gate: remote-gate tree=3a791004c3b3 tests=214 receipt=/home/user/.capy/work/ship-716/remote-gate-receipt.txt sha256=dea8f359e5e1"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "AGENTS.md, CLAUDE.md, CONTRIBUTING.md, README.md, docs/, capy/, ship/ (diff hunks and tree grep)"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 3,
    "deferred": 3,
    "noted": 1,
    "fixed": 0,
    "scope": "frozen",
    "fix_checks": 1,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  }
}

Summary

gstack-review-dispatch pass now takes the readers' diff base from the merge base with origin/<base>, and falls back to <base> only when there is no origin ref. That is the base gstack-review-plan scores and the base the targeted reader's render check already demanded. Both call sites now share one mergeBaseWith helper.

GST-716 before/after: review pass diff base with a stale local main

Why

GST-716 (GSTA-226): when the local <base> branch lagged origin/<base>, the plan sized the review on the origin diff, but every brief named the stale local merge base. Readers then reviewed upstream commits the branch only inherited. GSTA-226 paid about 12,400 credits for readers going through 78 upstream files. The /ship run for this PR hit the same bug on the installed gstack. Its first pass got 76 files instead of 3, because this checkout's local main is 4eff47c and origin/main is 3f79d81.

Proof, failing first. test/review-dispatch-origin-base.test.ts builds a clone whose local main lags origin/main. On main it fails, because the manifest's diff_base is the local merge base and not the origin one. With the fix it passes, and every rendered brief names the origin merge base.

Blast radius

bin/gstack-review-dispatch only. When local <base> matches origin/<base> the two merge bases are the same, so nothing changes. --diff-base and the scoped fix-range base still take precedence. It adds no network calls, environment reads, permission changes, workflow edits or dependencies.

Approvals

None needed. This is an audited bug fix under the fix-lane exemption, assigned by GStack Minder (GSTA-36), who said to build it on main after #3766 merged. GStack Minder also granted a third Step 14.5 docs-audit launch, because the second one failed at launch on an install-verdict path.

Pre-Landing Review

Pre-Landing Review: 4 issues — 0 fixed, 3 deferred, 1 noted

Gate edits: none detected

Deferred findings

The cross-family outside voice raised three blocking findings, all in code this PR doesn't change. It could see them because pass 1 ran on the old dispatcher and read the stale range. None is reproduced. GStack Minder routed them to GSTA-213 as GST-738 and kept them off the public tracker, because two of them describe ways to get past the secrets scan.

  • Deferred: GST-738. CRITICAL lib/pregate/checks/secrets.ts:75: the whole-file eligibility check trusts unverified working-copy context.
  • Deferred: GST-738. CRITICAL lib/redact-patterns.ts:732: the string lexer ends a triple-quoted f-string at an interpolated delimiter.
  • Deferred: GST-738. CRITICAL lib/review-pass.ts:89: a scoped Red Team ignores an explicit --diff-base override.

Review notes

  • INFORMATIONAL bin/gstack-review-dispatch:172: this /ship's pass 1 ran on the installed pre-fix dispatcher, so its readers got the stale local merge base. The range was a superset, so nothing was missed. The adversarial reader checked the 3-file diff directly.
  • After review, the remote pregate failed one check, the test-of-test ratchet, because the new test named its binary only through a variable. f84db7a names bin/gstack-review-dispatch literally. The fix-check came back with no findings.

Documentation

Status: current. The docs already match the change, so nothing was edited.

Scope: the diff from base 3f79d81 to HEAD f84db7a (bin/gstack-review-dispatch, test/review-dispatch-origin-base.test.ts, changelog.d/gst-716-dispatch-origin-base.md). Nothing was staged, unstaged or untracked. gstack-review-dispatch pass now takes the readers' diff base from the merge base with origin/<base>, falling back to <base>. No public surface changed.

Documentation health:

  • docs/review-policy.md: Current (it already says reviewers read against the merge base)
  • review/SKILL.md.tmpl, review/sections/review-army.md: Current (they already use git merge-base origin/<base> HEAD)
  • ship/sections/review-army.md.tmpl, ship/sections/adversarial.md.tmpl, ship/DRIVER.md.tmpl: Current

Coverage debt: none. No new commands, flags or environment variables. Diagram drift: none.

garrytan and others added 4 commits November 1, 2026 02:22
…GST-716, failing first)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…plan and targeted check do (GST-716)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…st-of-test ratchet)

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

trunk-io Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions github-actions Bot changed the title fix(review): pass takes DIFF_BASE from the origin merge base (GST-716) v1.92.17.0 fix(review): pass takes DIFF_BASE from the origin merge base (GST-716) Nov 1, 2026
@capy-ai
capy-ai Bot merged commit 3f1741d into main Nov 1, 2026
62 checks passed
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