From cb8bd9b98d55963f8a16e6b99f17c23898a396e5 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sat, 29 Aug 2026 05:58:14 +0000 Subject: [PATCH] chore: zero-heads warning names the benign cause too; digest path declaration made load-bearing; ratchet re-capture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The ls-remote zero-heads warning no longer accuses an empty remote of running a laundering shim. - instructionTier.rulesFile now must equal the generator's DIGEST_RELPATH (and setup must print it) — the declaration fails with the real path instead of lying silently. Co-Authored-By: Claude Fable 5 --- bin/gstack-next-version | 2 +- test/agents-digest.test.ts | 10 ++++++++-- test/fixtures/context-budget.json | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/gstack-next-version b/bin/gstack-next-version index 4b8756329..1df13aad8 100755 --- a/bin/gstack-next-version +++ b/bin/gstack-next-version @@ -550,7 +550,7 @@ function fetchGitClaimed( // `upstream` remote's branches are not claims against OUR queue). warnings.push( lsOk - ? "git ls-remote origin exited 0 but advertised zero heads (exit-code-laundering shim suspected); " + + ? "git ls-remote origin exited 0 but advertised zero heads (an empty remote, or an exit-code-laundering git shim); " + "using stale local refs/remotes/origin — branches deleted on the remote may still be counted as claims (run `git fetch --prune origin` to refresh)" : "git ls-remote origin failed; using stale local refs/remotes/origin — " + "branches deleted on the remote may still be counted as claims (run `git fetch --prune origin` to refresh)", diff --git a/test/agents-digest.test.ts b/test/agents-digest.test.ts index f3181663f..c7e991e61 100644 --- a/test/agents-digest.test.ts +++ b/test/agents-digest.test.ts @@ -97,10 +97,16 @@ describe('agents-digest', () => { } }); - test('instruction-tier hosts declare the digest in host config', () => { + test('instruction-tier hosts declare the digest in host config — and the declaration tracks the real path', () => { + // This is what makes instructionTier.rulesFile load-bearing instead of + // config nobody reads: the declared string must equal the generator's + // DIGEST_RELPATH, and setup's explainer must print that same path. If + // the digest ever moves, all three surfaces fail together. + const setup = fs.readFileSync(path.join(ROOT, 'setup'), 'utf-8'); + expect(setup).toContain(DIGEST_RELPATH); for (const host of ['openclaw', 'hermes']) { const src = fs.readFileSync(path.join(ROOT, 'hosts', `${host}.ts`), 'utf-8'); - expect(src).toContain("instructionTier: { rulesFile: 'agents-digest/gstack-AGENTS.md' }"); + expect(src).toContain(`instructionTier: { rulesFile: '${DIGEST_RELPATH}' }`); } }); }); diff --git a/test/fixtures/context-budget.json b/test/fixtures/context-budget.json index d81774c3b..df0271d7a 100644 --- a/test/fixtures/context-budget.json +++ b/test/fixtures/context-budget.json @@ -2,7 +2,7 @@ "_comment": "Context-budget ratchet ceilings (~tokens). Regenerate: bun test/helpers/capture-context-budget.ts. Headroom: alwaysOnTotal x1.05, eagerPerInvocation x1.1. Graded by test/context-budget-ratchet.test.ts via lib/context-bill.ts checkBudget.", "alwaysOnTotal": 6344, "eagerPerInvocation": { - "autoplan": 16208, + "autoplan": 16321, "benchmark": 4931, "benchmark-models": 3829, "browse": 7097, @@ -56,7 +56,7 @@ "setup-browser-cookies": 3194, "setup-deploy": 10646, "setup-gbrain": 15251, - "ship": 19664, + "ship": 19751, "skillify": 11889, "spec": 14385, "sync-gbrain": 13672,