Skip to content

Architecture quality: runtime ownership, collocated teardown, trustworthy impact and test evidence (umbrella) #4045

Open
12 of 17 issues completed

Description

@thymikee

Purpose

Implement the owner-boundary improvements from the last-200-commit audit at 144bd59890277fd4717995588ad817597c9d6552. Prioritize truthful shutdown, complete runtime construction, and trustworthy impact/evidence reports. Group changes by their production owner.

The audit measured 1,875 production files, 10,635 import edges and 43 zones, with no value or zone cycles. Broad restructuring is not the objective.

Work grouped by owner

Runtime ownership and teardown

Dependency and validation evidence

Apple snapshot semantics

Command declaration and help owners

Measured architecture decisions

Current state

Nine original PRs have merged outside this orchestration run: #4061, #4066, #4067, #4068, #4073, #4074, #4075, #4076 and #4078. Review follow-ups #4079, #4081, #4082, #4083, #4084, #4085, #4087 and diagnostic #4090/#4094 have also merged. No merge was performed by the orchestrator.

Open original work: #4063 and #4065 are ready for review at the maintainer’s request. #4063 implements the typed shutdown-error decision and passes all 41 local affected checks at 7222a41f03; source-pinned native cleanup proof remains. #4065 retains request-ID forwarding at 49db3b83ed; the comment dispositions are current, while live local-runner/scoped-provider evidence and the broader #4060 failure investigation remain. Review readiness does not mark either PR merge-ready or supply missing evidence.

Recent review work Evidence and remaining work
Merged #4081 — typed teardown fixtures Main recording metadata preserved; 25 direct consumer tests pass. Its exact local gate failed the Apple-output record budget. The unchanged current base failed a different staging assertion, so no matching-base or contention claim is made. #4060 retains diagnosis. Merge does not replace that failed receipt.
Merged #4084 — ADR hub-split reference One-line correction; format and exact zero-selected-check invocation pass at 6d7cdc99a2, receipt run-nDlAMe.
Merged #4085 — remove duplicate path guard Stronger CLI boundary requires regular files. Isolated baseline/restored 29 passed; missing-path and directory controls each fail three intended checks. All six selected checks pass at 2c9c342722, receipt run-QXplSD; Coverage subsequently passed.
Merged #4087 — focus provenance Captured words are distinguished from synthetic type 57; values and expectations unchanged. 103 focused tests pass. Its exact unit receipt failed two entrypoint cases (16,445 passed/two failed/one skipped). Unchanged-base unit and a focused observed probe passed; original causes remain unknown in #4086. Prose-presence assertions were declined because they cannot establish capture truth.
Merged #4090 — idle failure evidence Original assertions retained; sanitized identity/removal evidence survives cleanup. Seven focused tests and controlled failure/sentinel proof pass. Full exact tooling/Fallow/unit passes (16,447 passed/one skipped; run-804amS). #4086 awaits an actual failure trace. Detached declined removal is allowed; embedded SDK API work stays deferred until after #4063.
Merged #4094 — bound diagnostic values Follow-up to #4090's optional review: known error-code vocabulary and five declined-registration reasons bound appended values. Seven focused tests pass; disposable filtering/revert control proves unexpected strings and objects are excluded. Independent review found no findings. All five exact affected checks pass at fb0dc518e3, receipt run-JnVNMA (exactCommit: true, checkout unchanged); seven related tests pass. Merged externally; the local receipt remains a narrowed pass, with no full-unit/native inference.

All 19 earlier PRs and 15 child-issue discussions were checked in this review pass. Every inline thread is resolved. New comments have fixes or explicit retain dispositions; optional suggestions do not imply additional API or abstraction work.

Both registry layers passed full own-head validation before merge; guidance is 39,987/40,000 bytes. #4083's existence loop duplicated a pre-existing CLI contract; #4085 removes it, superseding any earlier unique-detection claim.

The historical Apple smoke failure at #4073's 2fbcbb2a2a is selector_not_found for automation-close-sheet in smoke:automation-input; no smoke repair or infrastructure claim is made. Native/parked/skipped lanes are not local passes. B2 #4050, E1 #4056 and E2 #4057 remain closed retain decisions. The umbrella stays open.

