Instrument : les gardes nommées, comme candidats — le plus petit lecteur qui prouve la thèse
gardes du contrat / conformite (pull_request) Successful in 17s
gardes du contrat / conformite (pull_request) Successful in 17s
Une exception de domaine est une règle qui a un nom, un throw, presque toujours une épreuve, et souvent aucune déclaration. Si le réglage le demande (gardes_nommees, adr), le journal rend les candidats qu'aucun parcours ne cite, avec leur strate et ce qui les cite. Rien ne devient un constat, aucun état ne change de sens, la section n'existe pas sans les clés : additif, ignorable. Ce qu'un dessin de trois lecteurs (Java annoté, SQL, réconciliation) voulait démontrer, abattu par l'objecteur mandaté, ces quarante lignes le démontrent : huit exceptions de domaine chez openathle, zéro déclarée. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
887d9a90c3
commit
ecf13fe1da
@@ -47,6 +47,21 @@ try {
|
||||
assert((byInv(first, 'INV-001')?.rangs_constates ?? []).join(',') === '4,3', 'INV-001 carries the third-party ranks its tuning declares, in stratum order');
|
||||
assert(byInv(first, 'INV-003')?.rangs_constates === undefined, 'INV-003 (no locus) carries no ranks — nothing observed maps to nothing');
|
||||
assert(JSON.stringify(journal().correspondance_rangs) === JSON.stringify({ domaine: 4, application: 3, interface: 1 }), 'journal publishes the full rank correspondence for consumers joining old findings');
|
||||
// Named guards — candidates, never findings: a domain exception nobody declared.
|
||||
const g = journal().gardes_nommees;
|
||||
assert(g && g.total === 1 && g.sans_declaration === 1, 'the fixture has one named domain guard, and no journey declares it');
|
||||
assert(g.candidats[0].nom === 'RuleViolatedException' && g.candidats[0].strate === 'domaine', 'the candidate carries its name and its stratum');
|
||||
assert(g.candidats[0].dans_parcours === false && g.candidats[0].dans_adr === true && g.candidats[0].eprouve === false, 'the candidate says where it is cited — ADR yes, journey no, test no');
|
||||
assert(!('candidats' in journal()) , 'candidates live under gardes_nommees, not at the journal root');
|
||||
// Backward compatibility: a tuning without the key gets no section at all.
|
||||
// On its OWN copy of the fixture: a second run on `repo` would rewrite the
|
||||
// journal and falsify the assertions that follow (caught by the self-test
|
||||
// itself on 2026-09-21 — a guard that shares state with what it guards).
|
||||
const repo2 = mkdtempSync(join(tmpdir(), 'instrument-selftest-compat-'));
|
||||
cpSync(join(here, 'selftest/fixture'), repo2, { recursive: true });
|
||||
execFileSync(process.execPath, [join(here, 'run.mjs'), '--config', 'reglage-sans-gardes.yaml', '--repo', repo2], { encoding: 'utf8', stdio: 'pipe' });
|
||||
const journal2 = parseYaml(readFileSync(join(repo2, 'docs/parcours/_mesures/derniere-execution.yaml'), 'utf8'));
|
||||
assert(!('gardes_nommees' in journal2), 'a tuning that does not ask for named guards changes nothing');
|
||||
assert(byInv(first, 'INV-002')?.etat === 'mal_domicilie', 'INV-002 mal_domicilie — proven only away from home');
|
||||
assert(byInv(first, 'INV-003')?.etat === 'aucun_locus', 'INV-003 aucun_locus — named by no test');
|
||||
assert(journal().constats_nouveaux === 3 && journal().invariants === 3, 'journal counts the run');
|
||||
|
||||
Reference in New Issue
Block a user