Skip to content

fix: preserve fork cost boundaries without copying parent events - #355

Merged
Brian Krabach (bkrabach) merged 5 commits into
mainfrom
lane/ci-fork-repair-2c88
Sep 20, 2026
Merged

Brian Krabach (bkrabach) merged 5 commits into
mainfrom
lane/ci-fork-repair-2c88

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

What changed

  • Stops legacy fork copies of parent root events, CI capture, and lifecycle metadata; child sessions retain only their own event activity. No session data is deleted.
  • Persists a versioned immutable fork_cost_boundary in child native metadata, so cost reporting accounts for parent-through-fork history plus child-owned cost without reconstructing ancestors.
  • Maps Foundation-native turns conservatively across reminder/list envelopes and repeated owner suffixes, and explicitly refuses an ambiguous intra-prompt cutoff rather than claiming a false boundary.
  • Preserves normal root-resume compatibility and keeps --no-events as a compatibility option.

Why

Forked sessions need accurate inherited-cost accounting without copying parent-owned artifacts or assigning ownership incorrectly.

Verification

  • Fable (claude-fable-5-1) reviewed exact head 4e1688d2d53daeb5e03ae710d2eb9b9e22d2ee27 and approved it after the final test condition was met.
  • DTU with frozen dependencies: focused suite passed (71 tests); full suite passed (2,433 passed, 4 skipped, 13 deselected, 1 expected failure). The full suite was independently rerun.
  • Deterministic rendered interactive fork/resume coverage verifies preserved metadata, reminder/repeated-turn mapping, nested ownership, and explicit unavailable boundaries for ambiguous cuts.
  • Compaction coverage verifies preserved costs and the missing-CI warning path.

Limitations / caveats

  • Historical forks without a stored boundary report incomplete history; the implementation does not guess retroactive ancestry.
  • An explicit historical cut inside a reminder-split prompt can be unavailable; unaffected full-copy forks retain their boundary.
  • Large-capture full scans and conservative cost caps remain in place.
  • No external paid-provider validation was run; optional-behavior proof is limited by the partial-bundle fixture.

Breaking changes

None.

Persist verified inherited-cost boundaries during both fork paths; restore only the boundary plus child-owned CI cost, never mutable ancestors.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@bkrabach
Brian Krabach (bkrabach) merged commit ebfc69f into main Sep 20, 2026
9 checks passed
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.

2 participants