Conversation
This comment has been minimized.
This comment has been minimized.
619cad4 to
f13c062
Compare
Signed-off-by: Eitan Yarmush <[email protected]>
Signed-off-by: Eitan Yarmush <[email protected]>
Signed-off-by: Eitan Yarmush <[email protected]>
Signed-off-by: Eitan Yarmush <[email protected]>
Retain the runtime-revision lifecycle checks previously carried by a merge commit. Align fork documentation with main requiring terminal task boundaries for checkpoints. Signed-off-by: Eitan Yarmush <[email protected]>
f13c062 to
0fa1165
Compare
|
Overall, I think this approach makes sense given the planned follow-up to stop copying event history. Through the investigation I did on this, Codex helped come up with a few areas where we can likely simplify and harden this PR:
|
Signed-off-by: Eitan Yarmush <[email protected]>
|
@iplay88keys addressed the lineage and concurrency points:
We also already benchmarked the dense-history/deep-chain cases before this update:
PostgreSQL 18.6, 2-CPU/4-GiB container, warm cache, 30 measured executions after three warmups, generic prepared plans, 51 rows fetched for a 50-checkpoint page. Depth includes the current history. The fixture used synthetic 256-byte checkpoint payloads and checked expected IDs; these timings exclude API/protobuf overhead and do not measure cold storage, concurrent writes, or bloat. They predate this update's removal of the duplicate local scan. Separate index/pagination experiments improved dense cases, but those optimizations are not included here. Database/migration and relevant service tests passed with |
Forks omit inherited checkpoints because listing filters only by the instance that created them. A fork at C2 now lists C1 and C2 alongside its own checkpoints, excluding source-history boundaries after C2 and preserving each checkpoint's original provenance. Listing by a deleted instance's ID returns the same complete checkpoint lineage.
Store immutable parent-history and cutoff fields on
agent_history, renamed froma2a_contextto distinguish a history branch from its public A2A context ID. Retain a unique originating instance ID on history so listing can start there directly, without a local-checkpoint fallback. Composite foreign keys enforce instance/history identity and ownership, matching parent/child owner and context, and a cutoff that identifies an event in the parent history. Schema changes remain in migration 1's pre-release baseline.Forks continue copying bounded events and rebuilding private task projections at terminal task boundaries. The instance's source-checkpoint reference retains fork-request identity and runtime provenance. Conversation reads remain local; checkpoint listing traverses retained history ancestry and bounds candidates per history before combining the checkpoint-ID page.
Retained histories protect inherited checkpoints and their snapshot Tags even after all related instances are deleted; there is currently no history garbage collection. Fork creation and deletion checks share a history lock. Deletions already in progress can finish or retry. Deterministic PostgreSQL tests cover both operation orders, for both the fork's source checkpoint and an earlier checkpoint inherited by a later fork.
Validation: