3.0 KiB
3.0 KiB
Review R2: session-pod-state-boundary
Verdict: approve
Conceptual summary
Commit d2e8087 addresses the two prior blocking issues without reintroducing session-log scope authority. The restore path now reconciles missing/unreachable delegated children inside Pod::restore_from_manifest before returning a usable Pod, and pod_registry::reclaim_delegated_scope now removes the parent's delegated deny layer even when the child allocation is already absent.
Findings
No blocking issues found in the reviewed delta.
The specific R1 blockers are resolved:
crates/pod-registry/src/mutate.rs:181-224now removes matchingparent_alloc.scope_denyentries unconditionally for delegated write rules, before optionally removing/reparenting an existing child allocation. This covers the missing-child allocation case and remains idempotent for absent deny entries.crates/pod-registry/src/mutate.rs:524-551adds direct coverage for reclaiming parent deny when the child allocation is missing.crates/pod/src/pod.rs:4056callspod.reconcile_restored_delegations().await?fromPod::restore_from_manifestbefore returning the restoredPod;restore_from_pod_metadatastill delegates throughrestore_from_manifest, so name-based restore gets the same enforcement.crates/pod/src/pod.rs:4061-4108performs reachability checks, reclaims runtime lock state, updates in-memory scope, moves reclaimed children intopod-store, and queues a notification viapush_notifybefore the restored Pod can be used for a model request.- Grep review did not find reintroduced
pod.scope/ effective-scope session authority. RemainingLogEntry::Extensionuses are metrics/memory or generic replay handling, not Pod scope snapshots.
Non-blocking notes
PodController::spawnstill has a secondarySpawnedPodRegistry::load_from_pod_state_with_reclaimreconciliation/notification path. With the constructor-level reconciliation, restored Pods should normally arrive there already cleaned up; the remaining path is still useful for registry construction and non-restore cases, but future cleanup could avoid duplicate conceptual ownership.- As noted in R1,
pod-store::PodMetadataStore::update_by_nameremains read-modify-write internally. That is acceptable for this ticket's filesystem backend and covered field-preservation semantics, but it is not a transactional concurrency primitive.
Validation run
Inspected the d2e8087 delta and the current relevant files:
crates/pod-registry/src/mutate.rscrates/pod/src/pod.rscrates/pod/src/controller.rscrates/pod/tests/pod_comm_tools_test.rscrates/pod/tests/restore_test.rs
Commands run from /home/hare/Projects/insomnia/.worktree/session-pod-state-boundary:
cargo test -p pod-registry reclaim_delegated_scope
cargo test -p pod --test pod_comm_tools_test load_from_pod_state_reclaims_missing_child_scope_and_records_history
cargo test -p pod --test restore_test
git diff --check HEAD~3..HEAD
All commands passed.