Skip to content

Settings ownership P41: owner recovery (E2992 minimum v8) #2994

Closed

Description

@mblua

Current selected candidate: P41 / minimum plan v8

Parent epic: #2992. Technical consensus is complete for the exact digest set below. Human plan approval and implementation authorization remain pending.

This existing OPEN child is explicitly reconciled from its earlier delivery unit (Settings ownership P02: owner core (E2992)). The previous specification is preserved below as historical material; it does not authorize execution. The frozen phase identified here is the current specification.

Situation and intended behavior

Prepare the owner, lifecycle exclusion and strict capture/recovery under retained guards without activating global ownership.

  • Class: design-bearing
  • Owner: ac-dev-rust-v5
  • Depends on: P40 / Settings ownership P40: constructors (E2992 minimum v8) #2993
  • Planned branch, created only at phase start after dependency merges: refactor/2994-settings-owner-p41-owner-recovery.
  • Design source: c61cfbdeecb3bc20a1a9d7308fd6e67bb2df99d5.
  • Canonical master: D:/0_repos/AgentsCommander_iac/.ac/plans/2992-settings-owner/plan-v8-settings-owner.md.
  • Plan-SHA256: 05C031F312B3AA730F4D6B9528A65E3EC4E7470903CC83E923B8204D6CE4E8D2.
  • Canonical phase, sole implementation specification: D:/0_repos/AgentsCommander_iac/.ac/plans/2992-settings-owner/P41-v8-owner-recovery.md.
  • Phase-SHA256: C53BFD643DAF84BF51A256B334931366E3AAA99906ED292FE4BAB45AD10DA238.
  • Execution mapping: D:/0_repos/AgentsCommander_iac/.ac/plans/2992-settings-owner/phase-issues-v7.json (stable filename used by reused phase files; the selected digest set is v8).
  • Exact five-participant consensus: D:/0_repos/AgentsCommander_iac/.ac/project-shared/2992-settings-owner/minimum-path-20261016/full-r3-consensus-approved-v1.json.

Files (MODIFIED only; no ADDED or REMOVED tracked files)

  • src-tauri/src/config/settings.rs
  • src-tauri/src/config/instance_artifacts.rs
  • .github/workflows/pr-regression-gates.yml

Acceptance

One internal state, fallible availability and read permits; single strict source capture and honest partial outcomes. Legacy forwarding exists only during the specified staged rollout.

Follow every phase-specific acceptance case, positive control, source/permission/durability invariant and staged boundary in the frozen phase. Keep every intermediate main green with landed phases only; exclusive ownership is activated in P50.

Verification commands and delivery gate

Run from D:/0_repos/AgentsCommander_iac/.ac/room-09-ac-dev-team-v5/repo-AgentsCommander, only after human approval and the phase handoff:

cargo +1.98.1 check --locked --all-targets
cargo +1.98.1 fmt --all -- --check

Also run the exact focused test commands and structural guards in the canonical phase, requiring nonempty test execution and all triggered/required CI checks green on the exact PR head. Commands above are future checks, not executed results. Preserve the fixed toolchain and lockfiles. One phase branch/PR at a time; the phase PR closes this child only, not the epic.

Scope authority: normal CLI without elevation remains required. The user excluded High CLI with Medium owner; the cancelled UAC probe is not an acceptance prerequisite. Other included permission, protected-field, recovery, retention and QuitGate guarantees remain.


Historical pre-minimum specification (superseded; preserved verbatim)

Parent epic: #2992

This is the approved P02 delivery unit of the settings-owner plan.
Technical consensus is complete. Implementation awaits explicit user plan review and coordinator authorization; no branch or product change has started.

Situation and intended behavior

The epic centralizes settings operations for app and CLI/daemon while preserving source composition, authorization, failures and durability. This child implements only its approved phase below, after its dependencies have landed.

Replace SettingsState alias with Arc using the constructor prepared in P01. Its only authoritative AppSettings stays in the existing RwLock. Initially preserve legacy read/write forwarding methods as explicitly temporary adapters; new current_snapshot/apply/result/drain methods use the contracts below. Add typed physical-loader halves, lifecycle gate and ledger-aware locked saver. Do not activate long-lived ownership or CLI proxy yet. Keep pre-existing loader compatibility and legacy transaction coordination. Tests in settings.rs exercise the new owner directly with temporary directories. Add the stable owner sidecar constant and ignore membership in instance_artifacts, without renaming existing sidecars.

Only listed files may change. Preserve unrelated formatter debt and user data. Shared-file handoff is merged main, owned by the next authorized phase; never private scratch.
Main must compile/test using only landed code. Before P20 the new authority stays inactive with legacy transactional behavior; P20 removes staging and activates only the completely migrated set.
No intermediate cut publishes a second active memory authority or promises sole-writer memory freshness while legacy writers remain.

Approved identity and ownership

  • Phase: P02
  • Class: design-bearing
  • Owner: ac-dev-rust-v5
  • Depends on phase IDs: P01
  • Files: 2
  • Canonical phase: D:/0_repos/AgentsCommander_iac/.ac/plans/2992-settings-owner/P02-v5-owner-core.md
  • Phase-SHA256: FB79D5D89154809738EC4084454203E497FB8DE7F4735B577F66362030A7949B
  • Master: D:/0_repos/AgentsCommander_iac/.ac/plans/2992-settings-owner/plan-v5-settings-owner.md
  • Plan-SHA256: C142BB7BF5EDC96C5E88AA70A5A217B54D37E41F2E0B04ABD4A4AD9D8A69B0A5
  • Source reference: f6e5d08882ba9b208b56afe1fec44efb04925205

The canonical phase file is the sole cold-start implementation specification. This issue is tracking and a review summary, not permission to make new design choices. Child/branch/execution identity belongs in the separate coordinator mapping; no certified Markdown is edited.

Planned modified files

  • D:/0_repos/AgentsCommander_iac/.ac/room-18-ac-dev-team-v5/repo-AgentsCommander/src-tauri/src/config/settings.rs
  • D:/0_repos/AgentsCommander_iac/.ac/room-18-ac-dev-team-v5/repo-AgentsCommander/src-tauri/src/config/instance_artifacts.rs

No tracked source files are added or removed. The phase's explicit preserve sets, protected behavior and budgets remain binding; P01 alone has the approved constructor-only mechanical exception.

Acceptance and verification (future work)

All following cases are FUTURE, owner-executed tests using existing inline modules, tempdirs, saver fault seams, controlled clocks/barriers. Prefix new cases e2992_p02_ in each named module. No generic harness/dependency or runtime execution during planning. Execute focused commands only after the Cold start block has initialized R/EVIDENCE and captured the actual authorized phase base.

Test location Named suffix / stimulus and control Required observable result
src-tauri/src/config/settings.rs lease_handoff Two independently opened handles reach an attempt barrier while first owns gate, including equivalent lexical paths: second has zero capture/save calls; release first then second acquires and completes. Repeat under transaction-held probe: no lifecycle acquisition is attempted.
src-tauri/src/config/settings.rs staged_freshness Construct Staged from valid loaded observation, change disk via legacy writer: ordinary snapshot/Retention retain published observation/revision with zero physical/lock deltas. Nonempty apply refreshes under exclusion, publishes changed roots/revision then RejectedStale with zero writes; privileged query observes current roots. Malformed mandatory fresh capture errors; warning remains metadata; no Ready/files.
src-tauri/src/config/settings.rs staged_read_traffic After initialized observation, barrier holds transaction lock externally; run 100 snapshots, sync queries and Retention reads: zero capture/lock-attempt/acquisition deltas, no file-lock Busy/timeout or notices. Positive privileged/apply control attempts that lock; release permits capture/stale proof. Repeat Invalid: errors, still no read-side fallback.
src-tauri/src/config/settings.rs admission_dedup Hold 32 jobs behind start barrier, and independently fill 8192 receipts with injected monotonic clock: next request Busy with zero saver calls, no early eviction; same ID/digest returns same outcome once, changed digest RequestIdConflict; advance clock 15min then allow expired-slot reuse.
src-tauri/src/config/settings.rs preconditions Nonempty stale revision, foreign epoch and denied caller each reject before reservation/write; empty intent reads only; recursive facade callback returns SettingsReentry before locks; sorted operation digest ignores map insertion order but includes baseline.
src-tauri/src/config/settings.rs ledger_recovery Use existing saver-stage injection: before any effect => FailedBeforeWrite; after agents replace OR migration/project-paths effect then settings TempWrite failure => PartialOrUnknown. Fault AtomicReplace/TargetPermissions/ParentDirectorySync/PostWriteVerify separately; recapture valid publishes new revision but never asserts durability/Committed; failed recapture => sticky Invalid, zero later default save/current reads.
src-tauri/src/config/settings.rs cancel_panic Barrier before admission then cancel => RejectedNoWrite; barrier after first effect then cancel/drop caller => retained handle completes/recoveries before release. Inject panic with touched ledger => same recovery; unclassified worker failure => Invalid/Unknown, no released reservation or authority while worker remains.
src-tauri/src/config/instance_artifacts.rs sidecar_ignore Assert stable owner sidecar is in rendered ignore membership while unrelated existing rows unchanged; structural integration guard still verifies no outgoing module arcs.

