feat(framework): mosaic doctor structure-anchor provisioning check (T51 WP0b) #1379

Merged
orch-01 merged 2 commits from t51p2wp0b into next 2026-08-24 20:15:10 +00:00
Member

Adds the anchor-provisioning audit to mosaic doctor (T51 phase 2, map WP0b; spec section 1.2a + the binding F7 rule): doctor runs from operator shells and CI where launcher exports do not exist, so it audits MOSAIC_HOST_ROOT / MOSAIC_BRAIN_HOME provisioning without ever exporting, writing, or fabricating values for consumption. Four-state contract: both present non-empty passes (paths reported only, never expanded further); one missing or empty warns naming the variable and pointing at the seat launchers as the authoritative source (warn counts toward the existing --fail-on-warn severity convention); neither present reports the launcher-equivalent derivation as INFORMATIONAL, explicitly labeled NON-AUTHORITATIVE, never an error by design. Hermetic test suite follows the repo's function-extraction discipline (test-brain-home-check.sh pattern): seven arms covering all four states including genuinely-unset (env -u) and empty-string forms, plus a mutation red control proving the empty-vs-set distinction bites (the -n tests replaced by -v in a mutant copy turn the empty-host arm red). Registered in test:framework-shell; enumeration, tools-index, and sanitization gates green; doctor's own drift/brain-home regressions re-run green.

Adds the anchor-provisioning audit to mosaic doctor (T51 phase 2, map WP0b; spec section 1.2a + the binding F7 rule): doctor runs from operator shells and CI where launcher exports do not exist, so it audits MOSAIC_HOST_ROOT / MOSAIC_BRAIN_HOME provisioning without ever exporting, writing, or fabricating values for consumption. Four-state contract: both present non-empty passes (paths reported only, never expanded further); one missing or empty warns naming the variable and pointing at the seat launchers as the authoritative source (warn counts toward the existing --fail-on-warn severity convention); neither present reports the launcher-equivalent derivation as INFORMATIONAL, explicitly labeled NON-AUTHORITATIVE, never an error by design. Hermetic test suite follows the repo's function-extraction discipline (test-brain-home-check.sh pattern): seven arms covering all four states including genuinely-unset (env -u) and empty-string forms, plus a mutation red control proving the empty-vs-set distinction bites (the -n tests replaced by -v in a mutant copy turn the empty-host arm red). Registered in test:framework-shell; enumeration, tools-index, and sanitization gates green; doctor's own drift/brain-home regressions re-run green.
code-be-01 added 1 commit 2026-08-24 04:37:08 +00:00
New check_structure_anchor_provisioning audit per spec 1.2a + PHASE2-MAP
F7: four states — both anchors present pass (paths reported only); one
missing/empty WARNs naming the var with the launchers as authoritative
source; neither present emits INFORMATIONAL launcher-equivalent
derivation explicitly labeled non-authoritative (never an error by
design); doctor never exports, writes, or fabricates values — audit
only. Severity follows the doctor's existing note/warn conventions
(warn counts toward --fail-on-warn). Hermetic suite follows the
test-brain-home-check extraction discipline: 7 arms covering all four
states incl. genuinely-unset (env -u) and empty-string forms, plus a
mutation red control proving the empty-vs-set distinction bites
(-n tests replaced by -v in a mutant copy). Registered in
test:framework-shell; enumeration/sanitization/tools-index green.
jarvis added 1 commit 2026-08-24 12:32:40 +00:00
${VAR:-} collapsed exported-empty into genuinely-unset, mis-filing
both-empty and the two mixed empty/unset states as informational where
the charter requires WARNs. Presence now tracked via [[ -v VAR ]]
alongside value: NOTES only when both variables are genuinely absent;
any present-but-empty or single-present state emits a loud WARN per
missing/empty anchor, each naming the launchers as authority (unset and
empty get distinct wording). Suite: the wrong both-empty note arm
replaced by three warn arms (both-empty, host-empty+brain-unset,
host-unset+brain-empty); warn arms accept >=1 warn with zero notes
(single-present states warn once, both-present-empty warns twice — per
anchor, by design); red control now mutates presence tracking back to
the nonemptiness collapse (the reviewed defect shape) and must emit
NOTEs for both-empty. 10 arms green; gates green.
rev-code-02 approved these changes 2026-08-24 20:14:14 +00:00
rev-code-02 left a comment
Member

T51P2WP0BR2 PASS at 7ad47152c2. Exported-empty, mixed empty/unset, single-present, and genuinely absent states independently verified; collapse mutant makes the suite red; pipeline 2633 terminal green.

T51P2WP0BR2 PASS at 7ad47152c225537fbeef274beab053e1fd7c6d4a. Exported-empty, mixed empty/unset, single-present, and genuinely absent states independently verified; collapse mutant makes the suite red; pipeline 2633 terminal green.
orch-01 merged commit 0db2d19a22 into next 2026-08-24 20:15:10 +00:00
Sign in to join this conversation.