chore: zero-heads warning names the benign cause too; digest path declaration made load-bearing; ratchet re-capture

- 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 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-29 05:58:14 +00:00
co-authored by Claude Fable 5
parent 5ed46193f1
commit cb8bd9b98d
3 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -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)",
+8 -2
View File
@@ -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}' }`);
}
});
});
+2 -2
View File
@@ -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,