From R/src-tauri after authorization:

cargo +1.98.1 test --locked --lib --bins e2992_p02_ -- --list > "$EVIDENCE/focused-list.txt"
rg "e2992_p02_" "$EVIDENCE/focused-list.txt"
cargo +1.98.1 test --locked --lib --bins e2992_p02_ -- --nocapture

Every named case must appear in the list and execute; zero matches is failure, not PASS. Full applicable regression and integration guards below remain mandatory.

Preserve existing source/permission/error contracts. Failed, absent or timed-out evidence stops delivery and returns the exact discrepancy to architecture; no widening of the frozen file table.

Execute the phase's complete local verification, structural and exact-head CI gates from its canonical file only after authorization. Every dependency must be merged into main; one sequential phase/PR at a time. A phase PR closes only this child. The epic remains open through all phases and the requested final shipper build. No installation, release/version bump or other persistence-domain migration is authorized.

Activity

  1. changed the title [-]Settings ownership P02: owner core (E2992)[/-] [+]Settings ownership P41: owner recovery (E2992 minimum v8)[/+] on Oct 16, 2026
  2. mblua commented on Oct 17, 2026

    @mblua
    OwnerAuthor

    User approved exact five-party candidate v4 for a narrow blocker amendment in this existing PR3056/issue2994: screenshot guard counts and the existing sidebar stale-callback test, accepting shared recovery waiting for P41 landing. Candidate MD SHA256 aec9e4a45fd3518e5553f1e61dd5ee5a74216edc7c038e5fa9a66f3c9a55f1a6. Scope approval: p41-ci-v4-user-scope-approval-v1.json; exact votes: p41-ci-solution-v4-consensus-approved-v1.json. No new product behavior, weakened controls, shared harness or dependency change.

    Remaining verification-only delta rescored20/100 (raw47), compared with original E2992 scope76. This does not rescore the whole program. Scope footprint=4 (Two existing files; localized workflow literals/comments and one existing test.) Diagnosis difficulty=3 (Causes already reproduced twice and localized by source and logs.) Domain knowledge required=5 (Existing Solid/Vitest RAF scheduling and exact-count CI guards.) Solution-space ambiguity=2 (Exact v4 mechanism and current-PR route now chosen and authorized.) Blast radius and reversibility=4 (Verification-only shared guards/test; ordinary reversible changes, product untouched.) Dependency and integration load=5 (Must preserve already-reviewed main/P41 imports; no new external dependency.) Verification difficulty=7 (Existing live positive and stale geometry/listeners must execute meaningfully; harness exists.) State, data and compatibility=1 (No persistent state, schema or wire change in repair.) Concurrency and timing=8 (Test controls RAF response/cancellation with clear local ownership.) Environment and tooling=8 (Linux/macOS fixed-count guard maintenance and pinned existing toolchain; no new runner.) Ceremony excluded: issue/branch/PR, CI wait, review rounds, delegation, merge/cleanup. Existing required gates remain.

    Execution amendment/cold gates precede implementation. Adopt equivalent upstream fixes and omit matching own hunks. Current main fe59d4d contains new profile-pair persistence/settings changes requiring reviewed integration; no tests/CI or product edits claimed by this approval record. All required/triggered checks must be green on the resulting head/CI merge before landing.

  3. added a commit that references this issue on Oct 18, 2026
  4. mblua commented on Oct 18, 2026

    @mblua
    OwnerAuthor

    Delivered in PR #3056, merged as 3b73455. P41 adds staged settings-owner capture, exclusion and recovery; global activation remains reserved for later approved phases.

    All 14 required checks, all 24 status contexts and all five workflows passed on b059e2b. Windows, Linux and macOS executed all five P41 tests. Actual CI checkout 12df3c8 has the same tracked tree as the accepted feature head. Local native91, compiler/Clippy/fmt and structural checks passed; frontend verification was qualified by unchanged corresponding inputs. The newer main8118 delta was independently classified unrelated and recorded in the PR.

    The local checkout is clean on synchronized main; feature branches are removed. #2994 is closed. Epic #2992 remains active: P42–P50 and the requested final build are still pending.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions