Repository navigation
Add lease-safe control authority model - #7
danielbrownjr wants to merge 5 commits into
Conversation
9e653a4 to
eb7b5c3
Compare
acquire, refresh, heartbeat, and mutate were registered without the same authorize() gate every other mutating dc_portal/jj_portal route uses, so anyone reachable on the LAN could take control authority and issue mutations with no credential. Add the check to all four handlers and extend check_control_safety_contract.sh so a missing gate on any of them fails CI instead of shipping silently again.
|
Found during review: Fixed in 36ce92d: all four handlers now require Separately, not fixed here: this PR's |
The bed-target-to-chamber-target policy is its own Phase 4 gate per ROADMAP.md and PRODUCT_SAFETY_CONTRACT.md: it must be derived and reviewed on its own, not inferred, and AUTOMATIC production heating stays unavailable until it exists. That heat-delivery path had started riding in under this control-authority PR, gated only on automatic_target_available/automatic_target_c (fields nothing in production sets yet, but a real live wire once something does). Restores the interlock's AUTOMATIC branch to an unconditional JJ_BLOCK_AUTO_POLICY_UNAVAILABLE, matching main's original invariant, while keeping the new authority check (JJ_BLOCK_AUTO_AUTHORITY_UNAVAILABLE) ahead of it, since who holds automatic authority is legitimately this PR's scope. jj_authority.c's own AUTOMATIC-mutation eligibility check is left as-is; it only gates whether the mode switch itself is accepted, never whether heat is delivered, so it doesn't carry the same risk. The removed heat-delivery logic and its test coverage are preserved verbatim on feat/automatic-bed-target-policy for its own PR once the Phase 4 policy is actually derived.
|
Split out the AUTOMATIC-mode heat-delivery scope question flagged in review. This PR (6bcd3fc) now restores the interlock's AUTOMATIC branch to an unconditional The removed heat-delivery logic (gated on
All host tests and static contract checks pass after the split (interlock, authority, and all five check_*.sh scripts). |
Summary
Implements product-local control authority for Jump Jet with independent operating mode, active authority, recoverable control inhibit, latched safety fault, and thermal-handling state.
Safety behavior
Cold-safe foundation
No production GPIO, PWM, ADC, thermistor conversion, fan driver, heater actuator, or hardware-dependent threshold was added or frozen. Production remains uncommissioned and Automatic target mapping remains unavailable, so this branch cannot energize hardware.
Refresh and compatibility
9664e3664418a30b274ca3ef4afafc46801e7dc40a2febc007795a988fc3eedec3f3080f09437ef2Validation
Validated head:
eb7b5c37e5434a0101c46c4ede054beec211f444GitHub Actions: firmware-build run 34479056348 — passed, including the native ESP-IDF v5.3 / ESP32-S3 build.
Local checks passed:
git diff --checkReview gates
Green CI does not authorize merge. This PR remains draft pending HQ final product approval and review against the Phase 1 hardware and product-safety contracts.