Skip to content

v1.91.360.0 fix: a PR's changelog.d fragment no longer forces the full paid gate (GST-400) - #3674

Merged
capy-ai[bot] merged 6 commits into
mainfrom
gst-400-fragment-selector
Oct 31, 2026
Merged

capy-ai[bot] merged 6 commits into
mainfrom
gst-400-fragment-selector

Conversation

@garrytan

@garrytan garrytan commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3674,
  "head": "bb00dbfe95a204928192888f9fad7a6c80b1c036",
  "version": "1.91.354.0",
  "base": "main",
  "gate": {
    "selector": {
      "pass": 54,
      "fail": 0,
      "skip": 0
    }
  },
  "session_kind": "unattended",
  "head_tree": "6ed1e9f59b4126714d14c1e2ce8eb3375ce415c7",
  "product_patch_id": "2db3ff632964fbfab22be24d7ec3d3f504e6e0cd",
  "gstack_version": "1.91.354.0",
  "review_depth": {
    "depth": "light",
    "class": "code",
    "runtime_lines": 12,
    "rules": "1ef4ba88e39e688c",
    "base": "99706a47bb683cb46ef11ae2262a42355e14f14a",
    "registry": "99706a47bb683cb46ef11ae2262a42355e14f14a",
    "gate_scan": {
      "tagged": 0,
      "head": "bb00dbfe95a204928192888f9fad7a6c80b1c036"
    },
    "reasons": [
      "runtime=12<=50"
    ]
  },
  "pregate": "requires-remote cleared @6ed1e9f59b41 (1 checks, current for bb00dbfe95a2)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/41184759496",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/41184761354",
    "pregate.json/remote_gate: remote-gate tree=6ed1e9f59b41 tests=3164"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, README.md, CONTRIBUTING.md, CLAUDE.md, AGENTS.md and changelog.d/ against the selector change"
  },
  "review_loop": {
    "passes": 3,
    "blocking_found": 0,
    "deferred": 0,
    "noted": 3,
    "fixed": 1,
    "scope": "frozen",
    "fix_checks": 2,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  }
}

What changed

A PR whose only change is its changelog.d fragment no longer restores every paid gate case (113 probes, 24 judges) at the PR screen.

A PR whose only change is its changelog.d fragment no longer restores every paid gate case at the PR screen.

Before/after as text: A PR whose only change is its changelog.d fragment no longer restores every paid gate case (113 probes, 24 judges) at the PR screen.
--- Before · before.txt · captured output
+++ After · after.txt · captured output
+$ bun run eval:select   # this branch; PR diff = changelog.d/demo-fix.md only
+Profile: pr (pr)
-$ bun run eval:select   # main today; PR diff = changelog.d/demo-fix.md only
-Profile: pr (full-fallback)
 Changed files: 1
+Behavioral probes: none
+Quality judges: none
-Behavioral probes: 113 selected (every gate case)
-Quality judges: 24
 

Why

GST-400, found on #3668: since v1.91.342.0 every PR records its CHANGELOG entry as a changelog.d/<slug>.md fragment, and the PR eval selector read each fragment as an unknown dependency, so it fell back to the full gate on every PR and saved nothing. Fragments now count as having no eval dependents, so a PR's selection depends on its real changes again.

Blast radius

The change narrows one exemption in knownNonBehaviorFile (scripts/test-pr-profile.ts) and makes getChangedFiles (test/helpers/test-selection.ts) list a rename's old path. Both can only remove a needless full fallback or add selections, never drop a case a touchfile maps. The exemption covers only .md files directly in the policy's fragments folder, and selectTests still selects a case whose touchfile names a fragment. Script ran: test/test-pr-profile.test.ts and test/changed-files-union.test.ts both failed before the fix and pass after it, and the remote pregate's selected files passed at this tree (129 files, 3164 tests, 0 failed; not the complete free tier).

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-31 Approve the plan "Plan: /ship re-review false triggers (GST-407, GST-384, GST-391) + eval selector fragments (GST-400)" (autoplan run autoplan-20261031063100, 4 decisions) “Answer for autoplan-20261031063100 gate_rev 2: rec. That covers A1, B1, C1 and D1, and it's my call as Captain under the fix-lane exemption, the same way GST-380 was handled. Decision 5: agreed. Decision 6: split approved (PR A for GST-407/384/391, PR B for GST-400), and I'm the…” (GStack Minder (Captain, fix-lane exemption), relayed by agent:jam_01M68A3Q3474STK2VM8MSCTFGE) approved the reviewed plan (sha256 82461d8c9301), every recommendation taken none
2026-10-31 Spend: build both PRs, /ship, READY, trial merge against #3662 “$16 is inside your $120 cap. Build both, /ship, READY. Do the trial merge against #3662 before READY.” (GStack Minder) approved spend up to the $120 lane cap none

Source: gstack-approvals record for gst-400-fragment-selector (display only; not an approval citation).

Summary

The PR eval selector ran the full paid gate on every PR because each PR's changelog fragment looked like an unknown file. Now a .md file directly in changelog_fragments.dir (read from .gstack/ship-policy.json) has no eval dependents. Review then narrowed the exemption to that one folder level and file type, and made changed-file lists keep a rename's old path, so moving a file into changelog.d/ or docs/ cannot hide the code it came from from the PR eval selector (ready --screen still lists only the new path at lib/ship-queue-train-ready.ts:94; see Review notes). The two shared-harness files are recorded as non-behavioral in scripts/harness-version.json, and the paid/free boundary test's audited hash for test-selection.ts is re-pinned after a re-audit of its computed import.

