Skip to content

E2432 selected-file P04: resolve selected-file launch restart and restore #2899

Open

Description

@mblua

Current selected-file delivery — P04

Situation: Settings and session selection currently use effective/global ID-based views. The user approved physical agents-file selectors in both menus and BASE-hash profile sharing confined to the selected file. Each menu remembers its own source. This child covers only the approved phase below.

Explicit reconciliation with the existing issue

Direct match to the existing reduced runtime-source consumer requirement, preserving source-qualified execution through actual runtime paths. Historical specifications and their phase mappings remain intact below and in their frozen plan directory; they are not the execution contract for this new selected-file cut. No new issue is created or closed issue reopened. This is an explicit current-scope mapping, not evidence that the old broad package was implemented.

Certified phase identity

  • Parent: IDs de agentes derivados de su ejecución — alcance mínimo #2432 (native link retained)
  • Selected-file phase: P04; class: design-bearing; owner: ac-dev-rust-v5
  • Depends on: P03 / E2432 selected-file P03: preserve source references in existing carriers #2900; sequential landing only
  • Branch at phase start: feature/2899-source-qualified-runtime
  • Canonical epic: D:/0_repos/AgentsCommander_iac/.ac/plans/2432-selected-file-profiles/plan-v7-selected-file-profiles.md
  • Plan-SHA256: 2E09A6E856CA77EF70A1C47D9976DB93CF9206C9B0540434199E33FC8821A3BA
  • Sole phase specification: D:/0_repos/AgentsCommander_iac/.ac/plans/2432-selected-file-profiles/phase-v4-p04-source-qualified-runtime.md
  • Phase-SHA256: FBE539FB6C729CD13220918DA161D3A500FE891F7B5098DBDC14CFC4CD9919CB
  • Exact five-party consensus: room-shared/profile-hash-link-intake/formal-round6-consensus-v1.json (author + four independent approvals)

Allowed files

  • src-tauri/src/config/settings.rs — physical selected-row resolver/source bootstrap helper
  • src-tauri/src/config/agent_command.rs — optional backend-owned source seed in AgentSpawnCommand
  • src-tauri/src/commands/session.rs — source-aware builders/create/root/restart/drift helpers
  • src-tauri/src/lib.rs — both root/ordinary wake and deferred restore resolution

Acceptance and focused validation

Rust owner authors new/updated inline e2432_ fixtures/AgentSpawnCommand constructor compatibility edits; Shipper executes: files reuse stable ID and BASE with different cells/env/backend; selected spawn/seed exact file; catalog key absent globally;
global duplicate/missing rows cannot contaminate bootstrap; stale explicit ticket preserves old restart PTY; cell edit reloads same BASE; changed
BASE/missing source recoverably refuses restore; root/ordinary/deferred retain seed/origin; legacy/custom shell controls. cargo test --locked --lib e2432_. Existing no-ref runtime stays unchanged; valid stored ref works internally, public ticket not exposed yet.

Delivery authority and limits

User standing authorizations apply to exact consensus within this scope. Mapping/freeze/cold gate must complete before writes. The actual phase owner authors source/fixtures; Shipper executes the approved checks. Preserve current main and unrelated changes. A phase PR closes only this child after its acceptance checks; no broad historical requirement or parent Epic closure is implied. No final executable/GUI/input/install/release/version change requested.


Preserved historical issue record — not the current execution specification

Resolución vigente — reverificación de scope mínimo

Epic: #2432 (vínculo nativo conservado).

REQUERIDO — REDUCIR

Resolver y lanzar la configuración correcta mediante el nuevo ID, reutilizando contratos existentes.

Prioridad actual: únicamente el mínimo funcional indicado. La necesidad parcial NO aprueba ejecutar todo el paquete anterior ni exige una fase separada. Revisar lo ya entregado antes de generar trabajo adicional.

Objetivo vigente: «los ids de agentes cambien a unos ids que se desprendan de el string univoco que requieren ejecutar». Una ventana/editor. El usuario ordenó atacar únicamente lo estrictamente necesario y revisar el resto después. La auditoría de 22 hijos preserva diferencias entre necesidad conceptual y paquete histórico; no es consenso de implementación. Faltan definir el string/equivalencias y la compatibilidad de IDs anteriores antes de certificar el mínimo exacto. Hash determinista no prueba idempotencia. Las especificaciones y dependencias históricas no habilitan ampliar ni bloquear automáticamente el núcleo reducido. Esta resolución no elimina ni revierte comportamiento entregado; los estados abiertos/cerrados se conservan.

Evidencia: auditoría de cinco perspectivas por issue, base main d823839; artefactos locales room-shared/e2432-necessity-audit/issue-2899/.


Especificación anterior — antecedente histórico

El alcance ampliado siguiente no es la orden vigente de ejecución.

Part of epic #2432 (under #2429). This phase implements the certified runtime source consumers contract for independent coding-agent identities/layers and recoverable persistence. Existing references, defaults, locks and history must be preserved.

Specification

Canonical phase: D:/0_repos/AgentsCommander_iac/.ac/plans/2432-identity-layers/phase-v17-P04-runtime-source-consumers.md
Phase-SHA256: 7105e17030832d2227ca34e097d6a6c670178b5f776342dffb22f030201467cb
Plan-SHA256: 8393829484bb61d01034a79b6a5f1fb095bdf66927ee0854911b64681b884622
Version: v17; owner: Rust; class: design-bearing
Depends on: #2898

Files

  • src-tauri/src/config/agent_command.rs

  • src-tauri/src/config/agent_config.rs

  • src-tauri/src/commands/session.rs

  • src-tauri/src/commands/entity_creation.rs

  • src-tauri/src/commands/ac_discovery.rs

  • src-tauri/src/loops/delivery.rs

  • src-tauri/src/phone/mailbox.rs

  • src-tauri/module-arcs.txt

Symbols

Symbols: agent_command source-aware resolve/build and StoredReference reader; session build_configured_source_spawn_for_cwd + resolve_launch_idle_tuning source branch; entity_creation default companion; ac_discovery portable ref; loops::command_for_agent; mailbox wake/self-switch preparation.

Acceptance

Implement exactly the frozen phase behavior, edge cases and failure contracts. Stay within this phase whitelist; preserve the inactive/activation and recovery ordering. All count-positive phase fixtures and required integrated-tree guards must pass before publication. Future tests are not claimed as run.

Verification commands

cargo +1.98.1 test --locked --manifest-path src-tauri/Cargo.toml --lib source -- --list
cargo +1.98.1 test --locked --manifest-path src-tauri/Cargo.toml --lib source
cargo +1.98.1 check --locked --manifest-path src-tauri/Cargo.toml --all-targets
cargo +stable fmt --manifest-path src-tauri/Cargo.toml --all -- --check

Authorization

Technical consensus is complete. Human gate 7.5 is pending. No implementation or branch creation is authorized by issue creation. Current API lifecycle/FUP #2885 and #2436 remain outside this phase.

Current execution contract — Round14

This section supersedes earlier phase-path, file-count and execution-scope references for P04. The source-qualified runtime objective is unchanged.

Canonical overall: D:/0_repos/AgentsCommander_iac/.ac/plans/2432-selected-file-profiles/plan-v16-selected-file-profiles.md, SHA256 61886CEC969641067AE3FE9D93ED3CE86F6A2558F5D79362755F6C50CCD04A8C. Sole P04 implementation specification: D:/0_repos/AgentsCommander_iac/.ac/plans/2432-selected-file-profiles/phase-v7-p04-source-qualified-runtime.md, Phase-SHA256 3770B6A94EB033C40BC119E9BC9B4F52159FECE8047102B5F65CE2A1736C049E. Full workflow, original-five exact-set consensus in D:/0_repos/AgentsCommander_iac/.ac/room-19-ac-dev-team-v5/room-shared/e2432-selected-file-profiles/execution/P04/round14-exact-set-consensus-v1.json; identity/authority receipt D:/0_repos/AgentsCommander_iac/.ac/plans/2432-selected-file-profiles/approved-identities-v8.json.

Six existing product files only:

  • src-tauri/src/config/settings.rs
  • src-tauri/src/config/agent_command.rs
  • src-tauri/src/commands/session.rs
  • src-tauri/src/lib.rs
  • src-tauri/src/session/selection.rs
  • src-tauri/src/session/manager.rs

Manager-only extra file explicitly user-approved. selection.rs remains only named constructor +2/-0. Current-source restore/restart seed staging compares prior seed/origin without publishing, then atomically publishes desired seed on successful lifecycle finalization. Typed opaque seed validation precedes host effects. No new module/map/SessionInfo/protocol/config/dependency/baseline/final artifact scope.

Preserve original phase base and exact retained incomplete five-file draft under p04-rust-partial-manifest-v1.json; no recreate-branch/clean-tree discard. Incoming main PR3143 target 196a4cf48b8e97a087d68fcfdd7abc2687d7cfcd is relevant but architect/owner confirmed compatible: integrate Matrix-first template policy and its fixture, preserving imported config_seed/UI/docs history separately from six-file P04 own delta. Integration review and Shipper exact-integrated tests/structural proof/CI remain required; no runtime PASS yet.

Current execution contract — Round15

Supersedes every older phase path, startup responsibility and continuation premise for P04; overall physical-source runtime objective unchanged.