Sequencing and ownership

  • Wave 1: A1 on GPT-6.1 Terra; A2 and B1 on Claude Sonnet, each in an isolated app-managed worktree. Their source scopes are disjoint.
  • Wave 2: A3 after A2 review; C1 with trait-producer scope; D1a then D1b as an explicit dependency stack; D3 as a small guard correction. B2/B3 can run as bounded evidence work when worker slots permit.
  • Wave 3: E1 after the registry sequence for stable closure measurements; E2 after B1 if it uses dynamic reachability. Actual moves wait for runtime ownership work to settle.
  • Only D1b depends semantically on D1a; E2 depends on B1 for the planned graph evidence. Other ordering notes prevent file or validation conflicts and are not semantic blockers.
  • Separate owner batches produce separate reviewable PRs. No automatic merges or releases. If a prerequisite is unmerged, explicitly stack on its reviewed branch or wait; never pretend it is on main.

Scope decisions from independent Claude review

The scope review checked the issue contracts against source at the audit SHA. It narrowed A2 to construction, made native applicability explicit for C1, chose existing Android coverage-evidence owners for B3, and required a two-layer registry extraction.

Validation and completion

  • Each implementation runs local frozen install/build, focused checks, full-repository OXC format, and commits before exact-head validation.
  • The orchestrator schedules broad checks and subprocess-heavy experiments. Use the existing host lock; do not add wrappers or remove locks.
  • An independent reviewer receives requirements, base and head SHAs and the worktree. Report validation skips and exact missing device evidence; do not claim fixture parity as live coverage.
  • A1 must prove owner failure is surfaced, later cleanup continues, and registration stays retained. A2 must prove complete construction does not bypass claim admission. B1 must disclose partial attribution without altering gate selection.
  • Decision tasks finish with evidence and a justified accept/retain result. Accepted implementation beyond the bounded contract needs a separate child scope.
  • Keep completeness, golden, identity and type-pin contracts. No blanket test deletion, capability defaults, async registry construction, gate waivers, new lifecycle framework or telemetry store.
  • Close this umbrella only after checking actual child states and implementation PRs. Checked boxes alone are insufficient.

Related prior work

Earlier architecture umbrella #3276, root moves #3294 and eager-split gate #2469 are closed. This program does not reopen their completed work. ADR 0027 governs statement-neutral splitting; ADR 0028 is proposed in the audit base; #4072 records the rejection outcome; ADR 0033 constrains remaining physical moves.

