Repository navigation
harden(app): addressability contract (keys, route registry, semantic-controls v2) and the real dev-control registration test - #14315
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.
Expose a registrar seam behind the unchanged eligibility gate, execute every production registration against the Dart SDK in a separate opt-in compilation, and pin exact capability advertisement. Keep the invalid names pending for App UI B0 to repair; ordinary builds retain the authoritative guard suite. Verification: opt-in spine 38 passed including executing pending cases; TZ=UTC bash app/test.sh passed 2048 ordinary tests. Host UTC+7 reproduces the unchanged search_rank_grouping_test failure (Bad state: Too many elements). Temporarily correcting the prefix and capability list produced strict XPASS B0 (exit 1); mutation restored. No device or production endpoint used.
Specify B1 keys, route inventory, bounded v2 state, eligibility, readiness and real navigation/semantics contracts without migrating a screen or hot file. The shared catalog generates Dart keys; a constrained token scan enforces changed-file no-growth debt and explicit page/navigation registration. Protected surface contracts drive the actual SDK-registered handlers and real production page types on both widget target platforms. Implementations remain unimplemented; builders can only remove pending markers from spine tests. Verification: TZ=UTC bash app/test.sh passed 38 opt-in spine cases and 2048 ordinary tests; Dart analysis found no issues. The host UTC+7 suite reproduces one unchanged search_rank_grouping_test failure. Selected mobile-verify fast journeys: 20/20 passed, receipt .local/b1-journeys/verify-receipt.json. Harness: 287 passed, 7 existing skips, 40 strict xfails. Scanner: 11 tests pass. Spine check: 44 pending markers, 23 protected files. Preflight: 20 checks pass. No physical app or accessibility acceptance is claimed for these skeletons.
Inventory conventional Page/Screen/Drawer/Sheet widget classes as well as page files, so adding a screen inside an old file cannot evade B1 registration. Freeze the 106 existing unaddressed screen declarations; keep the unkeyed-widget baseline unchanged. Unconventional names and computed factories remain explicit limits of the constrained scanner. Verification: 12 scanner tests passed, including the old-file/new-screen case; changed-file checker passed; make preflight passed all 20 checks. No Dart code or protected contracts changed in this refinement.
…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.
Apply coordinator-authorized spine review: bound acceptance to 15 controls, generate one constructor vocabulary, prove retained IndexedStack state, clarify onboarding and busy Futures, and drop lexical screen/navigation inventories. Explicit route declarations and unchanged debt ratchet remain. ADDRESSABILITY.md shrinks from 1159 to 1012 words. Verification: UTC app 41 opt-in plus 2051 ordinary passed; harness 289 passed, 7 skipped, 40 strict xfailed; scanner 13 passed; spine 44 pending/25 protected; analysis clean; preflight 20 passed; journeys 20/20 before test-only helper relocation. No hot files or product behavior changed; native accessibility acceptance remains builder work.
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.
…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.
…dressability # Conflicts: # scripts/dev-harness/PENDING_CONTRACTS.md
Use the actual PR base and immutable exact scaffolding snapshots to reject mixed revision/implementation diffs. Exercise a real squash and child merge. Correct local_dev wire spelling from the simulator RPC and add adversarial V1 conformance oracles after reviewing the first broker. Verification: UTC app 2064 passed; full harness 303 passed, 7 skipped, 55 strict xfailed; spine 37 pending/9 protected; preflight 16 checks passed. Isolated reviewed-broker probes failed 9/9 as documented in the conformance report. No real app/device launch.
Preserve registry/manifest union, reviewed oracles, and main's hermetic env guard before both Dart runs. UTC app: 41 opt-in + 2124 ordinary passed. Harness: 311 passed, 7 skipped, 59 xfailed. Full preflight/spine rerun follows the committed merge: the scope diagnostic identifies app/test.sh's stale immutable scaffolding hash after main integration; no policy or gate changed.
…ge orders Keep exact oracle digests and immutable revision records. Traverse full reachable history and match revision payloads by digest. Shared runner metadata requires direct fail-fast suite invocation instead of pinning shared file bytes. Both new regressions fail on the old checker. UTC app 2064 passed; final harness 306 passed, 7 skipped, 59 strict xfailed; spine 39 pending/10 protected; preflight 16 passed. No protected oracle bytes or legacy scope pins changed.
Spine revision014 preserves teardown and markers, checks real row identities and ARB labels, and exercises Apps navigation plus distinct local-dev sign-in. Builder migrates starter catalog/schema/generator; no product implementation. Verification: UTC app44 opt-in plus2127 ordinary; harness313 passed/7 skipped/59 strict xfailed; spine61 pending/29 protected; preflight20 passed.
Preserve B0/B1 oracles and main's newer mechanism, runner guard and production fixes. UTC app suite: 44 opted-in spine cases and 2146 full-suite cases passed. Harness: 335 passed, 7 skipped, 59 strict xfailed.
Real SettingsDrawer on Flutter 3.44.5 is inactive after Done but a single 1s pump starts its reverse ticker at elapsed zero. Both widget platforms dispose it after 13 additional 16ms frames. Wait for the captured route's completed future, then require actual page disposal including offstage. Preserve all pending markers in revision018. Verified: eight active dismissal regressions; exact revised oracle against builder ce02e605fd passes both platforms and XPASSes with markers retained. Full app suite 2154 passed; harness 335 passed, 7 skipped, 59 strict xfailed; spine 61 pending / 31 protected; make preflight passed. No app implementation changes.
Git-on-my-level
left a comment
There was a problem hiding this comment.
Readiness review — READY (content), merge blocked on conflict resolution
Reviewed at head 8c4009a2fa14adfbe6d2fde0921e22d8db5779b2 (46 files, +3116/−13). The change passes review as written; the branch is conflicted against main and a coordinator must resolve before merge. Not merging from this review.
1. Real behavior, not source shape — yes. The checker (scripts/check_app_addressability.py) is a token-level scan and says so honestly (ADDRESSABILITY.md "Honest enforcement"; static checkers labeled as such per repo rule). The spine tests are behavioral: B0 executes the real production registration through the Dart SDK via an injected register hook and pins exactly the five ext.omi.controls.* handlers; B1 checkSurface pumps actual production pages/providers, asserts root keys, wire-vs-production snapshot equality, refusal codes as failed Futures, and real route-pop dismissal with bounded frames.
2. False-positive risk and escape hatches — sound. Opt-in // omi-route: declarations; changed-file + merge-base scoping (unrelated incoming-main changes don't tax contributors); adoption-only ratchet (legacy growth allowed, adopted regression and adoption-removal blocked — all tested); --surface never zeroes directory debt; every error class carries an actionable remedy. Residual escapes (aliases/wrappers, unmarked new screens) are documented with the named trust trade-off, not hidden.
3. Friction bill. No discussion of it exists in this PR or its cross-referenced PRs (#14319/#14396/#14399/#14327 have zero comments/reviews); nothing in commit messages either. The evidence is the PR body and the design itself: the Turn 5 correction ("adopted-files.json explicitly names migrated files; legacy growth no longer blocks ordinary contributors"), checks restricted to changed files, and "no whole-tree source walk on ordinary contributor diffs". If the roadmap discussion the owner referenced lives outside GitHub, consider linking it here. Substance is present; the citation available is the PR body itself.
4. Test coverage of the check — strong. 13 hermetic tests cover child-key laundering, generic/named constructors, multiline args, comment/string exclusion, disabled widgets, helper/dialog non-inventory, unmarked-screen opt-in semantics, remedy text, legacy-growth/adoption-irreversibility, merge-base scanning, generated-vocabulary identity, and fixture identity binding. Independently re-ran python3 scripts/test_check_app_addressability.py on the head sources: 13/13 pass, default scan exits 0. app/test.sh runs test/spine with OMI_DEV_CONTROLS=1 in addition to the ordinary suite, preserving the fail-closed "ordinary build does not enable B1 controls" guard.
5. Protected trees — no violation. app/test/spine/: 20 new files, zero deleted lines. contracts/spine/: files.json +21/−0 (registrations only) plus 4 new hash-pinned revision records (append-only mechanism). scripts/dev-harness/tests/spine/: untouched. Every pendingContract('...') occurrence in the diff is an addition — new pending tests this PR introduces; no existing marker was removed.
6. CI on head 8c4009a2 — green. 14 success, 15 skipped (path-filtered lanes; the manifest executes unfiltered inside Hygiene, which passed, so both new app-addressability* checks ran). No failed/cancelled/timed_out runs on this SHA.
Conflicts with main (3 files, via git merge-tree --write-tree):
.github/checks-manifest.yaml— this PR only addsapp-addressability+app-addressability-check-tests;mainaddedcapture-ownership-boundaries,mobile-boundary-check-tests,mobile-event-registry,registry-conflict-resolver-testsafter the fork (their scripts don't exist on this branch). Resolution is a union keeping both sides, and keep main's--base/--headform ofproduct-invariants(the PR-side hunk there is stale, not an intended change —--changed-fileswas already the merge-base form).contracts/spine/files.json— union of registration entries (PR adds 20; main adds its own).scripts/dev-harness/PENDING_CONTRACTS.md— both sides append; union.
Non-blocking nit: ADDRESSABILITY.md says "17 distinct controls" while its own table and the catalog both contain 15 (the protected catalog test pins exactly those 15). Fix the count, or land omi.home.tab_apps / omi.onboarding.local_dev together with their scenario tests per the doc's own rule.
Marking ready for review; merge remains blocked on the conflict resolution above.
# Conflicts: # .github/checks-manifest.yaml # contracts/spine/files.json # scripts/dev-harness/PENDING_CONTRACTS.md
What changed and why
Revise B1 after App UI's buildability review: surface acceptance is its route, retained visible root and 15 explicitly catalogued controls across nine surfaces. Generate the static/runtime constructor vocabulary from one catalog, preserve IndexedStack state, and replace noisy page/navigation inventories with explicit route declarations in changed files. No product screen or hot file changes.
One review claim needed correction: Flutter 3.44.5's default finder already excludes inactive IndexedStack children. The old assertion did not require destroying tab state; the revised test additionally proves retained element identity and return behavior. The other scope/enumerator/contributor-friction findings stand. V1's B0 capability correction is committed on its owning live-session branch and merged here without rewriting history. Reviewed spine revisions are hash-pinned and append-only; builders still may only remove pending markers.
Product invariants affected
none
How it was verified
TZ=UTC bash app/test.sh: 41 opt-in spine cases and 2,051 ordinary tests passed on the final Dart sources;.local/t4-b1-app-delivery.log.PATH="$PWD/.local/harness-venv/bin:$PATH" bash scripts/dev-harness/run-tests.sh: 291 passed, 7 existing skips, 40 strict expected failures;.local/t4-harness-squash.log.python3 scripts/check_spine_contracts.py: 44 pending markers / 25 protected files;.local/t4-b1-spine-delivery.log.python3 scripts/test_check_app_addressability.py: 13 passed; the normal checker passes and the unkeyed baseline is byte-for-byte unchanged. Logs.local/t4-b1-scanner-tests.log,.local/t4-b1-scanner.log.dart analyze: no issues;.local/t4-b1-analyze-delivery.log.make preflightusing the explicit PR body and Python 3.11 harness environment: 20 checks passed;.local/t4-b1-preflight-squash.log.TZ=UTC make mobile-verify ARGS="fast --paths app/lib/services/dev_controls/addressability.dart app/test/support/addressability_widgets.dart --evidence-dir $PWD/.local/t4-b1-journeys-final"(same Python environment): 20/20 passed, zero failures/skips;.local/t4-b1-journeys-final/verify-receipt.json.An intermediate app run compared stale compiled catalog data while its source was being edited and failed the new catalog guard; the final full rerun above passed. Preflight initially rejected the test-only predicate under lib as dead code; moving it to test/support resolved that without changing a gate, allowlist or debt baseline.
No simulator, emulator, physical-device or VoiceOver/TalkBack acceptance claimed. B1 remains a compiling skeleton with strict pending acceptance tests. Platform-wrapper unit tests use fake executables; no production app or endpoint was used. The known capture replay flake remains owned by Harness; no related code was changed.
Turn 5 universal ratchet correction: adopted-files.json explicitly names migrated files; legacy growth no longer blocks ordinary contributors. New files and adopted regressions still fail; declaration/catalog checks are unchanged. Checker tests exercise all three cases plus irreversible adoption. Verification: UTC app 2051 passed; harness 291 passed, 7 skipped, 44 strict xfailed; preflight 20 passed; checker 13 tests passed and default scan zero errors. Artifacts .local/t5-b1-*. No widget behavior changed in this policy-only follow-up.
Tests
Active Flutter test proves onstage/all-element finder behavior and retained IndexedStack state. Active constructor tests cover GestureDetector, InkWell/InkResponse and Cupertino controls. Protected catalog test prevents shrinking the initial 15 controls. Revised protected surface template drives real registered navigation/state handlers, actual page/root reachability, localized semantics and real accessibility actions for chat input, tab switching, seeded-row navigation and close controls.
Scanner tests reject unknown explicit route declarations with an actionable remedy, permit helper/dialog/confirmation additions, restrict source validation to changed files and prove --surface accepts catalog references without zeroing unrelated directory debt. The unchanged no-growth baseline remains enforced. V1's active fake-process test pins exactly B0's five capabilities; revision-mechanism tests reject assertion edits, altered/deleted records and broken hash chains.
Failure class (fixes)
Failure-Class: none
New guards (only when adding a check or ratchet)
These are revisions of the existing B1 and shared spine guards. Builder review reproduced false positives on helper-file shapes from PRs #13019/#13059 and ordinary showDialog additions. The lexical checker now makes the weaker honest guarantee: explicit declarations must register; unmarked new screens require review. No arbitrary page/helper classification remains. The pending revision mechanism is shared by Dart and Python.
Three places this design may be wrong:
Part of the mobile self-driving program (Spine A). Designed by Codex
gpt-6-astra; revised after a buildability review by the lane that will build on it.🤖 Generated with Claude Code