- backfill.rs: remove blank line between two consecutive doc comment blocks
- detach.rs: merge orphaned step-list doc comment into function doc comment
- migration.rs: remove blank line after doc comment before private fn
- migration_tests.rs, migration_command_tests.rs, migration_avatar_tests.rs,
migration_databricks_tests.rs: add .unwrap() to calls that now return
Result after C5 migration fallibility changes
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
C1 — Production agents-root contract:
- scope_init.rs already had the correct base_dir contract (no extra
'agents' join); added production-shaped adoption test that mirrors
the exact managed_agents_base_dir semantics to prevent regression.
C2/C3 — Deadlock removal + store lock:
- workspace.rs: drop rt_transition + store lock BEFORE compensate_drain
on all three commit-guard failure paths; hold store lock from drain
through commit so concurrent store writes cannot interleave.
- identity.rs: drain returns Err((stopped, msg)); compensate uses the
real stopped slice, not []; locks dropped before compensate_drain.
C4 — Captured-scope completion:
- confirm_team_snapshot_import and confirm_agent_snapshot_import: both
now capture scope at entry, use _at() APIs throughout, validate
generation before first write, resolve RetentionScope from captured.
- Mesh recovery (recovery.rs): capture full WorkspaceAgentScope at entry;
validate generation before each write to definitions_dir.
- Restore missing-record stale-child: when find_managed_agent_mut fails
for a spawned child (record deleted between Phase B and C), terminate
the child and remove its receipt instead of leaking the process.
C5 — Pre-Ready family in scope initializer:
- ensure_scope_ready gains owner_pubkey parameter.
- New run_pre_ready_family: runs legacy retention migration and persona
snapshot backfill before writing _ready so a crash leaves the scope
in a retryable state, not permanently marked Ready with incomplete data.
- workspace.rs guards remain for pre-existing Ready scopes (idempotent).
C6 — Delete dead boot-migration wrappers:
- Deleted backfill_standalone_agents, detach_directory_backed_teams, and
strip_baked_team_instructions (the #[allow(dead_code)]-suppressed
app-level wrappers); their _in_dir equivalents are the authoritative
scoped pipeline entry points.
- Removed tests for the deleted functions from migration_command_tests.rs.
C7 — Structured degradation reporting:
- spawn_event_sync return type changed from Result<(), String> to (): the
dispatch cannot fail; the false Result contract is removed.
- workspace.rs restore spawn now emits workspace-degraded Tauri event when
restore_managed_agents_on_launch returns Err, making restore failures
observable to the UI instead of silently logged.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>