Skip to content

Authenticate reconciliation target parents before mutation #974

Description

@bcdonadio

Observed behavior: Worktree reconciliation performs target-parent operations before centralized database admission, including temporary snapshot and VACUUM work, directory ensures, and metadata or pattern writes. Those paths do not share one retained authentication witness for the target parent.

Expected behavior: Reconciliation should authenticate and retain the target parent identity before any snapshot, database, metadata, or pattern mutation, and reject parent replacement consistently across the whole operation.

Root cause: The reconciliation lifecycle has several independent pathname-based operations before and around getLcmConnection; fixing only the central connection path does not cover them.

How to reproduce: Inspect src/worktree-reconciliation.ts around the normalized-main snapshot, target directory creation, and metadata or pattern publication paths. A private synthetic parent-replacement fixture can demonstrate that these operations need one operation-scoped target-parent witness.

Environment:

  • Agent: Codex campaign Opus planning review
  • Connector: repository static analysis
  • OS: Fedora Linux

Discovered during Epic #968 Bug #935 planning. This reconciliation-wide lifecycle is distinct from #935's direct connection and EventsDb consumers and from #732's legacy identity-command admission. It is outside frozen S0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

High

Effort

None yet

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions