Skip to content

Clearer errors for GitHub email-privacy pushes, approval refusals and bisect case names - #4748

Merged
capy-ai[bot] merged 5 commits into
mainfrom
clearer-push-approval-and-bisect-errors
Nov 23, 2026
Merged

capy-ai[bot] merged 5 commits into
mainfrom
clearer-push-approval-and-bisect-errors

Conversation

@garrytan

@garrytan garrytan commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

/ship now tells you to fix your commit email when GitHub refuses a push with GH007, instead of sending you into a pointless merge; gstack-approvals says which --owner-ref check failed; and the merge queue's bisect accepts a red judge case whose name has a space.
Why: three small, plainly correct fixes from outside reports (#4738, #4718 with #4720, #4724 for #3580), taken as one batch.
Nothing to do.

What changed
Why

"/ship reported this as a non-fast-forward rejection instead. That points to pulling or rebasing, which doesn't fix it." (#4738). Users with GitHub's email privacy setting on now get the one change that works, approval refusals name the flag to fix, and a red judge case can be bisected.

Blast radius

lib/ship-release.ts changes only which stop line a failed git push prints; the push, its guards and the PUSH: reason codes are unchanged (file:line read at lib/ship-release.ts:836-842, and the push tests drive a real bare origin with a declining pre-receive hook). crew/scripts/train-gate.ts (run by evals.yml) now imports the same CASE_ID regex it defined before, so its accepted ids don't change; the full free suite passed in CI run 45231787731.

Security table (one row per fix)
Fix Source Taken how Touches CI, install, deps, network, spawning, eval, auth, binaries or agent-loaded Markdown? Read
GH007 push refusal issue #4738 written here No. Changes only the stop line a failed git push prints. The quoted remote reason passes through the secret scanner and is withheld when it can't be redacted. Its test adds a pre-receive hook to its own temp bare origin. ours, plus the full review panel
Approval refusals PR #4720 rebuilt with Co-authored-by credit; outside branch never fetched Message text in bin/gstack-approvals only; its tests add a fixed-argument git commit with a timeout. The second-model read caught that the outside version echoed the rejected ref into stderr; this rebuild does not. ours + GPT-6.2 Sol
Bisect case ids PR #4724 rebuilt with Co-authored-by credit; outside branch never fetched Yes: crew/scripts/train-gate.ts runs in evals.yml. Its accepted ids do not change; the merge queue's bisect now accepts the space the other two already did. ours + GPT-6.2 Sol
Test Coverage

Each fix has a test that failed on main first: the GH007, protected-branch, redacted-reason and plain-decline cases in test/ship-release.test.ts; four --owner-ref refusal tests in test/approval-record.test.ts; three redCasesOutsidePlan tests in crew/test/ship-queue-train-logic.test.ts.
Coverage: 14 of 15 new paths tested at pass 1; the remaining [remote rejected] fallback got its test in the review fix. Tests ran: tests 1778 files (CI run 45231787731).

Pre-Landing Review

Two review passes on the full panel plus a second-model voice. Pass 1 found two blockers in the push message code, both fixed: matching GH007 and non-fast-forward anywhere in stderr (a branch name could trigger it), and one security finding, details recorded privately. Pass 2 read the fix range and found nothing blocking. Second-model review (GPT-6.2 Sol): completed.

Review notes

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

  • INFORMATIONAL security finding, details recorded privately
  • INFORMATIONAL lib/ship-release.ts:840 No test covers the withheld-reason branch.
  • INFORMATIONAL red-team finding, details recorded privately
  • Low: the GH007 rebase advice covers every commit since the base; a narrower rewrite of only the private-email commits is a possible follow-up.
Issues

Fixes #3580
Fixes #4718
Fixes #4738
Refs #4720
Refs #4724
Related: #4720 (@Barack-zero-to-one)
Contributed by @Barack-zero-to-one
Related: #4724 (@Barack-zero-to-one)
Contributed by @Barack-zero-to-one

TODOS

No TODO items completed in this PR.

Documentation

Status: current. Documentation already matches this change, so no edits were made.

Scope: 14 committed files from c4cfe6d to 8f211c9 (5 commits); nothing staged, unstaged or untracked. Audited the docs these changes touch: the approval-record and push-rejected entries in docs/troubleshooting.md and the push line in docs/unattended.md.

Documentation health

File Status
docs/troubleshooting.md Current: the branch updates APPROVAL_RECORD_INVALID (separate --owner-ref shape, --words and --by refusals) and PUSH_REJECTED (GH007 noreply fix, quoted remote reason) to match the code
docs/unattended.md Current: the push-line description of PUSH_REJECTED still holds

Coverage debt: none new. The --owner-ref shape is documented in troubleshooting and gstack-approvals --help. The push refusals are documented in troubleshooting. The bisect case-id change is internal.

Diagram drift: none.

Tests
  • bun test test/ship-release.test.ts -t push: 14 pass, 0 fail
  • bun test test/approval-record.test.ts: 53 pass, 0 fail
  • bun test crew/test/ship-queue-train-logic.test.ts crew/test/release-gate.test.ts crew/test/train-gate.test.ts crew/test/ship-queue-train-bisect.test.ts: pass
  • Free suite in CI run 45231787731: green
Agent notes

Owner thread: GSTA-827 (small-fix wave 2026-11-23, Captain GStack Minder GSTA-36). Outside PR handling under R45: #4720 and #4724 read as text by our reviewer and GPT-6.2 Sol before anything was fetched; both rebuilt.

Approvals

No approvals recorded for branch clearer-push-approval-and-bisect-errors.
Plan: exempt: bug fixes (R4: bug fixes need no plan review; each fix has a failing-first test)
Plan check: exempt bug fix

REVIEW_LOOP: passes=2 blocking_found=2 deferred=0 noted=7 fixed=5 scope=frozen ledgers_read=3
Gate edits: none detected (0 listed, 0 read)

{
  "schema_version": 1,
  "pr": 4748,
  "head": "8f211c97d0c22662256e98d6b003969504753ea6",
  "version": "1.103.0.0",
  "base": "main",
  "gate": {
    "tests": {
      "pass": 1778,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "tests",
      "run": 45231787731,
      "attempt": 1,
      "tree": "6a5f8816614e5afc6e9d27c38f7a032d65df4631"
    }
  ],
  "calls": 30,
  "session_kind": "unattended",
  "run": "/home/user/.capy/work/ship-4748",
  "head_tree": "6a5f8816614e5afc6e9d27c38f7a032d65df4631",
  "product_patch_id": "9632ec7d6767eb9cd8755ede7247004023b2630f",
  "gstack_version": "1.103.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 49,
    "rules": "33831f8248a814fd",
    "base": "b5eb401e450bdf73059296c303cb5fc3391a060e",
    "registry": "b5eb401e450bdf73059296c303cb5fc3391a060e",
    "gate_scan": {
      "tagged": 0,
      "head": "8f211c97d0c22662256e98d6b003969504753ea6"
    },
    "reasons": [
      "gate-class",
      "risk:security",
      "runtime=49"
    ],
    "risk": [
      "security"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @6a5f8816614e (8 checks, current for 8f211c97d0c2)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/45231787731/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/45231787731/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/45231787874/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=6a5f8816614e tests=39260 skipped=90 runs=45231787731/1 profiles=ci-reuse/free-tests heads=8f211c97d0c2 base_moved=b5eb401e450b verified=2026-11-23T18:12:30.270Z"
  ],
  "issues": {
    "fixes": [
      3580,
      4718,
      4738
    ],
    "refs": [
      4720,
      4724
    ],
    "flakes": [],
    "related": [
      {
        "pr": 4720,
        "author": "Barack-zero-to-one",
        "closes": [
          4718
        ],
        "credit": true
      },
      {
        "pr": 4724,
        "author": "Barack-zero-to-one",
        "closes": [
          3580
        ],
        "credit": true
      }
    ]
  },
  "docs": {
    "status": "current",
    "scope": "docs/ and README.md (troubleshooting.md and unattended.md read against the change)"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 2,
    "deferred": 0,
    "noted": 7,
    "fixed": 5,
    "scope": "frozen",
    "rounds": 2,
    "ledgers_read": 3
  },
  "gate_dispositions": []
}

garrytan and others added 3 commits November 23, 2026 16:23
#4738)

A push GitHub declines with GH007 was read as a non-fast-forward because any output holding "rejected" matched, which sent users into a pointless merge and a rerun of Steps 5-16. GH007 now gets its own stop line (use the noreply email and rewrite the commit), other remote refusals quote the remote's reason, and only a real non-fast-forward gets the merge route. The PUSH line keeps PUSH_REJECTED for all three.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
rule and round-grant tested the ref's shape, --words and --by in one condition and printed one sentence for all of them, and every invalid-record refusal ended by pointing at add's flags. Each check now prints its own line, the shape refusal states what a valid ref looks like without repeating the rejected value, and the fix clause names no other command. Rebuilt on main from #4720.

Co-authored-by: Barack-zero-to-one <[email protected]>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Bisect's own case id check left out the space that the release bisect and the CI route already allow, so a red judge case such as 'setup-browser-cookies/SKILL.md workflow' was refused as outside the gate's plan. The three checks now share one CASE_ID rule. Rebuilt on main from #4724.

Co-authored-by: Barack-zero-to-one <[email protected]>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits November 23, 2026 17:36
… through the secret scanner

GH007 and non-fast-forward now match only git's remote error and ref status lines, so a branch name containing those words can't pick the wrong advice; a GH-coded remote line is preferred over a trace line; the quoted reason is redacted, or withheld when it can't be; and the GH007 advice covers every commit, not just the last.

Review-Finding: p1/outside-voice#1 reader=outside-voice
Review-Finding: p1/outside-voice#2 reader=outside-voice
Review-Finding: p1/adversarial-native#1 reader=adversarial-native
Review-Finding: p1/adversarial-native#3 reader=adversarial-native
Review-Finding: p1/specialist-batched#1 reader=testing
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>
@capy-ai
capy-ai Bot marked this pull request as ready for review November 23, 2026 18:15
@capy-ai
capy-ai Bot merged commit 100e109 into main Nov 23, 2026
62 of 63 checks passed
@garrytan garrytan mentioned this pull request Nov 24, 2026
capy-ai Bot added a commit that referenced this pull request Nov 24, 2026
- `/ship` now tells you what to change when GitHub refuses a push for email privacy. (#4748)
- The release gate's /cso check accepts the low-confidence hypotheses /cso now reports. (#4753)
- /cso reports every security finding the code supports instead of dropping most of them. (#4739)
- /cso can search the whole repository in one call, and a daily report now lists its low-confidence hypotheses. (#4742)
- A first version's plan and try-it message now open with the owner's own words, and the build is tried the same way he will try it before he is asked. (#4759)
- A first version's public export now keeps out the owner's short quotes and his reasons to leave something out, and a phone first-use check installs a build the cloud phone can actually run. (#4772)
- Three intermittent test failures are fixed. (#4745)
- Free Tests runs its shards on 8-core runners again. (#4749)
- A land that waits on an earlier CI run now decides on what that run actually did. (#4763)
- Landing a PR no longer starts a new CI run when one for the same merged code is already running or has passed. (#4760)
- /ship no longer misses a file-mode change from main on files whose names start with `:`. (#4774)
- make-pdf keeps quotes in alt text, link titles and raw HTML attributes inside the attribute, so a Markdown file can no longer add an `onerror`, `onload` or `javascript:` link that runs in the print browser. (#4761)
- Posting a PR body that lists earlier /ship runs no longer stops for a phone number that isn't there. (#4747)
- A first version's public export now catches a short owner quote whose padding or quote marks are encoded. (#4778)
- A first version's public export now also keeps out a short owner quote written with spaces just inside its quote marks. (#4776)
- Posting a PR body that lists earlier /ship runs no longer stops for a card number that isn't there. (#4751)
- /ship no longer asks for an extra reader when you merge the base branch next to code that was already reviewed. (#4754)
- /ship no longer plans narrow re-checks after a fix. (#4741)
- /ship can't quietly gain new refusals. (#4740)
- `gstack-upgrade` no longer refuses to run after you disable skills. (#4743)
- The free test suite splits its shards from this week's recorded test times. (#4744)
- gstack now writes up a failed or shelved attempt before closing it. (#4735)

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

1 participant