Phase 10 of epic #3180. src/planning-snapshot.cts is a new parsed projection of .planning/, composed exclusively from the already- consolidated §7 owners (getMilestoneInfo, listMilestonePhaseDirs, isPhaseComplete, scanPhasePlans, stateFieldValue, planningPaths) plus the frozen SCOPE enum. No new semantic derivation is introduced beyond worstScope, a pure combinator folding several independently-scoped owner answers into one composite signal. Adds STATE_UNREADABLE to src/unusable-input.cts's UNUSABLE_REASON (seventh #1879 site) for STATE.md exists-but-unreadable, distinct from absent. Adds scripts/lint-planning-snapshot-bypass-drift.cjs, a ratcheted drift guard (ADR-3180 Decision 4(e)) scoped to DIAGNOSTIC_RULE_FUNCTIONS (currently cmdValidateHealth in src/verify.cts only) preventing new raw .planning/ reads from bypassing the snapshot, while acknowledging cmdValidateHealth's existing 15 raw-read sites as debt owned by Phase 11 (#3309). Six-gate .cts ripple: .gitignore, eslint.config.mjs, docs/INVENTORY.md + manifest regen, CONTEXT.md glossary entry. Breaking changes: none. This phase adds the subject only; Phase 11 migrates cmdValidateHealth onto it.
111 lines
3.6 KiB
JSON
111 lines
3.6 KiB
JSON
{
|
|
"$comment": "ADR-3180 §8.1 rule 2 ratchet, owned by Phase 11 (#3309). See scripts/lint-planning-snapshot-bypass-drift.cjs. SHRINK-ONLY: entries are removed as cmdValidateHealth migrates onto src/planning-snapshot.cts; new or changed entries fail lint:ci. `count` is the number of byte-identical (file, text) occurrences acknowledged at this site — a run producing fewer fails as a partial migration, more fails as an unacknowledged new copy.",
|
|
"entries": [
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": ".readdirSync(phasesDir, { withFileTypes: true })",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "? fs.readFileSync(milestonesPath, 'utf-8')",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 2
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const archiveFiles = fs.readdirSync(milestonesArchiveDir);",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const configRaw = fs.readFileSync(configPath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 4
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const content = fs.readFileSync(projectPath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const entries = fs.readdirSync(rootBase, { withFileTypes: true });",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const rawCfg = fs.readFileSync(configPath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const researchContent = fs.readFileSync(",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const roadmapContent = fs.readFileSync(roadmapPath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const roadmapContentFull = fs.readFileSync(roadmapPath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const roadmapContentRaw = fs.readFileSync(roadmapPath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const roadmapRaw = fs.readFileSync(roadmapPath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 2
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const stateContent = fs.readFileSync(statePath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 2
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "const stateRaw = fs.readFileSync(statePath, 'utf-8');",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
},
|
|
{
|
|
"file": "src/verify.cts",
|
|
"text": "phaseDirFiles.set(e.name, fs.readdirSync(path.join(phasesDir, e.name)));",
|
|
"derivation": "planning-snapshot-bypass",
|
|
"owner_issue": "#3309",
|
|
"count": 1
|
|
}
|
|
]
|
|
}
|