Replaces cmdValidateHealth's hand-rolled addIssue/switch accumulation
(961 lines) with buildPlanningSnapshot -> evaluateRules -> map to the
legacy {code, message, fix, repairable} shape, bucketed by severity.
Two pre-checks (home-dir E010/I010, .planning/-root-missing E001) stay
outside the rule table entirely, per ADR-3180 §8.2 rule 4 ("no
precedence system") — building "some rules suppress others" into the
table would itself be the forbidden precedence system.
W024 (STATE.md commit-age freshness) also stays outside the table:
its committed rule is a documented permanent no-op (readStateHeadFreshness's
git-log shell-out is ambient I/O a Rule.check may never perform, and no
PlanningSnapshot field carries a commits-behind count). Migrating onto
the rule table as designed would have silently regressed 7 passing
tests in tests/health-validation.test.cjs — found while wiring this
function, kept as a real check in the wrapper instead (same I/O
license applyRepairs already relies on), fixed inline per this repo's
no-defer policy rather than accepted as a silent loss.
Ports the real repair-handler bodies (createConfig/resetConfig,
regenerateState, addNyquistKey/addAiIntegrationPhaseKey,
backfillMilestones) into health-diagnostic.cts's applyRepairs,
replacing the skeleton's stub. DESTRUCTIVE-risk remedies
(resetConfig/regenerateState) are refused by --repair — a disclosed
breaking change; repairable now means "an automatic repair will
actually run," not merely "a remedy exists to describe," so E004/E005
now report repairable:false. --backfill alone now actually triggers
backfillMilestones, fixing a latent bug where its gate was unreachable
without --repair also being set (verify.cts:2504, confirmed dead code
pre-migration).
Test updates distinguish the two explicitly-authorized behavior
changes (DESTRUCTIVE refusal, backfill-alone fix, W021->W026 split)
from preservation — every changed assertion is commented with why, and
new regression tests were added for both changes plus W021/W026
mutual independence. Drift-guard bookkeeping (bypass-baseline shrunk
to the one disclosed W024 exception, milestone-window and
phase-enumeration exemptions, test-file-count allowlist) updated for
the relocated/new functions this migration introduces.
158 lines
4.6 KiB
JSON
158 lines
4.6 KiB
JSON
{
|
|
"_doc": "Baseline of modules currently exceeding the 2-test-file limit. Each entry locks in TODAY's exact test filenames as the allowlisted set (identity ratchet). Adding a NEW test file to a capped module fails (novel). Removing one requires pruning this list (stale, ratchet-down). When a cluster drops to \u2264 2, remove its entry entirely. New entries require justification in PR description.",
|
|
"modules": {
|
|
"config": {
|
|
"files": [
|
|
"config-defaults-runtime-exclusion.test.cjs",
|
|
"config-field-docs.test.cjs",
|
|
"config-get-default.test.cjs",
|
|
"config-schema.property.test.cjs",
|
|
"config-validation.test.cjs",
|
|
"config.test.cjs"
|
|
],
|
|
"issue": "TBD"
|
|
},
|
|
"graphify": {
|
|
"files": [
|
|
"graphify-auto-update.slow.test.cjs",
|
|
"graphify-command-cutover.test.cjs",
|
|
"graphify-graph-path.test.cjs",
|
|
"graphify-query.test.cjs",
|
|
"graphify-visualization.test.cjs",
|
|
"graphify.test.cjs"
|
|
],
|
|
"issue": "622"
|
|
},
|
|
"init": {
|
|
"files": [
|
|
"init-debug-workflow-contract.test.cjs",
|
|
"init-debug.test.cjs",
|
|
"init-manager.test.cjs",
|
|
"init.test.cjs"
|
|
],
|
|
"issue": "3149"
|
|
},
|
|
"milestone": {
|
|
"files": [
|
|
"milestone-archive-hygiene.test.cjs",
|
|
"milestone-archive.test.cjs",
|
|
"milestone-helper.test.cjs",
|
|
"milestone-prefixed-convention.test.cjs",
|
|
"milestone-summary.test.cjs",
|
|
"milestone-window-drift-guard.test.cjs",
|
|
"milestone-window-single-owner.test.cjs",
|
|
"milestone.test.cjs"
|
|
],
|
|
"issue": "3216"
|
|
},
|
|
"phase": {
|
|
"files": [
|
|
"phase-completion-single-owner.test.cjs",
|
|
"phase-dependency-levels.test.cjs",
|
|
"phase-resolution-parity.test.cjs",
|
|
"phase-structure.test.cjs",
|
|
"phase.test.cjs"
|
|
],
|
|
"issue": "3186"
|
|
},
|
|
"roadmap": {
|
|
"files": [
|
|
"roadmap-disk-consistency.test.cjs",
|
|
"roadmap-mode-field.test.cjs",
|
|
"roadmap-phase-fallback.test.cjs",
|
|
"roadmap.test.cjs"
|
|
],
|
|
"issue": "TBD"
|
|
},
|
|
"runtime-artifact-layout": {
|
|
"files": [
|
|
"runtime-artifact-layout-descriptor-drive.test.cjs",
|
|
"runtime-artifact-layout-install-profiles.test.cjs",
|
|
"runtime-artifact-layout-surface.test.cjs",
|
|
"runtime-artifact-layout-trigger-surface.test.cjs",
|
|
"runtime-artifact-layout.test.cjs"
|
|
],
|
|
"issue": "2871"
|
|
},
|
|
"security": {
|
|
"files": [
|
|
"security-dead-exports.regression.test.cjs",
|
|
"security-prompt-injection.security.test.cjs",
|
|
"security-scan.security.test.cjs",
|
|
"security.test.cjs"
|
|
],
|
|
"issue": "2198"
|
|
},
|
|
"state": {
|
|
"files": [
|
|
"state-acquirestatelock-non-eexist.test.cjs",
|
|
"state-command-cutover.test.cjs",
|
|
"state-consistency.test.cjs",
|
|
"state-field-drift.test.cjs",
|
|
"state-prune.test.cjs",
|
|
"state-rebuild-cli.test.cjs",
|
|
"state-rebuild.test.cjs",
|
|
"state.test.cjs"
|
|
],
|
|
"issue": "180"
|
|
},
|
|
"verify": {
|
|
"files": [
|
|
"verify-health.test.cjs",
|
|
"verify-mvp-uat.test.cjs",
|
|
"verify-npm-publish.test.cjs",
|
|
"verify-test-quality.test.cjs",
|
|
"verify-work-auto-transition.test.cjs",
|
|
"verify.test.cjs"
|
|
],
|
|
"issue": "3767"
|
|
},
|
|
"install": {
|
|
"files": [
|
|
"install-minimal-hooks.test.cjs",
|
|
"install-nested-layout.test.cjs",
|
|
"install-path-detection.test.cjs",
|
|
"install-regressions.test.cjs",
|
|
"install-runtime-artifacts.test.cjs",
|
|
"install-update-marker.test.cjs",
|
|
"install-write-confinement.test.cjs",
|
|
"install.test.cjs"
|
|
],
|
|
"issue": "1679"
|
|
},
|
|
"edge-probe": {
|
|
"files": [
|
|
"edge-probe-docs-fixtures.test.cjs",
|
|
"edge-probe-planner-contract.test.cjs",
|
|
"edge-probe-spec-phase-contract.test.cjs",
|
|
"edge-probe.test.cjs"
|
|
],
|
|
"issue": "550"
|
|
},
|
|
"federated-config": {
|
|
"files": [
|
|
"federated-config.test.cjs",
|
|
"federated-config-loadconfig.test.cjs",
|
|
"federated-config-key-removal.test.cjs"
|
|
],
|
|
"issue": "TBD"
|
|
},
|
|
"host-integration": {
|
|
"files": [
|
|
"host-integration.test.cjs",
|
|
"host-integration-validator-parity.test.cjs",
|
|
"host-integration-descriptors.test.cjs"
|
|
],
|
|
"issue": "1684"
|
|
},
|
|
"prompt-budget": {
|
|
"files": [
|
|
"prompt-budget-cli.test.cjs",
|
|
"prompt-budget-parity.test.cjs",
|
|
"prompt-budget.test.cjs"
|
|
],
|
|
"issue": "2929"
|
|
}
|
|
}
|
|
}
|