Canonical overall: D:/0_repos/AgentsCommander_iac/.ac/plans/2432-selected-file-profiles/plan-v17-selected-file-profiles.md, Plan-SHA256 9E56A14EEDAE026BC2FCA92ECB7FBE662AEA58B71B152D3D7E93E4F8E9FC6D1D. Sole P04 cold implementation specification: D:/0_repos/AgentsCommander_iac/.ac/plans/2432-selected-file-profiles/phase-v8-p04-source-qualified-runtime.md, Phase-SHA256 5276544D3DBA55366265EC655D3F59CDB157692F134EC992DD77EAA835E7C067. Full workflow; original-five exact8 consensus D:/0_repos/AgentsCommander_iac/.ac/room-19-ac-dev-team-v5/room-shared/e2432-selected-file-profiles/execution/P04/round15-exact-set-consensus-v1.json; frozen identity receipt D:/0_repos/AgentsCommander_iac/.ac/plans/2432-selected-file-profiles/approved-identities-v9.json. Standing user authority covers this within-scope amendment; historical manager-only exception remains exact, no new human exception or excluded contract waived.

Full P04 six existing files:

  • src-tauri/src/config/settings.rs
  • src-tauri/src/config/agent_command.rs
  • src-tauri/src/commands/session.rs
  • src-tauri/src/lib.rs
  • src-tauri/src/session/selection.rs
  • src-tauri/src/session/manager.rs

Round15 correction only settings.rs/lib.rs/commands/session.rs: accepted staged directory provenance/load-once first-run startup and same-snapshot lib observations, three staged fixture substitutions/two missing schema2 descriptions and the plan-prescribed actual-startup/restore/Enforce/archive proof. Manager and agent_command unchanged by this correction; selection ONLY previously authorized +2/-0. More than one application instance against the same physical configuration is UNSUPPORTED; concurrent agents/rooms inside one instance remain supported. No lifetime lease/second-GUI/restart penalty/new path/module pair/schema/harness.

Continue the already committed CLEAN source HEAD52bfff3d4382bd3d0c2d3fd4acea9af6f2c6623e, preserving original phase_base f705437 and exact six snapshots in p04-fixture-scope-manifest-v1.json. No branch recreation, undoing integration, reset/clean or baseline edit. Current target7b7a60307856aecf2805522621dc4c93c18bad66 is unrelated rail-only UI; future local integration before exact integrated validation/publication remains mandatory.

Current historical source evidence: fmt/check PASS;97tests93PASS4FAIL/eighteenP04 14PASS4FAIL. Four failures, actual-new-head acceptance, state/concurrency veto, integrated POST and exact-PR-head CI stay pending. Shipper alone executes application commands; Rust alone authors code/fixtures; RustGrinch reviews actual proof. Source writes remain held until the new entire-workgroup Step7.5 cold gate succeeds. P01-P03 delivered, never reopened; P02 Unix waiver applies ONLY P02. No final executable/install/release/version/GUI/input requested.