Activity

  1. thymikee commented on Oct 29, 2026

    @thymikee
    MemberAuthor

    Decision: implementation scope: Independent Claude review is incorporated. Retain the two-line bounded-audio classification and the three redundant help assertions; no standalone cleanup issues were opened. Preserve gateway shutdown Promise, surface aggregate failures, continue daemon cleanup, and explicitly widen only the SDK close outcome to failed. A2 stays at request construction. C1 covers actual trait-based producers and does not claim pure XCTest trait parity. D1 is split into #4053 then #4054. B2/B3/E1/E2 are bounded evidence decisions; retain is a valid outcome. Scheduling notes are not semantic blockers.

  2. 20 remaining items

  3. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state: #4063 review decision is implemented at 7222a41f033921c25e2b5b7d992c34e755362fc9, rebased on 066b3764efadd84a1c53d7631dbd452d5404136e. Owner shutdown now reports one typed COMMAND_FAILED AppError with per-owner normalized failures; the daemon normalizes once. Claim retention and primary-error/retention precedence remain intact. Error construction loads only on failure and stays within existing closure budgets.

    All 41 local runnable affected checks pass at that exact head (run-lcOqqw, exact commit, checkout unchanged): unit 16,479 passed/one skipped; related 1,247 passed; provider integration 222 passed. The 25 CI-owned/parked checks are not local passes. Two independent read-only review rounds found no findings. Final-head isolated proof passes 50 tests, fails nine intended cases under the old outer error shape, then passes 50 after restoration; disposable removed and source preserved.

    The review's typed-error requirement is addressed and the PR description/replies are current. #4063 remains draft because source-pinned native cleanup evidence and CI obligations remain. Historical #4060 failures and earlier export/loading failures retain their own failed receipts; no root-cause or contention claim is made. #4065 and the other open diagnostic issues are unchanged. No merge or release was performed.

  4. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state: #4063 and #4065 are now ready for review, explicitly requested by the maintainer. Heads are unchanged: #4063 7222a41f033921c25e2b5b7d992c34e755362fc9, #4065 49db3b83ed93581cd2055fe0e80ad7081932ff39.

    #4065's comments have a renewed concrete disposition: the shared recording input remains request-optional because Android durable recovery constructs it outside a request; the transcript has no request-ID field, so no invented scope assertion is added. Refs #4060 remains correct. No source change or new test run was needed in this metadata/disposition round.

    Both descriptions retain remaining merge evidence. #4063 has its exact 41-check local pass; source-pinned native cleanup proof remains absent. #4065 still lacks source-pinned recording/currentUptimeMs and real scoped-provider evidence; its historical isolated provider failures remain unresolved. CI-owned/skipped checks are not inferred as passed. No merge or release performed.

  5. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state: both remaining PRs are ready for review, with all 12 outstanding inline comments addressed or explicitly dispositioned and resolved.

    • fix(runtime): preserve platform owner shutdown failures #4063 is pushed at 9d0deffa01eda547e648591101a86a55b6a81928: scoped disposal diagnostics, neutral cleanup guidance, shared typed terminal guard, refusal of suspended owner calls after shutdown begins, and preserved executable failure exit. 51 focused tests pass. Disposable diagnostic and lifetime/exit controls each produce four intended failures /47 passes, restored to 51. Independent Terra source recheck found no required findings.
    • fix(recording): preserve request identity for Apple clock capture #4065 is pushed at d7847e71bd26cf5305278c6c1d64ed1f5f12ac5b: request cancellation now escapes best-effort clock capture even with a separate caller signal. 27 focused tests pass. Disposable focused control: four pass → one intended failure /three passes → four pass. Same source recheck result.

    Apple native artifact evidence for #4063 supplies healthy screenshot/session release/explicit daemon-stop evidence at earlier head 7222a41, alongside its Android native smoke. It does not inject a live owner failure. The source tree/CI artifact identity is recorded in that comment.

    Recording native attempts for #4065 both failed around 90 seconds with daemon_transport_timeout at earlier head 49db3b83ed. No MP4, positive clock anchor or scoped-provider witness was captured. The green Apple smoke did not execute a recording command. #4060 remains unresolved; no phase or host-contention cause is claimed. Both owned daemons, registrations and claims were cleaned up, and the simulator was shut down. Further device driving stopped after the failed retry.

    Current-head affected gates are running serially (#4063 run-w61ZU7, then #4065). They are pending, not passes. Current-head CI/native obligations also remain. Earlier receipts retain their original SHAs; no merge or release was performed.

  6. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state after the final review rounds:

    • fix(runtime): preserve platform owner shutdown failures #4063: head df42fdb25c49206a67cd8340b85042fb0ae2926f, ready for review. All seven new findings have dispositions/resolved threads. Shared diagnostic encoding and event isolation fix the two concrete reporting failures; earlier reconciliation outcomes remain authoritative. Independent final source recheck: no required findings. 77 focused tests and four disposable fault controls pass detection/restoration. Exact receipt run-P1EDV0 passes all 41 runnable checks, exact commit, checkout unchanged; 25 checks skipped locally. Current-head CI remains pending. Earlier 58dad43 has 22 successful CI checks /two skips and audited healthy native close/daemon-stop evidence; that evidence retains its original source identities.
    • fix(recording): preserve request identity for Apple clock capture #4065: head 2f3dff29d6400f8d4c8c790cc055b96cb7f848b6, ready for review, zero unresolved inline threads. Exact receipt run-Z3HVV7 passes all eight runnable checks, exact commit, unchanged checkout. CI: 18 successful checks /one skipped job. Forwarding omission controls detect both fields. The current Apple artifact has 131 steps and zero recording commands.

    Successful live recording/clock correlation and the failed-attempt timeout phase remain outstanding under #4060. The two failed live attempts, cleanup and device shutdown are recorded on #4065. No further device attempt was made. #4065's automated work is handed back with that limitation; #4063 remains watched for current-head CI.

    Both PRs stay undrafted as requested. No merge or release was performed. Disposable experiments were removed and source worktrees preserved.

  7. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state: #4063 is ready for review at ccdc6d48d35681d335432e400ba0ffb1ed472f22. All current CI results are 21 successful checks and two skipped. Serialized exact affected validation run-cLYq7s passed all 41 runnable checks; 25 skipped, exact commit, checkout unchanged. Public evidence and failed-check disposition records the proof and limits.

    The earlier Android job at df42fdb failed a real Back-to-Settings diff assertion. Follow-up #4105 is now a child of this umbrella, labelled needs-triage, with the failed/current run identities, artifact and bounded diagnostic contract. The same scenario passes on the current head; cause remains unproven. The old Docs job timed out after its logged checks completed; current Docs passes. Historical failed/cancelled jobs retain their status. No speculative source change, retry or timeout increase was made.

    #4065 remains ready for review at 2f3dff29d6400f8d4c8c790cc055b96cb7f848b6, with its previously recorded local/CI passes. Its missing positive live recording/clock-anchor evidence remains documented under #4060. Earlier healthy #4063 native evidence does not inject owner failure and keeps its original SHA.

    Both PRs are handed back for maintainer review. No merge or release was performed. Owned source worktrees and the stable evidence archive are retained; other worktrees/devices are unchanged.

  8. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state: #4063 review follow-up is pushed at 50998ace3b75a349e2f3517c385f7b0361cd969f. Both accepted remaining review comments are fixed and resolved: record disposal failure before the cleanup-only rethrow, and document terminal gateway behavior. Other comments have explicit dispositions; #4105 retains the Android Back/diff diagnosis and #4106 retains the unfinished-load recovery-budget question.

    Public evidence: exact affected receipt run-eZ47Db passes 41 runnable checks, skips 25, with exactCommit=true and checkoutChanged=false. Disposable proof is 17 pass → five intended failures/12 pass with the old early throw → 17 restored. Disposable removed, source preserved. Independent source review found no required findings. Current-head CI starts with the push; the previous green CI applies only to ccdc6d4. Earlier native evidence keeps its named SHA and healthy-cleanup scope.

    #4065 is unchanged, including the remaining positive live recording evidence under #4060. No merge/release was performed. #4063 monitoring resumes for the newly pushed head.

  9. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state: #4063 is pushed at 58cf0e88e9d8a83cc37651f2c25c559bbcb1c9eb. The latest delta only clarifies the public diagnostics encoder comment: strict JSON encoding preserves bigint decimal strings, does not redact, and throws for serialization failure/no JSON representation. No executable code or tests changed. Both clarification threads are resolved; the other two new suggestions have explicit dispositions, with caller-level recovery waiting still tracked by #4106.

    Exact evidence: run-VHwr0s passes 41 runnable checks, skips 25, exactCommit=true and checkoutChanged=false. Prior controlled tests, independent review and native evidence retain their named SHAs and limits. Current-head CI starts with this push; the prior 22 successful/two skipped checks belong to 50998ac.

    #4065 and its remaining positive live-recording evidence under #4060 are unchanged. No merge/release was performed. Monitoring resumes for the newly pushed #4063 head.

  10. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state: #4063 is pushed at 1dd596a14433467af6581f6a7c410d940e261097. The latest real review gap is fixed: each owner rejection is recorded immediately in the existing daemon diagnostics scope, even while aggregate shutdown remains pending. Original errors, late owner cleanup, at-most-once attempts and registration retention remain intact. The six other suggestions have explicit evidence-backed dispositions; no serializer engine, owner dedupe mechanism or broader exit policy was added.

    Final-head evidence: exact affected run-applH8 passes 41 runnable checks, skips 25, with exactCommit=true and checkoutChanged=false. Gateway suite: 28 passed. Isolated controls detect removal of owner emission (two failures) and daemon scope (one failure); each restoration passes both selected tests. Disposable removed, source preserved. Independent source review found no required findings. An earlier local restoration timeout remains recorded separately with cause unproven.

    Current-head CI starts with the push. Earlier CI and native results keep their original SHAs and limits. #4105/#4106 retain their diagnostic scopes; #4065 and the missing positive recording evidence under #4060 are unchanged. No merge/release or device action was performed. Monitoring resumes for the new #4063 head.

  11. thymikee commented on Oct 30, 2026

    @thymikee
    MemberAuthor

    Current state: #4063 is ready for maintainer review at 1dd596a14433467af6581f6a7c410d940e261097. GitHub confirms 22 successful checks, two skipped, zero unresolved inline threads, no conflicts, and the PR remains open/ready for review. No merge or release was performed.

    Final evidence and handoff records exact local run-applH8 (41 runnable checks passed/25 skipped, exact commit, unchanged checkout), 28 gateway tests, detection controls and independent source review with no required findings. Immediate per-owner diagnostics now preserve known failure evidence while aggregate shutdown remains pending. Earlier failed/cancelled receipts and the superseded local timeout keep their original status and cause limits.

    #4105 retains Android Back/diff diagnosis; #4106 retains the distinct bounded recovery-wait contract. Native evidence keeps its named source/run and healthy-cleanup limits. No new recording proof for #4060/#4065 was produced in this round.

    The PR is handed back and the thread's #4063 watch stops. No further implementation or device action is scheduled here. The open PR's source worktree and stable evidence archive are retained; no unrelated worktree/device was changed.

  12. thymikee commented on Oct 31, 2026

    @thymikee
    MemberAuthor

    Current state: a new independent merge audit leaves #4063 and #4065 in different evidence states. No code changed and no merge/release was performed.

    • fix(runtime): preserve platform owner shutdown failures #4063 at 1dd596a14433467af6581f6a7c410d940e261097: completed Terra scoped source review has no required findings; 22 successful CI checks/two skipped, zero unresolved threads, ready for review and mergeable. Parent freshly inspected the same-head Apple/Android CI artifacts at merge 9ebc58a. Healthy iOS close/release/daemon-stop and Android close/release are recorded. Audit evidence. This does not inject owner failure; composed/controlled tests cover that error path. The earlier incomplete Terra assessment is not counted as approval.
    • fix(recording): preserve request identity for Apple clock capture #4065 at 2f3dff29d6400f8d4c8c790cc055b96cb7f848b6: Claude Sonnet finds no source defects and confirms the prior dispositions, but the repository's live-route evidence requirement remains unmet. Existing green Apple smoke has zero record commands and earlier manual attempts failed. It is not yet merge-ready. Assessment and active proof.

    The existing Replay Manual workflow is dispatched once at #4065's head: https://github.com/callstack/agent-device/actions/runs/41189484295 . The iOS full tier includes recording/MP4 assertions on a fresh hosted simulator; its pre-existing separate Android job also runs. No workflow/test definition, skip or timeout was changed. It is in progress and must be inspected for the exact recording route and cleanup, not inferred from an adjacent or incomplete run. No retry of the stopped local device/session was attempted. #4060 stays open; #4105/#4106 remain distinct follow-ups. Monitoring continues for #4065.

  13. thymikee commented on Oct 31, 2026

    @thymikee
    MemberAuthor

    Current state: all comments on #4063/#4065 have dispositions and both have zero unresolved inline threads. Normal PR checks are green: #4063 has 22 successful/two skipped at 1dd596a; #4065 has 18 successful/one skipped at 2f3dff2. Both remain open, undrafted and mergeable; no merge/release was performed.

    #4063 has no identified remaining code/comment blocker after the completed Terra source review, exact local validation and current-head native cleanup artifact audit. #4065 has no identified source defect after Claude's review, but is not yet merge-ready under the exact-live-route rule.

    The additional existing manual validation run at #4065's exact head failed before recording on both platforms. iOS failed the full lifecycle app-switcher fixture-control assertion; Android failed a trace mutation selector. Downloaded step histories contain zero record commands. iOS cleanup/restoration/daemon-stop and Android close were accepted. Detailed result. No causal claim about the recording fix, no base comparison or retry, and no timeout/skip change is made.

    #4060 remains open for the missing successful recording/clock evidence and prior timeout diagnosis. A targeted live recording check or explicit maintainer scope decision remains required before #4065 can be called merge-ready. #4105/#4106 remain separate follow-ups. No source/local device/session changed. Watches are stopped for handback; source worktrees and evidence are retained.

  14. thymikee commented on Oct 31, 2026

    @thymikee
    MemberAuthor

    Current state: #4063 remains unchanged at 1dd596a, with green checks and no outstanding review-thread blocker. #4065 is now pushed at 8ec6637105756ca2ac6db4aa32307e9331ba6b6c to obtain the missing exact live-route evidence on the existing PR iOS lane.

    The existing recording/MP4 assertions moved from the parked full-only journey to smoke:capture-close, which both smoke and full tiers execute. The declaration follows the live owner; the later duplicate is removed. Claude's layout finding was corrected to the already-observed Form tab/Checkout form flow. Runtime code, workflow definitions, skips, retries and budgets are unchanged by this test move. No local device was driven.

    Published proof/scope: exact run-udo8rM passes 10 runnable checks, skips eight and deduplicates one provider stage into related tests, with exactCommit=true and checkoutChanged=false. All 52 declaration guards and local checks pass. These are not live execution. The superseded run remains cancelled, and the failed manual journey remains failed before recording.

    Current-head CI starts with the push. #4065 is not yet merge-ready: the new recording smoke must actually run successfully and its artifacts and cleanup be inspected. It proves native recording/playable output if successful, not a positive optional clock anchor or a real remote-provider protocol witness. #4060 remains open; no waiver is assumed. No merge/release performed. Monitoring resumes for #4065.

  15. thymikee commented on Oct 31, 2026

    @thymikee
    MemberAuthor

    Current state: both #4063 and #4065 have no remaining identified merge blockers for their reviewed scopes. All inline comments have dispositions and both remain undrafted, open, conflict-free and mergeable. No merge or release was performed.

    • fix(runtime): preserve platform owner shutdown failures #4063 — 1dd596a: 22 successful CI checks/two skipped, zero unresolved threads; exact local run-applH8 passes 41 runnable checks/25 skipped. Completed Terra source recheck found no required findings; current-head native cleanup evidence is recorded here. This proves healthy cleanup; controlled regressions cover owner failure.
    • fix(recording): preserve request identity for Apple clock capture #4065 — 8ec6637: 17 successful CI checks/one skipped, zero unresolved threads; exact local run-udo8rM passes ten runnable checks/eight skipped/one deduplicated stage. The mandatory local recording route is now demonstrated in the existing PR smoke: native proof. Record start, visible Form transition, record stop, playable MP4, session release and daemon stop all succeed. The artifact includes the same-request-ID real runner snapshot and a 367,034-byte HEVC recording that independently decodes. Claude's runtime review found no defects; the test-layout correction is now exercised live.

    The recording test moved from the blocked full journey into existing smoke; no workflow definition, timeout, skip or runtime fallback changed. This closes the local live-route evidence gap, not every historical recording problem. Optional clock-anchor numeric values and a real remote-provider protocol are not claimed; scoped-provider routing/cancellation have fixture evidence. #4060 stays open for older failures/timeout diagnosis; #4105/#4106 remain separate follow-ups. Historical failed/cancelled receipts retain their own statuses and causes.

    The readiness task is complete. Watches are stopped for handback. Source worktrees and the stable evidence archive remain available for the open PRs; no unrelated worktree/device/session was changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions