chore: remove dead references to a retired repository
Two tracked lines named a repository that no longer exists: a CLAUDE.md
paragraph on nested-repo admission and a board-selftest section-31
comment. Both are reworded without the name; behaviour is unchanged.
tests/tracked-terms.test.mjs is the check: it fails when any tracked
path or line matches a term in the untracked
tests/excluded-terms.local.md (covered by *.local.md), verifies every
term against a known-positive sample first, and skips loudly when the
list is absent. Red on 4fd1955 with 2 hits, green after.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
4fd195513f
commit
1f17b67ed7
3 changed files with 81 additions and 3 deletions
|
|
@ -942,7 +942,7 @@ marketplace plugin. Three components, one boundary:
|
||||||
before anything was written: **12 nested repos across the tree, exactly 1
|
before anything was written: **12 nested repos across the tree, exactly 1
|
||||||
with a STATE.md** (`from-ai-to-chitta/content-sadhguru`, which had been
|
with a STATE.md** (`from-ai-to-chitta/content-sadhguru`, which had been
|
||||||
running work and reporting to nobody). The other 11 are vendored or
|
running work and reporting to nobody). The other 11 are vendored or
|
||||||
experimental checkouts under `claude-code-100x/`; the operator's decision is
|
experimental checkouts; the operator's decision is
|
||||||
that they stay invisible ON PURPOSE - they do not even reach the `UTEN
|
that they stay invisible ON PURPOSE - they do not even reach the `UTEN
|
||||||
STATE.md` bucket, because that bucket is for repos someone opens. Verified
|
STATE.md` bucket, because that bucket is for repos someone opens. Verified
|
||||||
after the fix with `board.sh`, not from memory:
|
after the fix with `board.sh`, not from memory:
|
||||||
|
|
@ -1655,7 +1655,10 @@ obligations in another repo.
|
||||||
- Test: `bash scripts/coord-selftest.sh`, `bash scripts/board-selftest.sh`,
|
- Test: `bash scripts/coord-selftest.sh`, `bash scripts/board-selftest.sh`,
|
||||||
`bash scripts/route-selftest.sh`, `bash scripts/orders-selftest.sh` and
|
`bash scripts/route-selftest.sh`, `bash scripts/orders-selftest.sh` and
|
||||||
`bash scripts/state-line-guard-selftest.sh` (or `npm test`, the Node wrapper
|
`bash scripts/state-line-guard-selftest.sh` (or `npm test`, the Node wrapper
|
||||||
around all five plus the hook tests and the README-number check)
|
around all five plus the hook tests and the README-number check).
|
||||||
|
`tests/tracked-terms.test.mjs` fails when any tracked path or line matches
|
||||||
|
a term in the untracked `tests/excluded-terms.local.md`, and SKIPS, loudly,
|
||||||
|
when that file is absent - the term list itself is never committed.
|
||||||
- Order queue smoke test: `CLAUDE_COORD_DIR=$(mktemp -d) bash
|
- Order queue smoke test: `CLAUDE_COORD_DIR=$(mktemp -d) bash
|
||||||
scripts/coord-order-send.sh --to smoke --from tester --subject s --message m`
|
scripts/coord-order-send.sh --to smoke --from tester --subject s --message m`
|
||||||
then `CLAUDE_COORD_DIR=<same> bash scripts/coord-order-inbox.sh --repo smoke`
|
then `CLAUDE_COORD_DIR=<same> bash scripts/coord-order-inbox.sh --repo smoke`
|
||||||
|
|
|
||||||
|
|
@ -3151,7 +3151,7 @@ check "pendingage: an unparseable filename reads ?, never a fabricated 0" $?
|
||||||
# --- 31. Nested git repos with a STATE.md (admission a) ---------------------
|
# --- 31. Nested git repos with a STATE.md (admission a) ---------------------
|
||||||
# Operator decision 2026-09-03, order 20260903T190201Z-238406410-from-.claude:
|
# Operator decision 2026-09-03, order 20260903T190201Z-238406410-from-.claude:
|
||||||
# a git repo nested at depth 2 UNDER a directory that is itself a git repo
|
# a git repo nested at depth 2 UNDER a directory that is itself a git repo
|
||||||
# (claude-code-100x/*, from-ai-to-chitta/*) was invisible to the board - the
|
# (e.g. from-ai-to-chitta/*) was invisible to the board - the
|
||||||
# discovery loop adds a depth-1 repo and never looks inside it, and the
|
# discovery loop adds a depth-1 repo and never looks inside it, and the
|
||||||
# else-branch container scan is reached only when the depth-1 entry is NOT a
|
# else-branch container scan is reached only when the depth-1 entry is NOT a
|
||||||
# repo. Admission is criterion (a) and nothing wider: such a repo enters the
|
# repo. Admission is criterion (a) and nothing wider: such a repo enters the
|
||||||
|
|
|
||||||
75
tests/tracked-terms.test.mjs
Normal file
75
tests/tracked-terms.test.mjs
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
// No tracked file may carry a term from a LOCAL, untracked term list - not in
|
||||||
|
// its content and not in its path. The list itself is deliberately kept out of
|
||||||
|
// the repository (tests/excluded-terms.local.md, covered by `*.local.md` in
|
||||||
|
// .gitignore): a check that spelled its own pattern out would be a tracked file
|
||||||
|
// carrying exactly what it forbids.
|
||||||
|
//
|
||||||
|
// Absent list = SKIPPED, loudly, never passed: a check that could not run must
|
||||||
|
// not read as a check that found nothing.
|
||||||
|
//
|
||||||
|
// Format: one case-insensitive regex per line; `#` lines and blank lines are
|
||||||
|
// ignored; `sample: <text>` lines are known-positive controls. Every sample
|
||||||
|
// must match some term and every term must be matched by some sample, so a
|
||||||
|
// term that can no longer find anything fails here instead of passing vacuously.
|
||||||
|
import { test } from 'node:test';
|
||||||
|
import assert from 'node:assert';
|
||||||
|
import { execFileSync } from 'node:child_process';
|
||||||
|
import { existsSync, readFileSync } from 'node:fs';
|
||||||
|
import { dirname, join } from 'node:path';
|
||||||
|
import { fileURLToPath } from 'node:url';
|
||||||
|
|
||||||
|
const root = join(dirname(fileURLToPath(import.meta.url)), '..');
|
||||||
|
const listFile = join(root, 'tests', 'excluded-terms.local.md');
|
||||||
|
|
||||||
|
// Named exceptions: tracked path -> reason. Empty on purpose; an entry needs a
|
||||||
|
// stated reason, never a silent widening.
|
||||||
|
const EXEMPT = new Map();
|
||||||
|
|
||||||
|
function loadList() {
|
||||||
|
const terms = [];
|
||||||
|
const samples = [];
|
||||||
|
for (const raw of readFileSync(listFile, 'utf8').split('\n')) {
|
||||||
|
const line = raw.trim();
|
||||||
|
if (line === '' || line.startsWith('#')) continue;
|
||||||
|
if (line.startsWith('sample:')) samples.push(line.slice('sample:'.length).trim());
|
||||||
|
else terms.push(new RegExp(line, 'i'));
|
||||||
|
}
|
||||||
|
return { terms, samples };
|
||||||
|
}
|
||||||
|
|
||||||
|
function hitsIn(text, terms) {
|
||||||
|
return terms.filter((re) => re.test(text)).map((re) => re.source);
|
||||||
|
}
|
||||||
|
|
||||||
|
test('no tracked file carries a term from the local term list', (t) => {
|
||||||
|
if (!existsSync(listFile)) {
|
||||||
|
t.skip(`SKIPPED, not passed: ${listFile} is absent, so nothing was checked`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const { terms, samples } = loadList();
|
||||||
|
assert.ok(terms.length > 0, 'term list holds no terms');
|
||||||
|
|
||||||
|
// Known-positive controls, before anything depends on the matcher.
|
||||||
|
for (const s of samples) {
|
||||||
|
assert.ok(hitsIn(s, terms).length > 0, `control sample matches no term: ${s}`);
|
||||||
|
}
|
||||||
|
for (const re of terms) {
|
||||||
|
assert.ok(samples.some((s) => re.test(s)), `term /${re.source}/ has no matching sample`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const files = execFileSync('git', ['ls-files', '-z'], { cwd: root, encoding: 'utf8' })
|
||||||
|
.split('\0')
|
||||||
|
.filter((p) => p !== '' && !EXEMPT.has(p));
|
||||||
|
assert.ok(files.length > 0, 'git ls-files listed no tracked files');
|
||||||
|
|
||||||
|
const found = [];
|
||||||
|
for (const path of files) {
|
||||||
|
for (const term of hitsIn(path, terms)) found.push(`${path} (path): /${term}/`);
|
||||||
|
const lines = readFileSync(join(root, path), 'latin1').split('\n');
|
||||||
|
lines.forEach((line, i) => {
|
||||||
|
for (const term of hitsIn(line, terms)) found.push(`${path}:${i + 1}: /${term}/`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
t.diagnostic(`scanned ${files.length} tracked files against ${terms.length} terms`);
|
||||||
|
assert.deepStrictEqual(found, [], `${found.length} hit(s):\n${found.join('\n')}`);
|
||||||
|
});
|
||||||
Loading…
Add table
Add a link
Reference in a new issue