Use Garry Tan's exact Claude Code setup: 23 opinionated tools that serve as CEO, Designer, Eng Manager, Release Manager, Doc Engineer, and QA
TypeScript
/cso never looks through a symlinked folder, and Capy release and triage steps stop writing to GitHub as the owner (GST-3344) (#4592)
Garry Tan6cac5ab34cbe
diff --git a/changelog.d/fix-cso-symlink-ancestor-review-wording-capy-gh.md b/changelog.d/fix-cso-symlink-ancestor-review-wording-capy-gh.mdnew file mode 100644index 000000000..71ac8488b--- /dev/null+++ b/changelog.d/fix-cso-symlink-ancestor-review-wording-capy-gh.md@@ -0,0 +1 @@+**/cso checks every folder above a source file before it looks at the file, so it never looks through a symlinked folder.** A tracked file under a folder that was swapped for a symlink now fails closed with `UNSAFE_PATH` before anything is read or measured through the link, including the size count in the source-cap message. Also: on Capy, `gstack-release-stamp open` pushes the release branch and hands the release PR to the host's PR tool (a `HOST_PUBLISH:` line) instead of opening it through gh as the owner, and /ship's test-failure triage keeps the issue text in files instead of running `gh issue create`; `REVIEW_DIFF_TOO_LARGE` quotes a file or folder name holding a newline instead of printing it raw; and two size figures for harness-evals#494 are corrected (11.3 MB for the 25 transcripts, 12.26 MB for main's whole reader diff).diff --git a/docs/ship-policy.md b/docs/ship-policy.mdindex bdcbf23d3..0f02f75da 100644--- a/docs/ship-policy.md+++ b/docs/ship-policy.md@@ -1638,7 +1638,8 @@ apply the same rule to the same input, so they build the same selection. Thegate class and the record's `gate_tagged` list are unchanged: only how much ofthe data file a reader sees changes. Results PRs that commit captured agentsessions need this: the sessions quote lint pragmas, env checks and-`--no-verify` pushes (harness-evals #494: 25 transcripts, 11.4 MB whole).+`--no-verify` pushes (harness-evals #494: 25 transcripts, 11.3 MB (11,320,357+bytes) whole).<a id="one-selection-every-reader"></a>**One selection for every reader (GST-1476).** Every path that renders a@@ -3079,6 +3080,9 @@ gstack-release-stamp open # --dry-run prints the stamp and creates noIt stamps a fresh worktree of `origin/main` with `gstack-restamp --release`,commits the result on `release/<version>`, pushes that branch and opens its PR.+On Capy (`GSTACK_CAPY=1`) it pushes the branch but leaves the PR to the host's+PR tool, printing a `HOST_PUBLISH: pr-create` line instead+([host publish](troubleshooting.md#host-publish)).The release stamp folds every fragment in `changelog.d/` under one new CHANGELOGheading and deletes the files. The new version is the base's plus the highestbump any fragment declares (the policy `bump` when none does). It reruns thediff --git a/docs/troubleshooting.md b/docs/troubleshooting.mdindex f79d91d59..ea2f5f0d2 100644--- a/docs/troubleshooting.md+++ b/docs/troubleshooting.md@@ -3362,6 +3362,9 @@ would have; `gstack-post` on GitLab uses the origin remote), `host=` when it isgithub.com, a reply's comment, and a new PR's base, head (the current branch when `--head` is not passed) and draftstate. Nothing reached GitHub yet. When the repository cannot be resolved the command refuses and prints no line,because a hand-off without one would land on whatever repository the host tool defaults to.+`gstack-release-stamp open` does the same for a new release PR (`pr-create`) after it pushes `release/<version>`.+/ship's test-failure triage prints no `HOST_PUBLISH:` line: on Capy it keeps its issue title and body files,+prints where they are and runs no `gh issue create`.**Fix.** Publish the named files with the host's PR tool before the next gstack step, always passing `repo=`(Capy's `repo` argument) so a multi-repo or fork thread edits the right pull request; a `host=` the host tooldiff --git a/lib/cso/snapshot.ts b/lib/cso/snapshot.tsindex 81b1cad43..5724679bd 100644--- a/lib/cso/snapshot.ts+++ b/lib/cso/snapshot.ts@@ -346,6 +346,24 @@ function directoryIdentities(root: string, path: string): DirectoryIdentity[] {}return identities;}+/** Whether every directory above path exists as a real directory, checked from the root down so no later lstat resolves through a link; false when one is missing, UNSAFE_PATH when one is a symlink or a file. */+function sourceAncestorsPresent(root: string, path: string): boolean {+ const rel = relativePath(path);+ let cursor = root;+ for (const part of rel.split('/').slice(0, -1)) {+ cursor = join(cursor, part);+ let stat: fs.Stats;+ try {+ stat = fs.lstatSync(cursor);+ } catch (error) {+ if ((error as NodeJS.ErrnoException).code === 'ENOENT') return false;+ throw error;+ }+ if (stat.isSymbolicLink() || !stat.isDirectory())+ throw new CsoError('UNSAFE_PATH', `Symlink or non-directory source ancestor: ${rel}`);+ }+ return true;+}type LinkIdentity = { dev: number; ino: number; mode: number; target: Buffer };/** Read a source symlink's own target string under identity checks; the link itself is never followed. */function readLinkStable(root: string, path: string): LinkIdentity {@@ -761,6 +779,7 @@ export async function capture(for (const candidate of list) {if (noReadPath(candidate) || outsideAudit(candidate)) continue;try {+ if (!sourceAncestorsPresent(repo, candidate)) continue;measured += fs.lstatSync(join(repo, candidate)).size;files++;} catch {}@@ -771,6 +790,10 @@ export async function capture(guard();let source: fs.Stats;try {+ if (!sourceAncestorsPresent(repo, path)) {+ absentPaths.add(path);+ continue;+ }source = fs.lstatSync(join(repo, path));} catch (error: any) {if (error?.code === 'ENOENT') {diff --git a/lib/release-stamp.ts b/lib/release-stamp.tsindex 011201ef0..2218bcf49 100644--- a/lib/release-stamp.ts+++ b/lib/release-stamp.ts@@ -14,6 +14,7 @@ import { parseChangelog } from './changelog-check';import { effectiveBump, readFragments } from './changelog-fragments';import { restamp, versionAtRef, type RestampResult } from './restamp';import { withAgentNotes } from './agent-notes';+import { handOff, hostPublishes } from './host-publish';import { foldSections } from './pr-body-shape';import { matchesAny, type ShipPolicy } from './ship-policy';import { buildReceipt } from './tree-receipt';@@ -108,6 +109,7 @@ export function classifyRelease(o: { repoRoot: string; policy: ShipPolicy; mergeexport interface OpenOptions {repoRoot: string; base: string; dryRun?: boolean; now?: Date;gh?: (args: string[], cwd: string) => { ok: boolean; out: string; err: string };+ env?: Record<string, string | undefined>;}export type OpenResult =| { ok: true; version: string; branch: string; head?: string; pr?: string; url?: string; lines: string[] }@@ -166,6 +168,14 @@ export function openRelease(o: OpenOptions): OpenResult {].join('\n'));const posted = foldSections(body);const open = gh(['pr', 'list', '--head', branch, '--state', 'open', '--json', 'url,isCrossRepository', '--jq', '[.[] | select(.isCrossRepository | not)][0].url // ""'], dir);+ if (!(open.ok && open.out.trim()) && hostPublishes(o.env)) {+ const view = gh(['repo', 'view', '--json', 'nameWithOwner,url'], dir);+ let dest: { repo: string; host: string } | undefined;+ try { const v = JSON.parse(view.out); dest = { repo: String(v.nameWithOwner ?? ''), host: new URL(String(v.url)).host }; } catch { dest = undefined; }+ if (!view.ok || !dest?.repo) return fail('RELEASE_STAMP_INVALID', `cannot resolve the repository the release PR belongs to (gh repo view --json nameWithOwner,url: ${view.err.trim().split('\n')[0] || 'no repository'}); ${branch} is pushed, so open its PR with the host's PR tool`);+ lines.push(handOff({ op: 'pr-create', ...dest, base: o.base, head: branch, parts: [['title', `v${version} release`], ['body', posted]], env: o.env }).trimEnd(), `NEXT: gstack-ship-queue land --pr <n> --pin ${head} once the PR the host opens has green checks`);+ return { ok: true, version, branch, head, lines };+ }const pr = open.ok && open.out.trim() ? open : gh(['pr', 'create', '--base', o.base, '--head', branch, '--title', `v${version} release`, '--body', posted], dir);if (!pr.ok) return fail('RELEASE_STAMP_INVALID', `gh pr create failed (${pr.err.trim().split('\n')[0]}); ${branch} is pushed, so open its PR by hand`);const url = pr.out.trim().split('\n').pop() ?? '';diff --git a/lib/review-exclude.ts b/lib/review-exclude.tsindex f08c218a7..d46e38997 100644--- a/lib/review-exclude.ts+++ b/lib/review-exclude.ts@@ -624,9 +624,10 @@ function suggest(byDir: ReadonlyArray<[string, number]>, bytes: number): string[/** The REVIEW_DIFF_TOO_LARGE line and object: the reader's bytes, the largest folders and files, and a fix chosen by where the policy stands. */export function tooLargeLine(context: string, reader: string, d: { bytes: number; byDir: ReadonlyArray<[string, number]>; byFile?: ReadonlyArray<[string, number]> }, c: CeilingContext): { line: string; json: Record<string, unknown> } {- const top = d.byDir.slice(0, 5).map(([dir, n]) => `${dir}:${n}`).join(',') || 'none';+ const named = (name: string) => (/[\x00-\x1f\x7f]/.test(name) ? JSON.stringify(name) : name);+ const top = d.byDir.slice(0, 5).map(([dir, n]) => `${named(dir)}:${n}`).join(',') || 'none';const largest = (d.byFile ?? []).slice(0, 5);- const split = largest.length ? `split the PR (largest files: ${largest.map(([f, n]) => `${f} (${n} bytes)`).join(', ')})` : 'split the PR';+ const split = largest.length ? `split the PR (largest files: ${largest.map(([f, n]) => `${named(f)} (${n} bytes)`).join(', ')})` : 'split the PR';const land = (patterns: readonly string[]) => `ask the repo owner to land ${policyJson(patterns, c.floor)} in ${SHIP_POLICY_PATH} on ${c.base} as its own PR (docs/ship-policy.md#review-exclude-paths), then bring ${c.base} into this branch and rerun once; if it is still over, ${split}`;const dirs = suggest(d.byDir, d.bytes);const fix = c.state === 'head-only' ? `this branch declares review_exclude_paths, but only the copy on ${c.base} applies: ${land(c.headPatterns ?? [])}`diff --git a/lib/review-secret-excerpt.ts b/lib/review-secret-excerpt.tsindex 88b738eba..26bf21e4c 100644--- a/lib/review-secret-excerpt.ts+++ b/lib/review-secret-excerpt.ts@@ -10,7 +10,7 @@* inlines every file on any other throw.** An allowlisted data file kept only for single-line gate tags (lib/review-exclude.ts gateData, GST-3273:- * captured agent sessions quoting lint pragmas or env checks, harness-evals#494: 25 files, 12.3 MB) gets the same excerpt,+ * captured agent sessions quoting lint pragmas or env checks; on harness-evals#494, main's whole reader diff was 12.26 MB) gets the same excerpt,* plus every changed line lineTags tags, under its own heading that names the tags. Such a file with no tagged line here* goes whole, and so does one whose tagged line runs past EXCERPT_LINE_MAX with no idiom span to show. Every changed line* holding a credential value by the caller's secretLine rule (lib/review-exclude.ts secretValueSpans, the secret-line keepdiff --git a/scripts/resolvers/preamble/generate-test-failure-triage.ts b/scripts/resolvers/preamble/generate-test-failure-triage.tsindex 1047becb0..66e05567f 100644--- a/scripts/resolvers/preamble/generate-test-failure-triage.ts+++ b/scripts/resolvers/preamble/generate-test-failure-triage.ts@@ -92,6 +92,7 @@ Then post with your platform from Step 0 (\`github\` or \`gitlab\`). Substitute\`\`\`bash${freeTextFileUse([{ variable: 'TITLE_FILE', placeholder: '<title-file-name>' }, { variable: 'BODY_FILE', placeholder: '<body-file-name>' }], 'gh issue create --title \\"\\$(cat $TITLE_FILE)\\" --body-file $BODY_FILE')}+[ "\${GSTACK_CAPY:-}" = 1 ] && { echo "Not sent: on Capy, gh signs in as the owner's own GitHub account. Hand $TITLE_FILE and $BODY_FILE to whoever owns the work instead (docs/troubleshooting.md#host-publish)." >&2; exit 0; }case "<platform>" ingithub) gh issue create --title "$(cat "$TITLE_FILE")" --body-file "$BODY_FILE" --assignee "<github-username>" ;;gitlab) glab issue create -t "$(cat "$TITLE_FILE")" -d "$(cat "$BODY_FILE")" -a "<gitlab-username>" ;;diff --git a/ship/sections/tests.md b/ship/sections/tests.mdindex 990c35c9f..4ed90cf0c 100644--- a/ship/sections/tests.md+++ b/ship/sections/tests.md@@ -374,6 +374,7 @@ Then post with your platform from Step 0 (`github` or `gitlab`). Substitute theTITLE_FILE="$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.gstack/tmp/<title-file-name>"BODY_FILE="$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.gstack/tmp/<body-file-name>"[ -s "$TITLE_FILE" ] && [ -s "$BODY_FILE" ] || { echo "Not sent: $TITLE_FILE or $BODY_FILE is missing or empty, so the text was never written. Write it, then send by hand: gh issue create --title \"\$(cat $TITLE_FILE)\" --body-file $BODY_FILE" >&2; exit 1; }+[ "${GSTACK_CAPY:-}" = 1 ] && { echo "Not sent: on Capy, gh signs in as the owner's own GitHub account. Hand $TITLE_FILE and $BODY_FILE to whoever owns the work instead (docs/troubleshooting.md#host-publish)." >&2; exit 0; }case "<platform>" ingithub) gh issue create --title "$(cat "$TITLE_FILE")" --body-file "$BODY_FILE" --assignee "<github-username>" ;;gitlab) glab issue create -t "$(cat "$TITLE_FILE")" -d "$(cat "$BODY_FILE")" -a "<gitlab-username>" ;;diff --git a/test/cso-snapshot-state.test.ts b/test/cso-snapshot-state.test.tsindex 43d31abc4..eb054c672 100644--- a/test/cso-snapshot-state.test.ts+++ b/test/cso-snapshot-state.test.ts@@ -26,6 +26,8 @@ describe('CSO dirty snapshot boundary',()=>{test('includes chmod-only changes in diff scope',async()=>{const p=repo();fs.chmodSync(path.join(p,'tracked.txt'),0o755);const manifest=await capture(p,newRun(p).dir,'HEAD');expect(manifest.changedPaths).toContain('tracked.txt');});test('does not invoke configured clean filters, hooks, fsmonitor, or PATH shims',async()=>{const p=repo(),marker=path.join(p,'marker');fs.writeFileSync(path.join(p,'.gitattributes'),'*.txt filter=hostile\n');git(p,'config','filter.hostile.clean',`/bin/sh -c 'touch ${marker}; cat'`);git(p,'config','core.fsmonitor',`/bin/sh -c 'touch ${marker}'`);const fake=path.join(p,'bin');fs.mkdirSync(fake);fs.writeFileSync(path.join(fake,'git'),`#!/bin/sh\ntouch '${marker}'\nexit 99\n`,{mode:0o755});const old=process.env.PATH;process.env.PATH=`${fake}:${old}`;try{await capture(p,newRun(p).dir,'HEAD');}finally{process.env.PATH=old;}expect(fs.existsSync(marker)).toBe(false);});test('never makes a symlink an execution input, and rejects hard links (#4540)',async()=>{const p=repo();fs.symlinkSync('/etc/passwd',path.join(p,'escape'));const run=newRun(p).dir,manifest=await capture(p,run),link=manifest.entries.find(e=>e.path==='escape');expect(link?.executionHash).toBeUndefined();expect(link?.transformation).toBe(symlinkTransformation('escape','/etc/passwd'));expect(fs.existsSync(path.join(run,'snapshot','escape'))).toBe(false);expect(fs.existsSync(path.join(run,'readable','escape'))).toBe(false);fs.unlinkSync(path.join(p,'escape'));fs.linkSync(path.join(p,'tracked.txt'),path.join(p,'hard'));await expect(capture(p,newRun(p).dir)).rejects.toThrow();});+ test.skipIf(process.platform==='win32')('checks source ancestors before any lstat, so a tracked path under a directory swapped for a symlink fails closed without stat-ing through it',async()=>{for(const target of ['dir','missing'] as const){const p=repo(),outside=tmp();fs.mkdirSync(path.join(p,'d'));fs.writeFileSync(path.join(p,'d','f'),'x\n');git(p,'add','d/f');git(p,'commit','-qm','d');if(target==='dir')fs.mkdirSync(path.join(outside,'f'));fs.rmSync(path.join(p,'d'),{recursive:true});fs.symlinkSync(outside,path.join(p,'d'));const through:string[]=[],lstat=fs.lstatSync,spy=spyOn(fs,'lstatSync').mockImplementation(((candidate:any,...rest:any[])=>{if(String(candidate).startsWith(path.join(p,'d')+path.sep))through.push(String(candidate));return (lstat as any)(candidate,...rest);}) as typeof fs.lstatSync);try{await expect(capture(p,newRun(p).dir)).rejects.toMatchObject({code:'UNSAFE_PATH',message:'Symlink or non-directory source ancestor: d/f'});}finally{spy.mockRestore();}expect(through).toEqual([]);}});+ test.skipIf(process.platform==='win32')('the source cap message measures no path through a symlinked ancestor',async()=>{const p=repo(),outside=tmp();fs.mkdirSync(path.join(p,'d'));fs.writeFileSync(path.join(p,'d','f'),'x\n');git(p,'add','d/f');git(p,'commit','-qm','d');fs.writeFileSync(path.join(outside,'f'),'outside\n');fs.rmSync(path.join(p,'d'),{recursive:true});fs.symlinkSync(outside,path.join(p,'d'));const big=path.join(p,'a.bin');fs.writeFileSync(big,'');fs.truncateSync(big,65*1024*1024);const through:string[]=[],lstat=fs.lstatSync,spy=spyOn(fs,'lstatSync').mockImplementation(((candidate:any,...rest:any[])=>{if(String(candidate).startsWith(path.join(p,'d')+path.sep))through.push(String(candidate));return (lstat as any)(candidate,...rest);}) as typeof fs.lstatSync);try{await expect(capture(p,newRun(p).dir)).rejects.toMatchObject({code:'MISSING_INPUT'});}finally{spy.mockRestore();}expect(through).toEqual([]);});test('records broken untracked symlinks instead of silently omitting them (#4540)',async()=>{const p=repo();fs.symlinkSync('missing-target',path.join(p,'broken'));const manifest=await capture(p,newRun(p).dir);expect(manifest.entries.find(e=>e.path==='broken')).toMatchObject({transformation:symlinkTransformation('broken','missing-target')});});for(const earlierSensitive of [false,true])test(earlierSensitive?'keeps credential evidence bound to .env when an earlier file is also sensitive':'redacts secrets and excludes credentials from execution while retaining safe evidence',async()=>{const p=repo();diff --git a/test/gen-skill-docs.test.ts b/test/gen-skill-docs.test.tsindex 7e397925b..b813e0749 100644--- a/test/gen-skill-docs.test.ts+++ b/test/gen-skill-docs.test.ts@@ -1226,6 +1226,26 @@ describe('TEST_FAILURE_TRIAGE resolver', () => {expect(shipSkill).toContain('gh issue create');});+ // GSTA-643 list: on Capy gh signs in as the owner, so the triage issue block keeps its files and never calls gh.+ test.skipIf(process.platform === 'win32')('on Capy the blame + assign block sends nothing through gh', () => {+ const block = /```bash\n(TITLE_FILE=[^\n]*<title-file-name>[^`]*?case "<platform>"[\s\S]*?)```/.exec(shipSkill)![1]!+ .replaceAll('<title-file-name>', 't.md').replaceAll('<body-file-name>', 'b.md').replaceAll('<platform>', 'github').replaceAll('<github-username>', 'someone');+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'triage-capy-'));+ try {+ fs.mkdirSync(path.join(dir, '.gstack', 'tmp'), { recursive: true });+ fs.mkdirSync(path.join(dir, 'bin'));+ for (const name of ['t.md', 'b.md']) fs.writeFileSync(path.join(dir, '.gstack', 'tmp', name), 'text\n');+ fs.writeFileSync(path.join(dir, 'bin', 'gh'), `#!/bin/sh\necho called > "${dir}/gh-called"\n`, { mode: 0o755 });+ const r = spawnSync('bash', ['-c', block], { cwd: dir, encoding: 'utf-8', timeout: 15_000, env: { PATH: `${path.join(dir, 'bin')}:/usr/bin:/bin`, HOME: dir, GSTACK_CAPY: '1' } });+ expect(r.status).toBe(0);+ expect(r.stderr).toContain("Not sent: on Capy, gh signs in as the owner's own GitHub account");+ expect(fs.existsSync(path.join(dir, 'gh-called'))).toBe(false);+ expect(fs.existsSync(path.join(dir, '.gstack', 'tmp', 't.md'))).toBe(true);+ } finally {+ fs.rmSync(dir, { recursive: true, force: true });+ }+ });+test('defaults ambiguous failures to in-branch (safety)', () => {expect(shipSkill).toContain('When ambiguous, default to in-branch');});diff --git a/test/release-stamp.test.ts b/test/release-stamp.test.tsindex 6dd05da04..7548cd928 100644--- a/test/release-stamp.test.ts+++ b/test/release-stamp.test.ts@@ -146,6 +146,28 @@ describe('gstack-release-stamp open', () => {expect(repo.git('worktree', 'list').split('\n')).toHaveLength(1);});+ // GSTA-643 list: on Capy gh signs in as the owner, so open hands the release PR to the host's PR tool instead of gh pr create.+ test('on Capy, open pushes the release branch and hands the PR to the host tool without gh pr create', () => {+ const repo = landed();+ const state = fs.mkdtempSync(path.join(repo.work, '..', 'state-'));+ const calls: string[][] = [];+ const r = openRelease({ repoRoot: repo.work, base: 'main', env: { GSTACK_CAPY: '1', GSTACK_STATE_ROOT: state }, gh: (args) => {+ calls.push(args);+ if (args[0] === 'repo') return { ok: true, out: JSON.stringify({ nameWithOwner: 'o/r', url: 'https://github.com/o/r' }), err: '' };+ return { ok: true, out: '', err: '' };+ } });+ expect(r.ok).toBe(true);+ if (!r.ok) return;+ expect(calls.map(a => a.slice(0, 2).join(' '))).toEqual(['pr list', 'repo view']);+ expect(repo.git('--git-dir', repo.origin, 'rev-parse', 'refs/heads/release/1.3.0.0')).toBe(r.head!);+ const handed = r.lines.find(l => l.startsWith('HOST_PUBLISH: '))!;+ expect(handed).toStartWith('HOST_PUBLISH: pr-create new repo=o/r base=main head=release/1.3.0.0 title-file=');+ const file = (part: string) => fs.readFileSync(new RegExp(` ${part}-file=(\\S+)`).exec(handed)![1]!, 'utf8');+ expect(file('title')).toBe('v1.3.0.0 release');+ expect(sectionText(file('body'), 'Release notes')).toBe('- a change\n- b feature');+ expect(r.lines.at(-1)).toBe('NEXT: gstack-ship-queue land --pr <n> --pin ' + r.head + ' once the PR the host opens has green checks');+ });+test('a fork PR on release/<version> is never reused: open lists same-repo heads only and opens its own PR', () => {const repo = landed();const calls: string[][] = [];diff --git a/test/review-gate-excerpt.test.ts b/test/review-gate-excerpt.test.tsindex bb48694ff..4334f34a6 100644--- a/test/review-gate-excerpt.test.ts+++ b/test/review-gate-excerpt.test.ts@@ -59,7 +59,7 @@ const pass = (repo: FixtureRepo) => {describe('gate-tagged data files go to readers as their tagged lines', () => {// Value: protects=a results PR whose captured agent sessions quote lint pragmas or env checks reaches review instead of// stopping at the ceiling, every tagged line still reaches readers, and the gate still fires; fails_when=a gate-tagged- // data file is sent whole (REVIEW_DIFF_TOO_LARGE, harness-evals#494: 25 files, 12.3 MB), a tagged line is missing, or+ // data file is sent whole (REVIEW_DIFF_TOO_LARGE; on harness-evals#494 main's whole reader diff was 12.26 MB), a tagged line is missing, or// a code file, a path-tagged snapshot or a file whose tag spans lines is cut; why_new=GST-3273;// seam=gstack-review-plan and gstack-review-dispatch pass on a real repository, real gate scan; no_claim=what a model// does with the excerpt@@ -272,4 +272,13 @@ describe('REVIEW_DIFF_TOO_LARGE names files with spaces whole', () => {expect(x.line).toContain(`files="${p}":3000000,docs/b.jsonl:10 `);expect(x.line).toContain(`largest files: ${p} (3000000 bytes)`);});++ // #4574 follow-up: a control character in a file or folder name must not break the one-line REVIEW_DIFF_TOO_LARGE output.+ test('a newline in a file or folder name is quoted everywhere the line names it', () => {+ const p = 'docs/run\n2/session.jsonl';+ const x = tooLargeLine('t', 'r', { bytes: 3_000_000, byDir: [['docs/run\n2', 3_000_000]], byFile: [[p, 3_000_000]] }, { state: 'none', base: 'main', source: 's' });+ expect(x.line).not.toContain('\n');+ expect(x.line).toContain(`top="docs/run\\n2":3000000 `);+ expect(x.line).toContain(`largest files: ${JSON.stringify(p)} (3000000 bytes)`);+ });});diff --git a/test/size-ledger/ship/fix-cso-symlink-ancestor-review-wording-capy-gh.json b/test/size-ledger/ship/fix-cso-symlink-ancestor-review-wording-capy-gh.jsonnew file mode 100644index 000000000..300db134d--- /dev/null+++ b/test/size-ledger/ship/fix-cso-symlink-ancestor-review-wording-capy-gh.json@@ -0,0 +1,4 @@+{+ "bytes": 225,+ "why": "On Capy the test-failure triage block no longer files a GitHub issue through gh, which signs in as the owner (GSTA-643 list)"+}