Skip to content

M8: offline host lifecycle and seven-screen usability - #13

Open
JordanD120 wants to merge 5 commits into
codex/m7-storage-backupfrom
codex/m8-offline-usability
Open

JordanD120 wants to merge 5 commits into
codex/m7-storage-backupfrom
codex/m8-offline-usability

Conversation

@JordanD120

@JordanD120 JordanD120 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Tasks 125/132 add offline synthetic host service supervision and usability improvements to the existing seven-screen HMI. M7's acceptance at 55d69c558f5c134540299128aa23f4415550f9fa, evidence, limits and M8 authorization are recorded in docs/phase0/M7_REVIEW_VERDICT.md. This branch starts directly at that reviewed head and targets codex/m7-storage-backup; preserve #5 → #6 → #7 → #8 → #9 → #10 → #11 → #12 → M8, all unmerged.

The explicit host graph owns a marked workspace, fresh synthetic gateway, verified SQLite/restart/grow/logging services, optional synthetic sensor/camera/local-ML adapters, history/export, backup and one supervised worker. OS ownership refuses duplicates. The optional launcher binds only 127.0.0.1 and leaves the POST authorizer unset; its default adapter only acknowledges STATUS/OFF, with no sensors/camera/model installed. Unmanaged acquisition-loop startup now refuses operation. Missing/corrupt/unmarked databases are never silently replaced/adopted. Worker/DB/logging/gateway faults latch inhibition and request STOP through M1. Recovery discards old confirmations/authority objects/input health, pauses grow cycles and holds persisted capture schedules until explicit reconfiguration. Interrupted inference receipts are recovered even when no model adapter exists, without rerunning inference. Shutdown retains ownership while requests/media/jobs/workers remain active.

All assets and runtime requests are local; same-origin CSP and API no-store headers support offline behavior without a cloud API, CDN or remote inference. No permission cache, service worker or offline POST queue is added. Internet disconnection is distinct from losing the local Flask connection: the latter shows unknown status, hides stale camera/current permission state, disables commands and never replays POSTs on reconnect. Local service details show dependency/readiness/fault/recovery instructions without claiming missing adapters are healthy.

Usability adds keyboard skip navigation, current-page indication, visible focus, described Cancel-focused dialogs/Escape cancellation, touch/readability/scrolling/layout improvements at 739×447 and clear default-restricted/recovering/degraded/unavailable states. Original screens/navigation and all prior workflows remain. M1 permission/command code is unchanged; data mutation leases only quiesce supporting services. Production POST authorization is not enabled by the launcher or an HTTP flag.

M8 adds 22 tests for offline sockets/HTTP, dependency order, conservative startup/shutdown, repeated restart/history retention, fresh owner enforcement, duplicate/missing/stale/blocked workers, data-request/job quiescence, DB/logging/gateway failures, missing/corrupt/unmarked DB preservation, current-to-stale synthetic samples, optional camera/model states, persisted capture schedule holds, interrupted artifact/inference receipts and production denial. Chromium exercises all seven screens with external origins blocked, local assets/CSP, keyboard focus/skip/navigation, no horizontal overflow, touch size, Cancel/Escape no dispatch, localhost disconnection/no POST replay, DB/core-worker recovery with paused/unarmed schedules and stale images. The complete campaign retains every prior Python/C++ test and all six M1/M4/M5/M6/M7/M8 browser flows.

Implementation, traceability and limitations, host operating instructions, and M7 verdict. Exact logs, 113 verified source hashes, CI results and screenshots are committed. Tested implementation: 1ab1acdd54fe9bb753e0382fce264ff376c98ce2; review/evidence head: e1511c1fa39a155801e5c1855872747c9b78c8f8. All 248 tracked checks, actual-sketch C++ and all six Chromium flows passed source-head PR CI and push CI. Local Windows results retain two symlink-privilege skips; POSIX CI runs those checks. Nine preserved root-app tests also passed locally. Final-head PR CI and push CI both passed the complete campaign at the review head.

Boundaries remain explicit: offline runtime requires locally installed dependencies and a reachable local Flask host; it is not an offline browser-shell cache or production installer. Factories/authorizers are trusted Python, not a sandbox. Hanging native I/O can delay watchdog/shutdown; no physical safety/real-time/target endurance or full accessibility/novice acceptance claim is made. Default CLI POSTs remain restricted. Runtime adoption of restored copies, target services, electrical/sensor/crop approvals, real camera/model validation, authentication/network/security, controlled requirements release and retention remain open.

No Pi deployment/system-service installation, real sensors/camera/actuators/models, firmware, production POST enablement, new network exposure, historical deletion/retention enforcement, PR merges or Gantt changes. All 15 original hashes, untracked work, data contracts and the M1 gateway architecture are preserved. Return for M8 review before M9.

Review limitation: earlier paused-summary waits intermittently timed out in the existing M4 browser and one local M8 run; later complete campaigns passed without relaxing previous assertions/timeouts. Cause is unresolved; new M8 failure diagnostics retain DOM/API state. This is explicitly recorded in the evidence, not treated as proven resolved. The lifecycle separately now fails closed on a latched repository error even after a successful probe.

The source-range secret scan is clean. The full evidence-range scan flags two API-named SHA-256 entries; both were independently recomputed against HMI_API_CHECKLIST.json and api_requests.json and verified as content-hash false positives.

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