mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-09 18:28:15 +01:00
* Add a check that keeps tracker codes and internal jargon out of PR titles and branch names gstack-plain-title checks the readable front of a title, branch name, PR opening or changelog entry against the repository's .gstack/plain-titles.json; one trailing issue code stays allowed. A Plain title workflow runs it on every new pull request, and /ship's push refuses a never-pushed branch whose name fails it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Move the PR body's machine-read lines into a closing Agent notes section The ship receipt, its runs block and the Plan line now live in one collapsed section at the end of the body, and every reader looks there first while still accepting the old receipt-at-top layout. gstack-post refuses to post a title the plain-title check refuses, and land uses the checked PR title as main's commit title. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Teach /ship to write plain titles, PR openings, commit messages and changelog entries The README now lists what gstack is for, so a PR opening can name the goal it serves. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Keep tests, size budgets and generated files in step with plain titles and Agent notes Copy lists that install result-code modules now include the plain-title codes, the ship goldens and size ledger are refreshed, the new workflow is classified, and the pinned prose tests read the new title and body layout. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Record the test-profile list change as non-behavioral for the shared test harness Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Keep text people add below the PR notes, and fix three smaller review findings The notes section now ends at its own closing tag, so a collapsible added after it survives the next post. The opening check splits the body the same way the notes reader does. Wave PR titles no longer name the area, which the plain-title check could refuse. The Capy line in the PR-body steps now puts Approvals in the notes. Review-Finding: p1/specialist-batched#1 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#3 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Mask credentials in refused-title lines and keep older PRs' plan lines readable A refused title's printed match is masked by the secret scanner first. The Plan line reader falls back to the whole body when the Agent notes section has none, so a body written before this change keeps its plan when its first receipt lands. The notes section also ends at its own closing tag when its opener is split or marked open, or when a collapsible inside it is left unclosed. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Print a fixed placeholder when a credential in a refused title cannot be masked Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Keep a plain-title policy edit from scheduling every paid eval Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Record the paid-eval list change as non-behavioral for the shared test harness Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Recheck the PR title on every edit so a base change cannot turn a refused title green Review-Finding: s11/targeted#1 reader=targeted Review-Finding: s11/adversarial-native#1 reader=adversarial-native 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>
42 lines
2.3 KiB
TypeScript
42 lines
2.3 KiB
TypeScript
/**
|
|
* Result codes for the plain-English title check (lib/plain-title.ts,
|
|
* bin/gstack-plain-title, the "Plain title" CI check; R76). Kept beside
|
|
* lib/result-codes.ts (which spreads this table into RESULT_CODES) so the owner
|
|
* module stays within the module-size ratchet; the same rules apply: one stable
|
|
* docs/troubleshooting.md anchor, a summary and a fix clause each.
|
|
*/
|
|
import type { ResultCode } from './result-codes';
|
|
|
|
export const PLAIN_RESULT_CODES = {
|
|
PLAIN_TITLE_REFUSED: {
|
|
anchor: 'plain-title-refused',
|
|
summary: 'the PR title has a tracker code, a project-only word or a type(scope): prefix before its trailing reference group',
|
|
fix: 'rewrite the title as a plain sentence about what changed for someone using the project; keep at most one trailing group like (ABC-123)',
|
|
},
|
|
PLAIN_BRANCH_REFUSED: {
|
|
anchor: 'plain-branch-refused',
|
|
summary: 'the branch name has a tracker code or a project-only word before its last segment',
|
|
fix: 'name the branch in plain words, with at most one tracker code at the very end (owner/what-changed-abc-123)',
|
|
},
|
|
PLAIN_OPENING_REFUSED: {
|
|
anchor: 'plain-opening-refused',
|
|
summary: 'the PR body does not open with one or two plain sentences',
|
|
fix: 'start the body with one or two sentences saying what changed and which goal of the project it serves; move codes and records to the Agent notes section at the end',
|
|
},
|
|
PLAIN_CHANGELOG_REFUSED: {
|
|
anchor: 'plain-changelog-refused',
|
|
summary: 'the changelog entry has a tracker code, or a project-only word in its bold lead',
|
|
fix: 'drop tracker codes from the entry and rewrite the bold lead in everyday words',
|
|
},
|
|
PLAIN_COMMIT_REFUSED: {
|
|
anchor: 'plain-commit-refused',
|
|
summary: 'a commit subject has a tracker code, a project-only word or a type(scope): prefix before its trailing reference group',
|
|
fix: 'write later commit subjects as plain sentences; the squash commit takes the PR title, so this is a warning only',
|
|
},
|
|
PLAIN_POLICY_INVALID: {
|
|
anchor: 'plain-policy-invalid',
|
|
summary: '.gstack/plain-titles.json is not valid JSON or breaks the schema; the line names the key',
|
|
fix: 'fix the named key (codes, terms, allow, since, exempt_branch_prefixes), then run gstack-plain-title validate',
|
|
},
|
|
} as const satisfies Record<string, ResultCode>;
|