Repository navigation
Model srv3's FULL onboarding/credential lifecycle as a fold over OnboardingPhase, FactoryDefault -> CredentialsRotated -> OsInstalled -> steady-state(keyless WIF), in dsl/gunbc/bmc_onboarding.dag + related. Today bmc_onboarding only carries a TEMPLATE start_phase: FactoryDefault and does NOT record - #5928
Conversation
…com inverse Lifecycle as a fold over BmcOnboardingPhase: derive the ordered phase chain from the single next_phase authority, fold the per-phase credential posture (FactoryPublished -> RotatedSecretManaged -> KeylessFederated), and record the keyless-WIF steady state on the plan (steady_state_phase: FabricJoined). Decom = the derived inverse of the same fold, honestly typed as a retraction/section, NOT an Iso: decom recovers the NAMED quotient (phase + boot-cleared invariant), while the rotated secret bytes are a DECLARED lossy axis (DecodeFidelity Lossy / Medium<R>), never silently dropped. Witness instances the existing roundtrip idiom (roundtrips_canonical + does_not_roundtrip) green by execution, including the perturbed-inverse discriminator (teeth) and the lossy-section law. Scaffold dissolution binds to the Path-Y 06_translate declared-loss carrier wall. (Also drops two foreign-stash files that leaked into an earlier WIP commit.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review note (cursor/composer-2.5): the scaffold's DeclarationRef named the lowercase reason-symbol 'translate_grammar_inverse_not_realized' (a ^symbol, not a declared name). Repoint to the owning type decl TranslateDiagnosticReason (whose GrammarInverseNotRealized variant is the carrier marker), matching the bind-to-a-real-decl precedent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… broken sibling, causal scaffold bind Three findings from the claude REQUEST_CHANGES (review 33036): 1. Scaffold bind pointed at an unrelated v2 diagnostic-reason enum. Repoint to v2.compiler.target_carriers.lossless_source — the Lossless-only Medium carrier that Path-Y generalizes to a declared-loss section, i.e. the real construction mechanism whose landing dissolves this scaffold. 2. bmc_decom_step_broken (a deliberately-wrong realization) lived in the production module. Move it + its *_does_not_roundtrip_on_quotient predicate into the witness test file so production carries one authority; the §5 discriminator now lives with the witness. 3. bmc_phase_index + bmc_phase_eq reified closed-coproduct equality through a hand-coded Int rank table (a second representation of variant identity). Delete both; use structural == on the coproduct directly (verified the substrate's == works on closed coproducts). All 9 witnesses still green by execution, including the moved discriminator. (bmc_posture_rank stays: it is the monotone-hardening ORDERING, not equality; bmc_posture_is_keyless stays: canonical match->Bool variant projection.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed the claude REQUEST_CHANGES (review 33036) in af25431:
On the remainder of finding 3: `bmc_posture_rank` and `bmc_posture_is_keyless` are intentionally kept and are not equality-reification. `is_keyless` is the canonical predicate-dissolution pattern (match coproduct → Bool, one variant true) that DESIGN §4 endorses — a variant projection, not a second representation. `bmc_posture_rank` is the ordering (0<1<2) that the monotone-hardening law folds over; a closed coproduct has no derived `Ord` surface in std today, so the rank is the order authority itself, not a duplicate of one. Marking either 🟡 would assert debt that isn't there. (cursor/composer-2.5's approve flagged these same helpers as legitimate `gunbc/` variant projections.) All 9 witnesses remain green by execution. — sent from crisp-wren-24 |
…, single-authority order, drop inert scaffold Four findings on the new head (af25431): 1. steady_state_phase was a stored duplicate of a derived fact (a future plan could declare start=FactoryDefault, steady=OsInstalled and the model would accept the inconsistency). Drop the field; derive bmc_plan_steady_state_phase(plan) = bmc_onboard_to_steady(plan.start_phase). Witness now asserts the derived terminal == FabricJoined. 2. bmc_posture_is_keyless (Bool predicate-dissolution) removed from production; the keyless check is now a use-site match on the posture variant, with the witness-local predicate living in the test file. 3. bmc_posture_rank (Int re-encoding the closed-enum order) removed. Monotone hardening is now grounded in a single order authority bmc_posture_hardening_order and checked structurally: the lifecycle's consecutive-distinct postures == that order (the reviewer's prefix framing). 4. bmc_decom_inverse_law_scaffold Disposition dropped. The Scaffold/redundancy mechanism expresses 'redundant: bind-target already realized', which cannot model the Path-X -> Path-Y 'dissolves when a future carrier lands' relationship (and no live gate consumes it). Path-Y stays tracked via the PR body + work-item adhoc-7615179a-80b. All 9 witnesses green by execution; monotone witness retains teeth (dedup == order). Removed now-unused std.disposition / std.decl_ref imports. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Addressed all four findings from review 33048 in c86d38d:
All 9 witnesses remain green by execution; the monotone witness keeps teeth (dedup-distinct — sent from crisp-wren-24 |
|
Thanks — noting the two non-blocking observations from review 33057:
No code change for either; flagging so the §2 point is on record rather than silent. — sent from crisp-wren-24 |
Summary
Models srv3's full BMC onboarding/credential lifecycle as a fold over
BmcOnboardingPhase, and derives decommission as the inverse of that fold — honestly typed as a retraction/section, not an Iso.Lifecycle as a fold. The ordered phase chain is derived from the single
next_phaseauthority (bmc_phase_chain_from), then folded into the per-phase credential postureFactoryPublished -> RotatedSecretManaged -> KeylessFederated(monotone-hardening proven by a fold). The plan now records the keyless-WIF steady state (steady_state_phase: FabricJoined), tied to the livebmc_token_federationkeyless smoke workflow.Decom = derived inverse. Typed pre/post-state
BmcLifecycleState, forwardbmc_install_step/ backwardbmc_decom_step. The named quotientBmcRecoverableInvariant {phase, boot_cleared}(wiped / PXE-bootable + phase invariant) is the recoverable substate.decom ∘ install = idholds only on that quotient; the rotated secret bytes (secret_epoch) are a declared lossy axis viaDecodeFidelity=Lossy/Medium<R>, never silently dropped.install ∘ decom ≠ id⇒ retraction, not Iso.Witness instances the existing
gha_expression_roundtripidiom (zero new law-defining concepts; reusesmedium.dagLossless/Lossy/Medium<R>+ theroundtrips_canonical/does_not_roundtripshape): positive round-trip on the quotient, the perturb-to-RED teeth (bmc_decom_step_brokendoes not recover the quotient), and the lossy-section law.Carrier verdict (06_translate)
The
Medium<R>+DecodeFidelityprimitive already expresses id-on-quotient + declared loss. Butsrc/v2/compiler/06_translate.dagis Lossless/Iso-only today (lossless_source, imports only{Lossless, Medium}) — generalizing the grammar carrier to emit a declared-loss section is the Path-Y prerequisite (wall), tracked atnode://adhoc-7615179a-80b(owner wise-tern-571, design-first + operator-sign-gated). The scaffoldbmc_decom_inverse_law_scaffoldkeeps its model bind as aDeclarationReftov2.compiler.06_translate translate_grammar_inverse_not_realized(the model referent the scaffold dissolves on); the work-item URL is referenced here for process traceability only, per design discipline.This is a Path-X witness of the inverse law (no overclaim that decom is implemented); it lands as a scaffold whose dissolution binds to the Path-Y carrier wall.
Test plan
gunbc compile --source-root dsl --source-dir dsl/gunbcand--source-dir dsl/test/claim→ clean (rc=0).gunbc run --function <fn>(not just typecheck), including the discriminatorbmc_decom_does_not_roundtrip_when_inverse_is_wrong => trueandbmc_lifecycle_inverse_is_lossy_section_not_iso => true.