Repository navigation
feat(dev-harness): fake-backed V1 live-session broker (reload, restart, controls, evidence, owned teardown) - #14362
Conversation
Add strict Python/Dart pending contracts and introducing-commit protection. Reserve the live-session CLI, wire, ownership/attachment seams and failing builder acceptance tests. Add live attribution before freezing evidence v1. Verification: - bash scripts/dev-harness/run-tests.sh: 287 passed, 7 existing skips, 40 strict xfailed (24 pending V1 markers), Python 3.11.15. - make preflight: 16 checks passed, using supported PYTHON selection. - make mobile-verify fast --paths harness/session contract inputs with an absolute evidence directory: 20 executed, 20 passed, no failures/skips. - bash app/test.sh: 2014 passed, 5 skipped, one unchanged UTC+7 search_rank_grouping_test failure; affected baseline inputs match main. - Real module CLI refusals exit 2 without traceback; regression covered. - Dart SDK probe proves ext. prefix required; marker-removal formatter probe proves no incidental Dart diff. Runtime is intentionally unimplemented. App UI must repair current invalid VM extension names before live acceptance; unsupported journeys block. Simulator/emulator latency and detached-process acceptance remain V1 work. make setup installed hooks but full backend wheel sync stalled; isolated Python 3.11 harness dependencies ran the owner checks without any skip flag. Failure-Class: none
The check protects files under the spine roots and their registry, so it only needs to run when those change. A repo-wide trigger would run it, and its full-history requirement, on every unrelated contributor PR. Co-Authored-By: Claude Fable 5.1 <[email protected]>
V1 must refuse live journey execution until a shared executable adapter exists; B1 addressability alone cannot attach Dart integration tests. Pure admission contracts remain valid with injected supported IDs. Verification: harness 287 passed, 7 skipped, 40 strict xfailed; make preflight passed 20 checks.
…lities Coordinator turn-4 review authorizes the V1 fixture correction. Exact before/after digests pin the revised oracle; immutable revision records do not permit builder assertion edits. Active tests reject missing/tampered records and prove the fake machine response. Verification: full harness 289 passed, 7 skipped, 40 strict xfailed; UTC app 2020 passed; spine 24 pending/7 protected; make preflight 16 passed. No live device acceptance claimed.
Track retained marker occurrences rather than counts so retiring a second test cannot restore the first test's retired marker. The active regression covers this swap and legitimate continued retirement. Verification: full harness 290 passed, 7 skipped, 40 strict xfailed; spine 24 pending/7 protected; make preflight 16 passed. Dart sources unchanged after the earlier UTC app 2020-pass run.
…rges A squash can introduce a corrected contract and its review records in the same commit. Absorb only the revision prefix ending at that introducing file's exact digest, preserving immutable records and later marker-only edits. Active temp-repo regression covers multiple corrections in one squash and rejects restoring old or altered assertions. Verification: harness 291 passed, 7 skipped, 40 strict xfailed; B1 make preflight 20 passed; final B1 journeys 20/20. Dart unchanged after UTC app 41 opt-in and 2051 ordinary passed.
LiveSession speaks the Flutter machine wire against an injected child, records BrokerIdentity in live.json, and refuses real flutter run from CLI dispatch. Co-authored-by: Cursor <[email protected]>
…lease Lifecycle order is live teardown, then services, then device detach; recover still has generation 1 while teardown runs. Co-authored-by: Cursor <[email protected]>
The fake-backed broker now satisfies those spine tests; only whole pending-marker lines were deleted. Co-authored-by: Cursor <[email protected]>
…esses A dead flutter child mid-reload is blocked, never success; teardown will not signal a live PID whose start time, marker, or boot id does not match. Co-authored-by: Cursor <[email protected]>
file_sha256 raised IsADirectoryError on a simulator .app; identity is now the sorted tree of regular files. Failure-Class: none Co-authored-by: Cursor <[email protected]>
…nto task/msd-harness-v1-live-session-pr1
Architect conformance review: does not conformReviewed at immutable ref The fake-backed boundary this PR chose is valid — that design decision is accepted. The Required changes, all in
Two things the review credits explicitly: One claim needs narrowing rather than fixing: "nothing reachable from the CLI signals a real The oracle had one defect of its own, and it is the architect's, not yours: the readiness The new tests are |
The architect's thirteen probes rejected attributing a compile to source observed after launch, announcing stopped after a failed reap, and grepping one fixture secret. Keep one monotonic RPC deadline and actually validate negotiated capabilities. Failure-Class: none Co-authored-by: Cursor <[email protected]>
Rework pushed for a second conformance pass —
|
Architect conformance review, round 2: still does not conformReviewed at The framing to take from this: zero pending markers establishes only that these bodies Three required changes in
Per-class assessment: source/generation admission and source rechecks are real fixes but Note that required change 1 is the same distinction as #14394's — fencing at admission versus at Separate integration finding, and it is the architect's to fix, not yours. The two round-7 🤖 Generated with Claude Code |
… redaction _assert_generation only covered admission, so a lease roll during ext.omi.controls.state still published ok and advanced loaded identity. Recheck lease and child generation after daemon/readiness work, refuse non-boolean readiness, and redact complete Authorization values before logs are retained. Failure-Class: none Co-authored-by: Cursor <[email protected]>
Round 3 pushed — fenced at publication, not only admissionAll three remaining required changes are addressed at Publication generation. Worth noting for the record: the pattern is borrowed from #14394 — capture the token before Readiness. Authorization redaction. Harness suite 380 passed, 6 skipped. Still a draft, awaiting the architect's fourth pass. 🤖 Generated with Claude Code |
Take main for the architect-owned spine checker, formatted round-7 oracles, mobile_session.py, and PENDING_CONTRACTS.md. Keep the V1 live_session implementation and pending-marker retirements on session/revision oracles. Co-authored-by: Cursor <[email protected]>
…assed T7 markers Keep main's port-claim mobile_session.py; put back V1 live teardown on stop/reset/recover. The formatted round-7 oracles now pass, so remove only the pending-marker lines. Co-authored-by: Cursor <[email protected]>
The merge commit ran dart format without package:flutter_lints resolved and rewrote main's files. Restore origin/main bytes so the V1 PR does not carry unrelated UI diffs. Co-authored-by: Cursor <[email protected]>
Name the session and holder pid immediately. The same overlap that used to look like a controls-extension miss is a held lease. Co-authored-by: Cursor <[email protected]>
…now pass Merging origin/main imported strict xfails for lease-roll, negotiation, and auth-redaction fences this branch already implements. Co-authored-by: Cursor <[email protected]>
Finding 2 of the adversarial review reproduced: a fake reporting readiness.signedIn as the string "false" was classified not-ready and fell through to the wait_ready recovery path, which then observed real booleans and published ok. _is_ready now raises LiveError (malformed-response) for present-but-non-boolean flags, so start blocks instead of self-healing; start/reload/restart wrap it and surface blocked/malformed-response. The stringy-false regression test's expected error_code moves unready -> malformed-response; blocked-stays-blocked is unchanged. The satisfied V1 pending marker on the boolean probe is retired. Findings 1, 3 and 4 did not reproduce at this head (probes re-run verbatim; evidence in PR comment). Failure-Class: new
|
Adversarial re-verification complete (probes re-run verbatim at head; owner suite 422 passed / 6 skipped):
The satisfied |
What changed and why
V1 PR1: a fake-backed live Flutter broker (
LiveSession,decode_request,validate_live_evidence, full-identityteardown/stop_owned_broker) plus lifecycle order live → services → device. CLImobile-session livedoes not spawnflutter run; tests injectfake_flutter.py. Also folds the spike's iOS.appdirectory hasher (clean cherry-pick). Platform-alias /start --jsonstdout purity did not apply cleanly on this base and stays on the simulator-lane package.Product invariants affected
none
How it was verified
python3 scripts/check_spine_contracts.py→Spine contracts: 0 pending markers; 8 protected files(marker deletions only).bash scripts/dev-harness/run-tests.shandmake preflight(OMI_PR_BODY_FILE=.local/pr-body-v1-pr1.md) → 347 passed, 6 skipped. The skips are existing Windowsskipifs intest_python_resolver.py. No new skips.flutter runstart is exercised in this PR.make preflightwith this body: 16 checks passed in 124.98s.Protected tests require controls profile
localDev. The real app reportslocal_dev(spike.local/v2-machine.jsonl). This PR implementslocalDevas the tests demand. Two other contract/docs mismatches go to the architect with the sign-in design question:LIVE_SESSIONS.mdstill namesmake setup-backend(wheels aremake lane-backend); readiness still wants a signed-in fixture principal that nothing currently produces.Tests
scripts/dev-harness/tests/spine/test_live_session.py,test_live_revision.py— all@pending("V1")markers retired because those tests now pass.scripts/dev-harness/tests/test_live_builder_regressions.py— the six lazy holes (spawn+wait_ready, fault RPC sent, lifecycle order, distinct reload error codes, verify contacts broker then exit 2, close-one-keeps-the-other) plus two real-child cases (flutter child dies mid-reload → blocked never success; teardown refuses a live PID whose start/marker/boot_id do not match).test_file_sha256_hashes_an_ios_app_bundle_directory.Remaining pending (not spine markers; out of this PR):
flutter runon a device / simulator (dispatch refuses with exit 2).fast --sessioncontacts status then exit 2).adb reverse, physical devices, any latency claim, sign-in.start --jsonstdout purity (cherry-pick3f76814d77conflicts onmobile_session.py).Failure class (fixes)
Failure-Class: none
The hasher commit is a
fix:of an iOS.appIsADirectoryError; it is not a recurring failure-class instance.Part of the mobile self-driving program (Harness lane, V1 PR1). Stacked on #14310, which carries the contract tests this satisfies. Implemented by Cursor
cursor-grok-4.6-highagainst tests written by Codexgpt-6-astra, after two rounds of builder review of that contract. Coordinator verification on the head (with the updated base merged in):python3 scripts/check_spine_contracts.pypasses with 0 pending markers and the protected test files show only marker-line deletions;bash scripts/dev-harness/run-tests.sh357 passed, 6 skipped, 0 expected failures. The module signals no process itself:stop_owned_brokerrefuses unless the observed identity equals the recorded one in full, and the terminator is injected; the CLIliveoperations still refuse to spawn (exit 2), so nothing in this PR can start or stop a real Flutter process. Draft until the architect's conformance review. Not exercised here: a realflutter runstart, the journey adapter, Android, physical devices, sign-in, any latency claim.🤖 Generated with Claude Code