Skip to content

Open pull requests with three plain lines and land each one as a single commit (GST-2737) - #4438

Merged
capy-ai[bot] merged 8 commits into
mainfrom
gst-2737-plain-pr-bodies
Nov 17, 2026
Merged

capy-ai[bot] merged 8 commits into
mainfrom
gst-2737-plain-pr-bodies

Conversation

@garrytan

@garrytan garrytan commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

/ship now opens pull requests with at most three plain lines, folds every other section, and every merge lands as one commit titled with the PR title.

Why: people outside the project read PRs and the commit log to judge it, and long bodies full of in-house words hid what changed.

Nothing to do: PRs opened before 2026-11-18 only get warnings; a repository without .gstack/plain-titles.json sees no refusals.

What changed
  • Folded bodies. gstack-post turns each ## section into a collapsed <details> section when it posts, and puts Agent notes last. gstack-post fold --body-file F prints the folded body without posting it (new lib/pr-body-shape.ts).
  • A check on the opening. In a repository with .gstack/plain-titles.json, gstack-post, gstack-plain-title check --body-file and the Plain title workflow refuse a body that shows more than three lines or 600 characters before its first fold, or uses a listed in-house word above Agent notes (PLAIN_BODY_REFUSED). Comments only get warnings. body_since keeps older PRs to warnings.
  • One commit per merge. Every gstack-ship-queue land path (direct, queued and stacked) passes the subject <title> (#n) and a body made of the PR's opening lines plus every distinct Co-authored-by: and other branch trailer (new lib/squash-message.ts). --body-file replaces the opening and --dry-run prints the message. Commits of a stacked parent that already landed are left out. A high-severity secret finding in the message refuses the land.
  • Release and repair PRs use the same shape. A release PR's commit body is its Release notes section, one plain line per change with its PR.
  • Two policy settings, both refused by older gstack: history: no-rewrite (squash only, check-history --plan rebase refused) and land.merge_commit_paths (keep a merge commit for PRs that touch those paths).
  • /ship templates write What changed, Tests and Agent notes instead of Summary and Test plan. New guide: docs/writing-prs.md.
Blast radius

Every repository that ships with gstack gets the folded bodies and the commit message on land. Refusals apply only where .gstack/plain-titles.json exists. The two policy settings are opt-in and need min_gstack_version at the release that adds them.

Tests
  • New: test/pr-body-shape.test.ts, test/squash-message.test.ts.
  • Updated: gstack-post, plain-title, ship publication gates, prose-lint, the three merge paths, release body, ship-policy no-rewrite, policy floor tests.
  • Added during review: an older or exempt PR only gets warnings about its opening; Dependabot branches are exempt; a broken policy file still lets comments post; re-posting a folded body replaces each section once; file names in the body don't count as prose. Each of the last two tests failed before its fix.
  • The free test suite passed in CI at this head (Free Tests run 44084192476, 1681 files), with the macOS and Windows jobs green. bun run typecheck is clean.
Documentation

Status: updated. Two factual fixes, no blockers.

Scope: this branch's changes from e9f38d6 to 708fd45 (46 committed files, nothing staged, unstaged or untracked). It covers the new PR body shape (three plain lines, folded sections), the one-commit merge subject and body, history: no-rewrite, land.merge_commit_paths, and gstack-post fold. I checked the docs against lib/plain-title.ts, lib/pr-body-shape.ts, lib/gstack-post.ts, lib/ship-policy.ts, lib/squash-message.ts and bin/gstack-ship-queue.

Documentation health:

  • README.md: current. The /ship row links to writing-prs.md.
  • docs/writing-prs.md: current. New page; its limits, word list, commands and settings match the code.
  • docs/ship-policy.md: current. The history, land and plain-title rows match the policy validator.
  • docs/troubleshooting.md: updated. The prose-lint section now names ## What changed instead of ## Summary; PLAIN_BODY_REFUSED is current.
  • docs/skills.md: updated. The PR body section now describes three plain lines, folded sections and the What changed / Tests sections, and its prose-lint --sections example matches the template.
  • changelog.d/plain-pr-bodies.md: current. Read only, not edited.

Coverage debt: gstack-post fold and the commit message that land writes have reference and how-to coverage in writing-prs.md, plus troubleshooting for PLAIN_BODY_REFUSED. There is no tutorial, which is a common gap, not a critical one. Diagram drift: none found.

Agent notes

Closes GST-2737.
Captain go 2026-11-17 (GSTA-36); gate answers A1, B1, C1 to G1, H1, I1, J1.
Policy key versions are set to 1.100.0.0 ahead of the release that ships them.
Main merged in once under the Captain's rule-13 grant (8d949f6): the only conflict was the lib/gstack-post.ts import block after #4365 landed, resolved as the union of both import lists; this PR's own lines are unchanged.

Pre-Landing Review: 21 issues — 7 fixed (5 in round 1, 2 in the granted fix-check), 0 asked, 0 deferred, 14 noted (5 of them ruled notes by the Captain at 3c4e3ca)
Gate edits: none detected (56 listed, 43 read; patterns: RH-1,RH-3,RH-4,RH-12,RH-13,RH-14,RH-15,RH-16; unlisted idioms: none)
Second-model review (GPT-6.1 Sol): 3 findings; 1 fixed (folded re-post duplicated sections), 2 ruled notes.
Tests ran: test 1681 (carried from Free Tests run 44084192476)

Review notes (below the blocking floor, not fixed here):

  • .github/PULL_REQUEST_TEMPLATE.md:7: the template opens with an HTML comment and a heading, so a body filled from it fails the opening check.
  • crew/lib/ship-queue-train-land.ts:150: the wait-on-unreadable-PR guard in train land has no test.
  • lib/gstack-post.ts:657: the plainPolicy doc comment still says an invalid policy always refuses; comments now post with a note.
  • ship/sections/pr-body.md.tmpl:185: bare file names in a Tests line could trip the word list; now skipped by the path mask.
  • test/release-stamp.test.ts: 4 cases hit Bun's 5 s limit under parallel local load; CI's free suite passed them.
  • lib/plain-title.ts:74: the default word list also applies to titles from since (2026-11-08), with no body_since grace.
  • lib/pr-body-shape.ts:22: an unquoted <details in prose opens a fold that never closes.
  • lib/gstack-post.ts:724: unfolding the incoming body lifts a hand-written <details> block inside a ## section out as its own section; nothing is lost.
  • lib/pr-body-shape.ts:128: the path mask also lets a listed word through when prose joins it with a slash.
    Ruled notes (Captain GStack Minder, GSTA-36, at 3c4e3ca: "none meets the blocking floor"):
  • lib/pr-body-shape.ts:141: shape diagnostics print at most 80 characters of the PR's own body before the secret scan.
  • bin/gstack-plain-title:110: the CI body check folds ## sections before checking, so a hand-posted unfolded body passes.
  • lib/squash-message.ts:75: a personal email in a Co-authored-by line goes into the merge commit unchecked, as GitHub's own squash does.
  • lib/ship-queue-land.ts:361: the --body-file override is not saved in the resumable merge journal.
  • crew/lib/ship-queue-train-land.ts:150: an unparsable gh pr view reply fails the slot instead of waiting.

REVIEW_LOOP: passes=2 blocking_found=3 deferred=0 noted=5 fixed=7 scope=frozen fix_checks=1 dispatches=8

Approvals

Approved: yes (record r-5ea97d0cf8f3). The full approval record stays private.
Plan: approved (record r-3508ce831c19)
Plan check: approved (record r-3508ce831c19)

{
  "schema_version": 1,
  "pr": 4438,
  "head": "8d949f6dcbbd277e3b4ef41acfd17b5aa3bc5e9c",
  "version": "1.99.5.0",
  "base": "main",
  "gate": {
    "test": {
      "pass": 1681,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "test",
      "run": 44084192476,
      "attempt": 1,
      "tree": "51f11da18f0e578cc68e2896f504d43e2cb24a8d"
    }
  ],
  "session_kind": "unattended",
  "run": "ship-4438-aa3d27f",
  "head_tree": "51f11da18f0e578cc68e2896f504d43e2cb24a8d",
  "product_patch_id": "fbd44cb0037f1fe3d96bbf2183671e7260235580",
  "gstack_version": "1.99.5.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 658,
    "rules": "66e5174161eecc2c",
    "base": "ab114c53080a103aa7ba2b2f7f2e07085f8e34a7",
    "registry": "ab114c53080a103aa7ba2b2f7f2e07085f8e34a7",
    "gate_scan": {
      "tagged": 1,
      "head": "8d949f6dcbbd277e3b4ef41acfd17b5aa3bc5e9c"
    },
    "reasons": [
      "gate-class",
      "risk:security",
      "runtime=658"
    ],
    "risk": [
      "security"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @51f11da18f0e (8 checks, current for 8d949f6dcbbd)",
  "requires_remote": [
    "free-tests.yml/cso-macos-launcher: https://github.com/garrytan/gstack/actions/runs/44084192476/attempts/1",
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/44084192476/attempts/1",
    "windows-smoke.yml/windows-smoke: https://github.com/garrytan/gstack/actions/runs/44084192441/attempts/1",
    "pregate.json/remote_gate: remote-gate tree=51f11da18f0e tests=37485 skipped=106 runs=44084192476/1 profiles=ci-reuse/free-tests heads=8d949f6dcbbd verified=2026-11-17T13:02:21.874Z"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/, README.md, CONTRIBUTING.md, AGENTS.md against the branch's PR body, merge message and policy changes"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 3,
    "deferred": 0,
    "noted": 5,
    "fixed": 7,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 3,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "8811fd300bf305f0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "fbd44cb0037f1fe3d96bbf2183671e7260235580",
    "status": "done",
    "findings": 1,
    "raised_by": "targeted"
  }
}

Open in Capy

garrytan and others added 4 commits November 17, 2026 08:46
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…titled commit

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>
… change

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

trunk-io Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 4 commits November 17, 2026 11:49
… comments posting

The opening check now follows the same date and branch exemption as the rest of the body check, Dependabot branches are exempt, the exemption only counts for branches in this repository, a merge that cannot read the PR waits instead of refusing, and a broken policy file no longer stops comments.

Review-Finding: p1/specialist-batched#1 reader=testing
Review-Finding: p1/specialist-batched#2 reader=testing
Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#4 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…s through the word check

Posting an already-folded body now replaces each section once instead of keeping the old copy beside it, and listed words inside file paths or file names, such as a test file in the Tests section, no longer count as prose.

Review-Finding: v2/outside-voice#3 reader=outside-voice
Review-Finding: v2/adversarial-native#2 reader=adversarial-native
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ose lint help

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>

# Conflicts:
#	lib/gstack-post.ts
@capy-ai
capy-ai Bot merged commit c53b15c into main Nov 17, 2026
57 checks passed
@garrytan garrytan mentioned this pull request Nov 17, 2026
capy-ai Bot added a commit that referenced this pull request Nov 17, 2026
- /autoplan's approval page no longer hides a reviewer's product objection behind "keep your direction". (#4431)
- Every skill that loads the shared preamble, on every host, now says to ask a question once and to check a file before handing it over. (#4383)
- The Captain manuals now name the `Failed or skipped:` and `Also changed:` lines that READY and lane reports carry. (#4432)
- gstack's shell locks hold again on Ubuntu 26.04, where `mkdir` reports success when another process won the race (GST-2247). (#4262)
- `test/gstack-lock-race.test.ts` runs the old pattern and the helper against a PATH shim that behaves like uutils 0.8.0 `mkdir`, so it runs on any runner image: the old pattern lets two of four racers win, the helper admits exactly one in each of 60 races and never overlaps across take, hold and release loops, and parallel `gstack-config` writers keep every key. (#4262)
- Windows Setup E2E now runs when `bin/gstack-lock.sh` changes. (#4433)
- Claude Code's skill list now says when to use each gstack skill, so Opus loads /review and /plan-eng-review when a request fits. (#4387)
- A pull request's merge head can no longer keep its `/ship` receipt without a full review. (#4365)
- `/ship` now counts review rounds per pull request, and the head that merges always gets a full review. (#4360)
- /ship's documentation audit no longer accepts a passing result when an earlier line from the same audit said "blocked". (#4434)
- /ship's documentation audit no longer spends an attempt when the audit child writes text after its result. (#4285)
- The README lists the two new guides, and the install doc counts its hooks right. (#4403)
- docs/releases.md now says the stable release cut treats a failed commit status as red and a pending one as still going, as it has since #4257. (#4436)
- /ship's `finish --docs-requested` now accepts a docs fix when the audit named the file with a line number. (#4437)
- Document the `.gstack/approval-classes.json` schema, `gstack-approval-classes` CLI commands, and owner approval citation format in `docs/ship-policy.md#approval-classes`. (#4355)
- `/eval-plan` now runs four result checks instead of leaving them to judgment. (#4384)
- The /review coverage-audit eval no longer fails a run that really read the source file when zsh stops a command line at an `echo ====` separator. (#4364)
- Sixteen in-repo documentation links reach their section again. (#4394)
- gstack agents now open every status report with what failed, what they didn't verify and what else they changed. (#4273)
- Two new short guides. (#4380)
- A skill you wrote whose contract still lists `check_after_last_edit` keeps the rest of its contract. (#4439)
- The ship policy guide now explains how to merge any pull request with `gstack-ship-queue land`, even in a repository with one maintainer. (#4377)
- /ship's test step runs a large unit suite on Linux. (#4426)
- Every skill that loads the shared preamble, on every host, now says never to print a whole environment, git config or process table. (#4382)
- Pull requests from /ship now open with at most three plain lines, and every merge lands as one commit titled with the PR title. (#4438)
- `gstack-pr-wait`, `gstack-ci-gate` and the release cut no longer call a commit green while a check on it failed. (#4257)
- `gstack-runaway` now says what a thread's cold and empty wakes cost, not just how many there were (GST-2770). (#4385)
- The optional Stop hook no longer checks for a test run after the last edit, and /verify asks for it in plain words instead. (#4428)
- /ship's test step says when it ran out of time, and you can set its budget. (#4429)
- The remote test command no longer puts every file on one command line. (#4429)
- The stable release no longer waits on the nightly Windows tests (GST-2815). (#4400)
- Ubicloud fan-outs can no longer overshoot the vCPU limit, and owners no longer delete each other's VMs. (#4430)
- hono is pinned to 4.13.16, which fixes five advisories the weekly OSV scan found in 4.13.13 (gstack#4406). (#4408)
- `package.json` overrides (#4408)
- `test/dependency-security.test.ts`: the lockfile floor check now covers `hono >= 4.13.16`. (#4408)
- The nightly Windows test run finishes again. (#4409)
- A short write-up checklist in ETHOS.md. (#4381)

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