Skip to content

fix(connector): HALOT write guards, single journal hold, explicit stop evidence - #974

Draft
bloodf wants to merge 2 commits into
mainfrom
orq/tp2nlu/ship-14
Draft

bloodf wants to merge 2 commits into
mainfrom
orq/tp2nlu/ship-14

Conversation

@bloodf

@bloodf bloodf commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Draft until the Full Review verdict on the exact head.

HALOT prerequisites that need no hardware (#967). HALOT writes still ship disabled (HALOT_QUALIFIED_WRITES is empty).

  • Guards: a control instance sends at most one command, and the file-name check during stop confirmation rejects another job. Each has a test that fails on revert.
  • A natural finish never confirms a stop. PRINT_END/PRINT_GENERAL no longer confirm a cancel; a qualification entry must name its explicit stop word (cancelReached), otherwise the outcome stays uncertain.
  • One hold: the in-memory hold is gone. The command journal hold (outcome-unknown until clear_hold) is the source of truth, so a rebuilt binding cannot write while the journal holds. This moves "an unapplied command holds later writes" from halot-runtime.test.ts to fix-967.test.ts ("journal hold survives rebinding and only clear_hold releases writes").
  • Resume from PRINT_STOP is refused by default; the allowed states are per-model data in the qualification entry (resumeFrom).
  • Real dispatcher (review round 1): tests/node/fix-974r.test.ts sends signed v2 commands through the shipped pause dispatcher, command journal and production driver router into the HALOT driver, against the loopback simulator with a test-only qualification. A pause whose link drops after the printer applied it ends uncertain; after a Connector restart (new binding, reopened journal) every write is refused busy; an owner/admin clear_hold writes one audit line and releases; the next resume is sent once and confirmed. The simulator gains a drop-after-command fault; tests/helpers/command-v2-dispatch.ts can now provision a non-Moonraker binding (Moonraker default unchanged).
  • Still open, needs owner hardware: a write could reach the wrong printer after an IP change, because no reply identifies the printer. It is listed in docs/fullfarmmanager/evidence/halot.md as a precondition for qualification, so [medium] HALOT: prerequisites before qualifying any model for writes #967 stays open.

Validated: fix-967, halot-runtime and halot-protocol node tests, 29/29. The host's required checks must pass on this head before merging.

Refs #967

Refs #967

(cherry picked from commit c6da00c71c7de20c1c68ef7d315401a6aa1223fb)

@bloodf bloodf left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please exercise the real dispatcher before merging 4cc3d29. The current regression constructs the journal claim and finish flow itself. Add simulator-only coverage for an uncertain send after link loss, binding replacement and journal reopen, refusal of the subsequent write, and audited hold clearance. Keep the hardware qualification requirements and #967 open.

Signed v2 commands go through the shipped pause dispatcher, the command
journal and the production driver router into the HALOT driver, against
the loopback simulator with a test-only qualification. A pause whose link
drops after the printer applied it ends uncertain; after a Connector
restart (new binding, reopened journal) every write is refused busy; an
owner or admin clear_hold writes one audit line and releases; the next
resume is sent once and confirmed.

The simulator gains a drop-after-command fault, and the v2 dispatch
helper can provision a non-Moonraker binding.

Refs #967

(cherry picked from commit 868f5809d0f442257b265a904703fc96165b5721)

@bloodf bloodf left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rechecked 42c7133: no blocking findings in the dispatcher regression. The simulator test exercises signed commands through the production dispatcher and router, verifies the uncertain hold across journal reopen and binding replacement, blocks pause/resume/cancel until audited owner/admin clearance, and confirms one subsequent resume. The shared helper retains the Moonraker default. The two new hold tests and 22 HALOT/Moonraker regression tests passed. Please merge only after all required checks pass on the current head. #967 remains open for hardware qualification prerequisites.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant