Skip to content

v1.93.42.0 fix(stamp): name branch lines by position; carry and finish accept a kept VERSION claim (GST-979, GST-980) - #3889

Merged
capy-ai[bot] merged 7 commits into
mainfrom
gst-979-980-stamp-positions
Nov 3, 2026
Merged

capy-ai[bot] merged 7 commits into
mainfrom
gst-979-980-stamp-positions

Conversation

@garrytan

@garrytan garrytan commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3889,
  "head": "b85e4cef84ce9fe1e4ea33effbfd3ff0161f5472",
  "version": "1.93.8.0",
  "base": "main",
  "session_kind": "unattended",
  "head_tree": "92ce6dafc0e9a4f9334490a83afe5d0f143b9b69",
  "product_patch_id": "9a7bac896f40efe70f0ecd53192a263ca70d1eca",
  "gstack_version": "1.93.10.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 107,
    "rules": "b2272efd321ce7cb",
    "base": "8f08cb76ac63ec9393e382568e30e511e8d70069",
    "registry": "8f08cb76ac63ec9393e382568e30e511e8d70069",
    "gate_scan": {
      "tagged": 0,
      "head": "b85e4cef84ce9fe1e4ea33effbfd3ff0161f5472"
    },
    "reasons": [
      "gate-class",
      "runtime=107"
    ],
    "risk": []
  },
  "pregate": "requires-remote cleared @92ce6dafc0e9 (1 checks, current for b85e4cef84ce)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41508234077/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=92ce6dafc0e9 tests=6321"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "AGENTS.md, CLAUDE.md, README.md, changelog.d/ and docs/ (re-audit at the restored carry-table row: docs/ship-policy.md, docs/troubleshooting.md, the changelog fragment)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 5,
    "deferred": 0,
    "noted": 3,
    "fixed": 4,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 3,
    "unrecorded": 3,
    "ledgers_read": 4,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "c82addff6fb60fa0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "9a7bac896f40efe70f0ecd53192a263ca70d1eca",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}

Why

After GST-963 (#3862), the reviewers found three gaps in the checks that accept a stamp commit.

  1. A base line whose text duplicated a line the branch added got the branch's fork-version bound, so a hand edit of that base copy passed the tree receipt (GST-979).
  2. When a train slot kept its claimed VERSION, a base line moved down to that version also read as a stamp (GST-979).
  3. The /ship receipt carry and finish refused the fork-version row move the restamp now makes (GST-980).

What changed

  • lib/stamp-only.ts: BranchSide carries the positions of the branch's lines, and stampOnlyLine takes the removed line's position. Only a line at a branch-added position gets the fork-version bound. When the version doesn't move, only such a line may change.

  • lib/restamp.ts: parseUnifiedDiff records each removed line's old-side position. The tree receipt, the train checks and finish's stampedFiles pass it along.

  • lib/ship-receipt.ts, lib/ship-bin-common.ts: stampOnlyText and stampedFiles accept a kept VERSION claim for the branch's own rows, and nothing else.

  • bin/gstack-ship-receipt carry: a stamp file can be left out of the product comparison when all of these hold:

    • the branch changed it as product;
    • its only change since the reviewed head is a stamp on its own rows;
    • the base didn't touch it.

    The carry records a stamp on the branch's own rows (<file>) and reads the file line by line. Only lines at the branch's positions may move, and the file must keep its reviewed mode.

  • docs: docs/ship-policy.md gets the carry-table row and the stamp_paths sentence. docs/troubleshooting.md's RECEIPT_CARRY_PRODUCT_CHANGED fix list names the carry case.

Proof

  • On main, 5 of the 7 new tests fail.
  • The other two pass on main, which refuses every such carry: the carry's refusals of a version edit on a base line of the same file, and of a mode change. They fail at fbf83f1 (the first version of this fix) and pass after the round-1 fix 5ffb494.
  • Focused lane at the pin: exit 0.
  • Remote pregate: PREGATE_REMOTE: tree=92ce6dafc0e9 tests=6321 failed=0 spent=0.05 (us-east-a2). The VM was destroyed.

Review

The panel ran as the full gate class, in two rounds. GStack Minder then granted one fix-check on the restored carry-table row under rule 23. It returned NO FINDINGS.

  • Round 1: two floor findings in the GST-980 carry exclusion. A hand edit to a base line of the demoted stamp file was carried, and so was a file mode change. Both are fixed in 5ffb494, with tests.
  • Round 2: nothing at the floor.
  • Targeted reader: the planner printed TARGETED classes=none because the gate scan tags no hunks. The --classes gate reader was hand-rendered and run as one more read-only reader, and it returned NO FINDINGS. No false --gate-tagged count was written.

Open notes (below the floor)

  • INFORMATIONAL bin/gstack-ship-receipt:677: a demoted stamp file that fails ownRows is refused through the fallback reason, which doesn't name the file.

Documentation

Status: current. The re-audit found no documentation edits needed. docs/ship-policy.md's carry row and stamp_paths text match planCarry and cmdCarry, and docs/troubleshooting.md is current. One low-severity coverage gap: the new stampedRows field is documented only through its recorded reason string.

Fixes GST-979, GST-980.

Open in Capy

garrytan and others added 6 commits November 2, 2026 17:29
…kept VERSION claim (GST-979, GST-980)

BranchSide carries the positions of the branch-added lines and stampOnlyLine takes the removed line position, so a base line whose text duplicates a branch line keeps the old-version floor. At equal versions only the branch own lines may move. stampOnlyText and stampedFiles accept a kept claim for those lines, and the carry leaves a stamp file out of the product comparison when its only change since the reviewed head is a stamp on the branch own rows and the base did not touch it. Failing-first: all five new tests fail on main fc292e2.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…e by line at the branch's positions, and keeps its mode)

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>
…-980)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ence already states the carry rule

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…980 sentence already states the carry rule"

This reverts commit f926ccb.
@trunk-io

trunk-io Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions github-actions Bot changed the title fix(stamp): name branch lines by position; carry and finish accept a kept VERSION claim (GST-979, GST-980) v1.93.42.0 fix(stamp): name branch lines by position; carry and finish accept a kept VERSION claim (GST-979, GST-980) Nov 3, 2026
@capy-ai
capy-ai Bot merged commit b42ad1e into main Nov 3, 2026
46 checks passed
garrytan added a commit that referenced this pull request Nov 3, 2026
…aceholders

Rule 19 grant (GStack Minder). #3889's hunks take main's landed version; this PR's own diff is unchanged (same patch-ids against main as against #3889+54606c52).
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