Test Coverage

All new code paths have test coverage. Coverage: deterministic (the changed runtime file has a changed test naming it; no audit reader).
Regression proof: the fragment, other-files-in-folder and rename assertions each failed on the code before the fix and pass after it.
Tests ran: selector 54
Tests ran: typecheck count unavailable

Pre-Landing Review

Pass 1: one INFORMATIONAL test-gap (an assertion that could not fail) was auto-fixed. The native adversarial pass found two FIXABLE items: the exemption covered any file at any depth under a head-read folder, and renames hid their old path. Both were fixed with failing-first tests. Pass 2 (scoped) found nothing at the blocking floor. Pass 3 covered the hash re-pin only (a fix-check and the adversarial pass, no findings).
REVIEW_LOOP: passes=3 blocking_found=0 deferred=0 noted=3 fixed=1 scope=frozen fix_checks=2 dispatches=4
Gate edits: 2 listed, 2 read, 0 findings. The test/paid-free-boundary.test.ts hash re-pin follows a re-audit: the computed import it excludes is unchanged, and the pin still fails closed on any other edit. test/helpers/test-selection.ts gains --no-renames, which widens selection.
Outside review: not run (code class, no numeric claims; the review plan skips it).
Collector note: the pass-3 adversarial output said "nothing to sort into FIXABLE", and the collector parsed that phrase as a CRITICAL label. The judge cannot downgrade it, so merged.jsonl carries one spurious CRITICAL. The reader reported no findings.

Review notes

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

  • INFORMATIONAL scripts/harness-version.json:53 nonBehavioral notes for test-selection.ts and test-pr-profile.ts share one sentence that names both changes; each file holds only one.
  • INFORMATIONAL lib/ship-queue-train-ready.ts:94 ready --screen builds its own changed-file list without --no-renames or core.quotePath=false, so a rename into changelog.d/ or docs/ still hides the old path from the PR screen (train gate census still catches it).
  • INFORMATIONAL scripts/test-pr-profile.ts:76 changelog_fragments.dir is read from the PR head without lib/ship-policy.ts validation; a '.' value (not used today) would exempt every root .md file.

Exploratory QA

Parent CLI probes, run as a smoke check (QA method files were not loaded). On main, a PR whose diff is only a fragment selects pr (full-fallback): 113 behavioral probes and 24 judges. On this branch, the same diff selects pr (pr) with no cases. A branch that also edits a skill template still selects as before.

Eval Results

No separate PR eval run. scripts/test-pr-profile.ts is a full-gate input, so the train's gstack/full-gate provides the paid evidence for this change.

Plan Completion

Plan: autoplan-20261031063100 (gate_rev 2, APPROVED), item D1 (GST-400): done. Items A1-C1 ship in the companion PR for GST-407/384/391.

TODOS

No TODO items completed in this PR.

Documentation

Status: current. No documentation edits were needed and no blockers were found.

Scope: base a77fae2 to head ec82fe3 on gst-400-fragment-selector, with nothing staged, unstaged or untracked. The diff touches the changelog fragment, scripts/test-pr-profile.ts, test/helpers/test-selection.ts, scripts/harness-version.json and two test files. Mode: edit.

Documentation health:
changelog.d/gst-400-fragment-selector.md [Current] (matches the diff)
changelog.d/README.md [Current]
docs/ship-policy.md [Current] (changelog_fragments.dir resolves to changelog.d)
docs/TESTING_INTERNALS.md [Current] (relevant passage read, no contradiction)
CONTRIBUTING.md [Current] (relevant passage read)
docs/TEST_PORTFOLIO.md [Current] (relevant passage read)
CHANGELOG.md [Not audited for edits] (protected in ship-owned mode)
TODOS.md [Not audited] (protected in ship-owned mode)

Documentation coverage:
changelog.d fragment exemption [reference: partial (fragment and ship-policy only)] [how-to: no] [tutorial: no] [explanation: no]

Documentation debt: the TESTING_INTERNALS fallback label list does not mention that .md files directly in changelog.d/ have no eval dependents. A one-line reference note would close it.

Diagram drift: none; no diagrams reference the changed code.

Test plan

  • bun test test/test-pr-profile.test.ts test/changed-files-union.test.ts test/harness-version.test.ts test/paid-free-boundary.test.ts: 54 pass, 0 fail
  • bun run typecheck: exit 0
  • Remote pregate (Ubicloud, selected files, tree 6ed1e9f5): 129 files, 3164 tests, 0 failed
  • Free Tests run 41184759496 and Windows Free Tests run 41184761354 at bb00dbf: success

garrytan and others added 6 commits October 31, 2026 06:45
…T-400)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ction, not a hardcoded input

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…(selection only, GST-400)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ly in the folder; rename lists keep the old path)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…es; computed import unchanged, repin its hash

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

trunk-io Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions github-actions Bot changed the title fix: a PR's changelog.d fragment no longer forces the full paid gate (GST-400) v1.91.360.0 fix: a PR's changelog.d fragment no longer forces the full paid gate (GST-400) Oct 31, 2026
@capy-ai
capy-ai Bot merged commit 5276afe into main Oct 31, 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