Activity

  1. changed the title [-]I2432 P04: runtime source consumers[/-] [+]E2432 selected-file P04: resolve selected-file launch restart and restore[/+] on Oct 19, 2026
  2. mblua commented on Oct 21, 2026

    @mblua
    OwnerAuthor

    P04 remaining-work re-score and exact manager exception

    User explicitly approved adding only src-tauri/src/session/manager.rs as sixth existing P04 file, per architecture proposal v2 SHA256 4a96c0a763d15c727135d938557c2a4caaf5c99a2167a0358de3ac42a98b3e54. Existing selection.rs exact +2/-0 limit remains. This is exception authority, not implementation readiness; revised immutable canonical set and initial-five exact consensus plus cold gate remain pending. Authority receipt: D:/0_repos/AgentsCommander_iac/.ac/room-19-ac-dev-team-v5/room-shared/e2432-selected-file-profiles/execution/P04/p04-user-manager-exception-approval-v1.json.

    Remaining P04 technical scope is re-scored under task-technical-scoring (delivered P01-P03 and future P05-P07 excluded). Historical round13 P02-P07 correction raw101/final48 remains recorded and has a different scope.

    Category Score /20 Anchor and evidence
    Scope footprint 11 Anchor10 (coherent few-file module work): six existing Rust files across runtime/resolution and lifecycle commit; no UI/new module.
    Diagnosis difficulty 4 Between anchor1 cause stated and anchor10 unfamiliar reading: seed conflict, staging race and production reachability already pinned by source and three accepted reviews.
    Domain knowledge 12 Above anchor10 subsystem rules: configuration provenance/PAIR, persisted binding identity and async session lifecycle capability ownership.
    Solution-space ambiguity 3 Near anchor1 decided solution: one exact accepted v2 contract; no alternative left to implementer.
    Blast radius and reversibility 14 Above anchor10 shared path: lifecycle prevalidation/commit serves other sessions and canonical seed metadata; no new destructive migration.
    Dependency and integration load 6 Between self-contained and anchor10 contract: landed P03 carriers and current existing Rust callsites; no external version coordination.
    Verification difficulty 14 Above anchor10 new tests with harness: real restart/deferred/root wiring, O1/O2 interleavings, pre-effect rejection and snapshot/commit invariants require positive controls.
    State, data and compatibility 15 Between anchor10 persisted state and anchor20 live schema constraints: preserve persisted seed/ref/origin, Option presence and legacy/current-source compatibility; no wire schema change.
    Concurrency and timing 17 Near anchor20 shared mutable state/interleavings: short staging and commit permits separated by spawn, concurrent refresh, snapshot visibility and rollback.
    Environment and tooling 3 Near anchor1 existing host setup: locked Windows toolchain/local tests and configured CI platforms; no setup or tool upgrade.

    Raw 99, final 47 = round((99-10)/190*99)+1. Band26-55; Full retained by architecture/state/concurrency criteria; State15/Concurrency17/Verification14/Blast14 vetoes. Architect authors; Rust owner/UI owner/Rust Grinch/Architecture Grinch independently review the new exact set; previous votes do not transfer.

    Excluded ceremony: issue/branch/PR creation and pushes; CI waiting; review rounds/delegation/messages; changelog/version/merge/cleanup. No new testing/build infrastructure, product version or release scope.

    Next: canonical planning cold gate, then sole architect revises only overall and P04; all other phase bytes preserved. Existing five-file draft remains uncompiled/uncommitted and protected by exact preimage/own-output hashes. No source writes authorized until recertification and implementation cold gate.

  3. mblua commented on Oct 21, 2026

    @mblua
    OwnerAuthor

    P04 remaining-delta re-score after the user single-instance constraint and exact v6 technical consensus. Historical score: raw 99, final 47. New residual score: raw 71, final 33, using round((71 - 10) / 190 * 99) + 1.

    Only the remaining startup locator/owner/getter/bootstrap correction, three fixture constructor substitutions, two missing descriptions, and necessary proof are counted. Completed manager/seed work and future P05-P07 are excluded.

    Category Score /20 Matched anchor and evidence
    Scope footprint 7 Below anchor 10 (a few files together): three existing corrective paths within the same six-file P04 allowlist.
    Diagnosis difficulty 2 Near anchor 1 (cause stated): AC006 input omissions and AC007 staged-startup/active-only getter contradiction reproduced and located.
    Domain knowledge required 12 Above anchor 10 (subsystem rules): staged/Active owner availability, physical-directory identity and startup/restore semantics.
    Solution-space ambiguity 2 Near anchor 1 (determined fix): exact v6 has owner feasibility and both independent technical approvals; no remaining mechanism choice.
    Blast radius and reversibility 12 Above anchor 10 (shared path): ordinary startup and source launch/restore share this path; preserve loaded legacy values, archive and creation gates. No new migration or irreversible write.
    Dependency and integration load 4 Below anchor 10: existing identity/loader helpers and internal settings/lib/session integration, no external versioned contract.
    Verification difficulty 12 Above anchor 10 (existing harness supports new tests): actual startup with existing/missing parent, child-isolated config, positive file-replacement control and actual Enforce/archive/restore paths.
    State, data and compatibility 8 Below anchor 10: in-memory immutable locator witness; persisted schema unchanged, ordinary loader/migrations and legacy compatibility must remain intact.
    Concurrency and timing 7 Below anchor 10: bind before Arc publication, retain existing concurrent-agent CAS/nonce/queue behavior; no new lifetime lock or multi-instance protocol.
    Environment and tooling 5 Below anchor 10: existing Windows toolchain and child-config override; reuse canonicalized-directory identity primitives without changing platform code.

    Excluded ceremony: issue creation; branch naming/pushing; PR creation; CI waiting; review rounds; delegation/messages; changelog/version; merge/cleanup.

    Full remains required despite the lower numeric band: this is an architectural startup/owner decision. Verification >=8 retains Grinch proof review; blast >=12 retains complete file-impact tables. State/concurrency acceptance remains open until exact-new-head execution. No acceptance criterion is reduced by this re-score.

    The product supports one application instance per physical configuration; concurrent agents/rooms inside that instance remain supported. v6 technical consensus and standing user authority permit fresh canonical recertification, not immediate source writes. The next canonical version needs fresh original-five full-set consensus and the prescribed cold gates; no old votes transfer.

    Source pinned clean 52bfff3. Local current-head evidence remains fmt/check PASS and 93/97 tests PASS with four reproduced failures; no runtime/CI success is claimed.

    Evidence: p04-remaining-technical-score-v2.json; proposal SHA256 ec6471dcf52b1a868405f880a15cab244bfbd585f5e70224212fab706381ab79; p04-v6-authority-resolved-v1.json.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions