Skip to content

fix(ci): check every current scope_hint on a changed definition, not just new ones - #14495

Merged
Git-on-my-level merged 2 commits into
mainfrom
task/msd-ci-scope-hints-all-current
Sep 18, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
task/msd-ci-scope-hints-all-current

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

What changed and why

#14466 made a newly added scope_hint that matches zero tracked paths a hard error. That
left a hole, and the App core lane's adversarial review found it: the check compares
current - previous, so editing a definition while keeping a pre-existing dead hint fires
nothing. Nine classes across 606 hints were dead on arrival and stayed fail-open.

This widens the check from newly added hints to every current hint on a changed definition.

Why not tree-wide. The obvious version — every hint of every class on every run — was
measured rather than assumed: it would have reddened roughly 50 open PRs on arrival, which
gets a check reverted rather than absorbed. Scoping it to changed definitions means only a PR that
edits a definition carrying a dead hint goes red, and after the repairs in the companion PR there
are none.

Merge order

Merge the nine hint repairs first. With the repairs already on main, this check arrives with
nothing to catch. Merged the other way round, any PR touching one of the nine would go red for a
condition its author did not create.

This PR was rebased onto current main with git rebase --onto origin/main, so it is a single
commit and carries no conflict markers.

Product invariants affected

none

How it was verified

python3 scripts/test_failure_class.py → 29 tests, OK, including
test_existing_dead_scope_hint_on_edited_definition_is_error, which is the case #14466 could not
catch. python3 scripts/failure-class validate --base origin/main --head HEAD → ok.

One detail worth stating because it is exactly the mistake that was made re-applying a change onto
main earlier tonight: the all-current-hints loop sits after the except block, not inside
it. Placed inside, it runs only when the diff raises — and the suite would still report 28 of 29
passing while the one failure was the very test the change exists to add. Read which test fails,
not the count.

Failure class (fixes)

Failure-Class: FC-zero-match-reported-as-success

🤖 Generated with Claude Code

Review in cubic

Git-on-my-level and others added 2 commits September 18, 2026 11:10
current-minus-previous left an already-dead hint fail-open when its JSON
was edited without changing the string. Check every current hint on a
changed definition.

Failure-Class: FC-zero-match-reported-as-success
Co-authored-by: Cursor <[email protected]>
# Conflicts:
#	scripts/test_failure_class.py
@Git-on-my-level
Git-on-my-level merged commit 8280ade into main Sep 18, 2026
37 checks passed
@Git-on-my-level
Git-on-my-level deleted the task/msd-ci-scope-hints-all-current branch September 18, 2026 08:37
Git-on-my-level added a commit that referenced this pull request Sep 18, 2026
The merge-forward resolved seven files to this branch's older side and would have
reverted other people's merged work:

- scripts/failure-class and scripts/test_failure_class.py went back to the
  current-minus-previous scope-hint logic, undoing #14495 and deleting
  test_existing_dead_scope_hint_on_edited_definition_is_error outright
- desktop/macos/CHANGELOG.json and releases/0.12.363.json lost eight lines each,
  and two unreleased changelog entries that the 0.12.363 release consolidated
  were re-added
- product/failure-classes.md drifted

None of those belong to the C7 builder. All restored to origin/main.

The unique diff against main is now exactly three files: typed_events.dart for
the emit routing, and the two C7 spine tests with their pending markers retired.
That is what a builder PR should be.

Verified after: both revision 019 pins present and byte-identical with main, the
narrowed "show AnalyticsManager" import retained in both test files, spine
checker exit 0 at 69 pending / 30 protected, analyzer ratchet passed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Git-on-my-level added a commit that referenced this pull request Sep 18, 2026
…14536)

* harden(dev-harness): define V1 live-session and V8 spine contracts

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

* harden(dev-harness): scope the spine-contracts check to spine paths

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]>

* docs(dev-harness): clarify the live journey adapter boundary

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.

* harden(dev-harness): pin reviewed spine revisions and align B0 capabilities

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.

* harden(dev-harness): preserve marker retirement across spine revisions

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.

* harden(dev-harness): retain corrected spine oracles through squash merges

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.

* test(dev-harness): revise live session acceptance after builder review

* test(dev-harness): bind machine fixture to actual child identity

* test(app): define typed analytics registry and consumer contracts

C7 keeps legacy wire names and queue behavior, requires executable consumers, and constrains raw calls only after adoption or in new files. Four example events remain behind a pending dispatch skeleton. Verified UTC app 2067, harness 306 passed/7 skipped/44 xfailed, spine 31 pending/9 protected, preflight 19 checks, and 20 hermetic journeys.

* harden(app): make typed event contracts satisfiable and adoption scoped

Preserve wire property spelling independently from Dart identifiers and restrict raw-call enforcement to adopted files and the one typed bridge. Revise the protected payload oracle after a Flutter matcher probe exposed map identity inside records.

Verified: TZ=UTC bash app/test.sh (2069 passed); full harness (308 passed, 7 skipped, 44 strict xfailed); spine (31 pending, 10 protected); make preflight (19 passed); fast journeys (20/20); three historical commits passed scanner replay.

* harden(dev-harness): separate oracle revisions from implementations

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.

* harden(dev-harness): retain pinned corrections after older parent merges

* harden(dev-harness): pin oracle content across shared runners and merge 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.

* test(app): require analytics privacy at the emission boundary

Add strict pending C7 oracles for initialized and pre-init queue payloads. Legacy event privacy remains C8 scope. Verification: UTC app 2071 passed; harness 320 passed, 7 skipped, 59 strict xfailed; spine 43 pending / 13 protected; preflight 19 passed.

* feat(app): route TypedEvents.emit through AnalyticsManager

Four exemplar events now reach the existing queue, including the
pre-init flush path, without copying caller-mutated property bags.

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

* Restore main's version of every file this builder does not own

The merge-forward resolved seven files to this branch's older side and would have
reverted other people's merged work:

- scripts/failure-class and scripts/test_failure_class.py went back to the
  current-minus-previous scope-hint logic, undoing #14495 and deleting
  test_existing_dead_scope_hint_on_edited_definition_is_error outright
- desktop/macos/CHANGELOG.json and releases/0.12.363.json lost eight lines each,
  and two unreleased changelog entries that the 0.12.363 release consolidated
  were re-added
- product/failure-classes.md drifted

None of those belong to the C7 builder. All restored to origin/main.

The unique diff against main is now exactly three files: typed_events.dart for
the emit routing, and the two C7 spine tests with their pending markers retired.
That is what a builder PR should be.

Verified after: both revision 019 pins present and byte-identical with main, the
narrowed "show AnalyticsManager" import retained in both test files, spine
checker exit 0 at 69 pending / 30 protected, analyzer ratchet passed.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Cursor <[email protected]>
summersmile1984 added a commit to summersmile1984/omi that referenced this pull request Sep 26, 2026
…definition

Upstream BasedHardware#18722 (43c27b7) deleted
backend/utils/task_intelligence/rollout.py but left its scope_hint in
.github/failure-classes/FC-gate-principal-outside-consolidated-entitlement.json;
scripts/failure-class treats a hint matching zero tracked paths as an
error, so failure-class-protocol fails for any range spanning that
deletion — ours does. Retarget the hint to the surviving
task_intelligence directory (upstream repairs dead hints the same way:
BasedHardware#14493, BasedHardware#14466, BasedHardware#14495).

Registered as T1 (max_added_lines 1) with upstream-prs queue row #18.

Evidence: scripts/failure-class validate --base origin/main --head HEAD
--pr-body-file /tmp/pr-body.md passes the declaration and this error;
re-run after commit.

Failure-Class: none
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