Skip to content

fix(daemon): anchor saved sibling validation - #1262

Closed
sethkarten wants to merge 8 commits into
core03-managed-session-catalogfrom
core04-saved-sibling-validation
Closed

fix(daemon): anchor saved sibling validation#1262
sethkarten wants to merge 8 commits into
core03-managed-session-catalogfrom
core04-saved-sibling-validation

Conversation

@sethkarten

@sethkarten sethkarten commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • anchor saved/passive sibling validation to Core-03 immutable managed catalog
  • validate stable id/path/depth/parent claims and fail closed on duplicate or conflicting topology
  • add focused saved sibling and lazy subagent regression coverage

Stack

Validation

  • Nonwriting Biome exact 3 paths: pass
  • Root tsgo --noEmit: pass
  • Configured env-clean focused/Core03 suite: 5 files, 245/245 tests pass
  • diff-check and clean hygiene: pass

Exclusions

  • no project-MCP, cleanup, lifecycle teardown, probe, or recovered-worker layers

Note

Medium Risk
Changes session naming and reservation for saved RLM siblings; malformed catalogs that previously slipped through are now rejected, which may block rename/create until data is fixed.

Overview
Saved passive sibling name checks in DaemonSupervisor now resolve each child’s parentSessionPath against that session file (canonicalSavedSiblingParentPath), so siblings that point at the same parent via different relative paths share one reservation key and one parent anchor for Core03 name validation.

assertSavedSiblingNameAvailable fails closed on ambiguous catalogs (duplicate ids/paths, mixed parents or depths, missing target) before calling assertAgentSessionNameAvailable. It synthesizes a local parent roster entry because catalog.siblings() only returns children, not the parent row.

Create and rename paths route saved targets through savedSiblingNameReservationInput instead of raw persisted parent strings. Regression tests cover structural conflicts, relative parent equivalence, and in-flight reservation races.

Reviewed by Cursor Bugbot for commit 1dd52db. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix saved sibling validation in DaemonSupervisor to anchor parent paths canonically

  • Introduces canonicalSavedSiblingParentPath to resolve relative parentSessionPath values against each child session's file path, eliminating ambiguity from relative paths across siblings.
  • assertSavedSiblingNameAvailable now fails closed on structurally ambiguous catalogs (duplicate ids/paths, mismatched parent or depth, missing target) before performing name conflict checks.
  • sessionNameReservationInput and createOrReuseWorker now derive reservation inputs via savedSiblingNameReservationInput, unifying reservations across siblings that reference the same parent via different relative paths.
  • Risk: validation is now stricter — previously accepted ambiguous or malformed sibling catalogs will now be rejected outright.

Macroscope summarized 1dd52db.

Comment thread packages/coding-agent/src/modes/daemon/daemon-supervisor.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 514e155. Configure here.

Comment thread packages/coding-agent/src/modes/daemon/daemon-supervisor.ts
@sethkarten
sethkarten force-pushed the core04-saved-sibling-validation branch from 8d77973 to 2b549ba Compare August 12, 2026 18:34
@sethkarten

Copy link
Copy Markdown
Contributor Author

Superseded by #1334 as part of the physical Core/MCP stack split. The replacement preserves this PR’s reviewed semantic delta on the corrected shared #1243 foundation. Closing this PR to avoid duplicate review; branch retained for provenance.

@sethkarten sethkarten closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant