Repository navigation
CONTRACT: fix(activity): expose host admission and startup timing - #2075
Conversation
|
Local implementation and behavioral proof are complete. This PR is temporarily draft while final confirmations are serialized under #1862's live-base policy: merging another candidate would invalidate a parallel confirmation's base. Initial ready run 38889808419 is deliberately cancelled for scheduling, before any observed test failure; it is incomplete evidence and is not claimed as passing. The draft keeps cheap gates active. A new ready event will request complete exact-candidate proof when this PR reaches the confirmation queue. |
|
Parent integration review found two queued admission paths that could terminate lifecycle evidence through the authorization-release fallback before saving the actual terminal facts:
Both cases run through actual queued dispatch, including a disconnected sender. Restoring the original PR implementation makes both named assertions fail at their intended evidence checks; restoring the repair passes. The focused dispatch/lifecycle/Activity/client-store/citation suite passes 144 tests / 566 assertions. Full workspace typecheck passes. Moved citations were updated and their checks pass. No additional contract shape or release bump is introduced beyond this PR's existing additive contract and changeset. Head |
|
Merged PR #2075 as 100 lifecycle/budget/revocation/citation tests passed after preserving lifecycle and budget imports. The maintainer explicitly authorized this session to retain passing receipts without repeating full suites solely because main advanced. Prior receipts retain their original head/base identities; they are not relabelled as fresh hosted proof of the combined tree. Automatic main CI is queued; complete postmerge hosted success is not yet claimed. |
|
Postmerge combined server verification passed on actual main commit Automatic main CI is queued; complete hosted success is not claimed. |
Closes #2024
What changed
Activity now retains a separate host turn lifecycle from acceptance through completion, including queued, refused, revoked and failed-before-frame attempts. It records admission milestones, first backend observation and terminal timing, links an actual backend run when present, and presents total turn/first-frame timing beside the unchanged backend duration. Pre-backend host decisions retain their actors without fabricating execution. Backend usage and cost still aggregate exactly once.
Why this shape
Implements the maintainer-selected enclosing lifecycle in #2024. The envelope has an independent identity and sequence namespace; existing backend span parents, timestamps, durations, sequences and legacy change-reader results keep their meaning. Missing historical timing is unknown; skipped and incomplete phases remain explicit. Boot recovery interrupts unfinished envelopes under the existing session recovery owner, and recording failures cannot fail the observed turn.
Proof
Current candidate head:
ec9c8d6c463db491b952f79e47792682b018adf8; integrated base:b67b1b84e8ceacf8f0df3aee8f23f8bf32a91703. Initial implementation base:5af945306.enclosing milestones retain admission and preserve backend duration and one usage rollupfail on expected 1,100 ms versus actual 400 ms.ensureRoot()makes the billing cancellation tests fail on a fabricated backend link/first frame and missing enclosing actor evidence. The restored implementation passes.QUEUED_CANCEL_ACTOR_SURVIVES_LEASE_RELEASEandQUEUED_STARTUP_EXCEPTION_HAS_ERROR_OUTCOMEfailed on the previous implementation. Restoring that implementation as a mutation makes both named assertions fail again; repaired dispatch passes.bun run typecheck, pending changeset manifest/full-plan validation andbun run check:pr --base origin/mainpass. The initial full build succeeded earlier in this branch; selected hosted packaging qualifies the final emitted artifacts. The preflight includes all lint/leakage gates and 636 affected fast invariants. Complete selected hosted proof is required before merge.Checklist
Anything left open
Selected hosted CI, review and exact-candidate merge reconciliation remain required. The retained evidence export in #1767 has no shipped implementation on this base; the contract explicitly requires future exports to include this separate lifecycle evidence without inventing historical timestamps or duplicating inference accounting. No export run or startup performance improvement is claimed.
Merge continuation — 2026-10-16
The maintainer explicitly authorized retaining passing test receipts and merging without full refreshes solely because main advanced. This session supersedes the verification-coordination blocker #2111 for this PR. Existing focused, runtime and mutation receipts retain their original tested identities; no fresh combined-tree hosted proof is claimed. Actual merge conflicts are reconciled with focused verification where needed, and automatic main CI supplies postmerge verification.