Skip to content

fix(app): register semantic controls with the Dart ext. prefix - #14571

Closed
Git-on-my-level wants to merge 18 commits into
mainfrom
task/msd-ui-b0-ext-prefix
Closed

Git-on-my-level wants to merge 18 commits into
mainfrom
task/msd-ui-b0-ext-prefix

Conversation

@Git-on-my-level

Copy link
Copy Markdown
Member

What changed and why

The five semantic-control VM extensions were registered as omi.controls.*. Dart's registerExtension requires an ext. prefix, so enabling the surface threw ArgumentError on the first method. Nothing caught it: no test called the real SDK registrar. Names are now ext.omi.controls.*, capabilities advertise exactly those five suffixes (capabilities, state, wait_ready, navigate, fault — not the unregistered action / fault.arm / fault.clear), and installed is set only after every registration returns. The B0 pending marker is gone; the protected test now passes because the SDK accepts the names.

Product invariants affected

none

How it was verified

  • python3 scripts/check_spine_contracts.py — exit 0; 43 pending markers (B0 gone; B1/V1 remain); 23 protected files. Diff against the introducing commit is only the deleted pendingContract('B0'); line.
  • flutter test --dart-define=OMI_DEV_CONTROLS=1 test/spine/b0_registration_test.dart — +1 All tests passed! (SDK registration errors empty; advertised suffixes prefix-match the five installed methods).
  • flutter test test/unit/semantic_controls_guard_test.dart — +10 All tests passed! (ordinary compilation still ineligible; installIfEligible is a no-op).
  • TZ=UTC bash app/test.sh — 38 opt-in spine tests passed (includes the real B0 registration case); 2048 ordinary tests passed (includes B0 ordinary build remains ineligible). Host timezone is not claimed; suite was forced UTC.
  • bash scripts/dev-harness/run-tests.sh — 287 passed, 7 skipped, 40 xfailed.
  • OMI_PR_BODY_FILE=.local/pr-body-b0.md make preflight — 21 checks passed in 56.66s (failure-class-protocol accepted Failure-Class: new with FC-unexecuted-control-registration).

Grep of harness, app/e2e, app/integration_test, and docs/ found no remaining omi.controls.* (no ext.) method strings. The protected V1 fixture scripts/dev-harness/tests/spine/fake_flutter.py still lists fault.arm / fault.clear in its capabilities payload; this package cannot edit that file (spine-contracts check). That leftover is V1's.

Could not verify: a live debug VM with OMI_DEV_CONTROLS=1 against a physical device. The B0 test is the SDK registration path.

Tests

  • Core path: app/test/spine/b0_registration_test.dart now executes real developer.registerExtension for all five names and reads the capabilities handler.
  • Error path: app/test/unit/semantic_controls_guard_test.dart still proves an ordinary debug build (no OMI_DEV_CONTROLS=1) never registers.

Failure class (fixes)

Failure-Class: new

Failure-class transition narrative (only when needed)

No existing class covered “a control surface whose registration no test ever executed.” FC-unexecuted-control-registration: the VM must accept every method name; a fake registrar or a rejected omi.controls.* name cannot count as installed. Guard: B0 test calls dart:developer registerExtension under the real opt-in compile, and installIfEligible marks installed only after those calls return. evidence_prs is empty; this PR is the first instance.


Part of the mobile self-driving program (App UI lane, package B0). Stacked on #14315, which carries the contract test this fix satisfies; review order is #14310, #14315, then this. Implemented by Cursor cursor-grok-4.6-high against a test written by Codex gpt-6-astra. Coordinator verification on the head commit: the only edit to the protected spine test is the removal of its pending marker (python3 scripts/check_spine_contracts.py passes, 43 pending, 23 protected files); flutter test --dart-define=OMI_DEV_CONTROLS=1 test/spine/b0_registration_test.dart passes against the real developer.registerExtension; semantic_controls_guard_test.dart passes (10).

🤖 Generated with Claude Code

Review in cubic

Git-on-my-level and others added 18 commits September 17, 2026 13:42
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.
The five VM extensions were named omi.controls.*, which registerExtension
rejects, so enabling the surface threw and no test ever executed the real
registration. Names are now ext.omi.controls.*, capabilities advertise
exactly those five suffixes, and installed is set only after registration
returns.

Failure-Class: new
Co-authored-by: Cursor <[email protected]>
…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.
Forward-merge #14408 (authorized vs rejected revision history) plus the landed HomePage timer and accessibility work. Keep B0's ext-prefix isolate and addressability checks; take main's spine checker.

Co-authored-by: Cursor <[email protected]>
…tent

Older B0 history forced replay of squash-erased intermediate bytes despite matching the accepted final digest. Resolve only target-accepted prefixes from exact pinned target versions; validate every new tail without absorbing cycles. No oracle pins or file-name exemptions changed.

Verification: regression reproduced the original digest mismatch; final harness 336 passed, 7 skipped, 59 strict xfailed; UTC app suite 2112 passed; preflight 14 checks passed. Exact B0 ea39b74 passes both merge parent orders with the patched checker; fixture edits and self-authored revision records remain rejected.

Failure-Class: none
The checker now resolves target-accepted revision prefixes from exact pinned content, so this branch can consume the already-accepted fake_flutter revision without a new digest pin.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Addressability/registration fix matches stated intent, no workflow/secret/eval signal; approve-only per standing account flag, DIRTY needs manual rebase.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Supersession audit (merge-loop, 2026-09-20): This PR's shared B0/B1 program base landed on main via #14315 (c5eb98e, merged 2026-09-18) and #14213 (820c450). Per-file comparison of this branch tip vs origin/main: 26/42 owned files are already byte-identical; the remaining 16 files' unique content was re-implemented by #14315's addressability contract (keys, route registry, semantic-controls v2). The branch's one substantive surviving delta — registering the five Dart VM service extensions with the ext. prefix (ext.omi.controls.*) — conflicts with the unprefixed omi.controls.* names #14315 standardised on. Merge-forward would reintroduce a divergent design. Holding open for owner decision: rehome with prefix (new successor PR) or close as superseded. Not merging as-is.

@Git-on-my-level

Copy link
Copy Markdown
Member Author

Closing as superseded per owner decision (David, 2026-09-20). The shared B0/B1 program base landed via #14315 (c5eb98e, merged 2026-09-18) and #14213, which standardised on the unprefixed omi.controls.* extension names. This branch's sole surviving delta — re-registering them as ext.omi.controls.* — contradicts that settled design; audit in the comment above. If the prefix is ever wanted, rehome as a fresh successor PR against current main.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @Git-on-my-level 👋

Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request.

After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing.

Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out.

Thank you for being part of the Omi community!

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.

2 participants