mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-16 13:21:30 +01:00
* feat(ship): bounded post-review edits take one scoped reader, not a third review round (GST-1276, GST-1311) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs(ship): a scoped-review STOP takes one reader, not a fix-check round (GST-1276) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test: bound the diff-scope spawn and record the ship size ledger (GST-1276) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * test: repin lib/review-depth.ts on the GST-1276 no-loss replay Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix: pre-landing review fixes Review-Finding: p1/specialist-batched#1 reader=specialist-batched Review-Finding: p1/specialist-batched#2 reader=specialist-batched Review-Finding: p1/specialist-batched#3 reader=specialist-batched 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> * fix: a blank line or a template literal no longer hides a changed expected value (review fix-check) Review-Finding: p2/outside-voice#1 reader=outside-voice Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * fix(ship): a bounded lanes edit changes only dependencies; any other pregate key stops (GST-1276) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * ship: take the receipt-write targeted rebind out of GST-1276 (follow-up); document the lanes key check Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: list always-run.json as a gate path and finish's bounded=N stop Step 14.5 audit da1-gst1276 corrections. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * docs: keep review-policy.md at its reviewed bytes main's finish reads docs/review-policy.md as agent prose (behavior); the gate-path list omission of .gstack/always-run.json is recorded as doc debt in the PR body. 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>
24 lines
1.2 KiB
TypeScript
24 lines
1.2 KiB
TypeScript
/**
|
|
* The `bookkeeping` policy key (GST-1311): tables a verify or ratchet step rewrites after review (size baselines, serial
|
|
* lists, limits). Their small edits take /ship finish's scoped reader instead of another review round
|
|
* (docs/ship-policy.md#bookkeeping). Split out of ship-policy.ts, with the shared glob check, to keep that module under the
|
|
* module-size ratchet. The two files import only functions from each other, so either may load first.
|
|
*/
|
|
import { containedRelative, globToRegExp } from './ship-policy';
|
|
const TABLE = /\.(tsv|csv|txt)$/i;
|
|
|
|
/** Why a policy glob is refused: it escapes the repository or does not compile (every glob-list key, bookkeeping included). */
|
|
export function globError(g: string): string | null {
|
|
const why = containedRelative(g);
|
|
if (why) return why;
|
|
try { globToRegExp(g); } catch (e: any) { return e.message; }
|
|
return null;
|
|
}
|
|
|
|
/** Why a bookkeeping glob is refused: it could match code or gstack's own policy files. */
|
|
export function bookkeepingGlobError(g: string): string | null {
|
|
if (!TABLE.test(g)) return 'must end in .tsv, .csv or .txt (a bookkeeping table, never code)';
|
|
if (/^\.(gstack|github)\//.test(g)) return 'must not name a path under .gstack/ or .github/';
|
|
return null;
|
|
}
|