feat(runtime): derive durable request preservation diagnostics - #4302
Closed
Astro-Han wants to merge 19 commits into
Closed
feat(runtime): derive durable request preservation diagnostics#4302Astro-Han wants to merge 19 commits into
Astro-Han wants to merge 19 commits into
Conversation
Astro-Han
force-pushed
the
feat/4299-semantic-prefix-continuity
branch
from
August 31, 2026 04:02
b96e609 to
deec6d7
Compare
Base automatically changed from
refactor/4299-request-observation-authority
to
main
August 31, 2026 14:15
Astro-Han
force-pushed
the
feat/4299-semantic-prefix-continuity
branch
3 times, most recently
from
August 31, 2026 18:37
5d9e0c4 to
3015374
Compare
Astro-Han
force-pushed
the
feat/4299-semantic-prefix-continuity
branch
2 times, most recently
from
September 1, 2026 02:32
41a35b5 to
d958307
Compare
Astro-Han
force-pushed
the
feat/4299-semantic-prefix-continuity
branch
from
September 1, 2026 03:51
d958307 to
9cd8450
Compare
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Astro-Han
force-pushed
the
feat/4299-semantic-prefix-continuity
branch
from
September 1, 2026 15:30
9cd8450 to
a6a4aa1
Compare
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: closed, deferred
I am closing this PR because cache-usage and cost reporting do not require this diagnostic, and the value of maintaining a continuous request-comparison result has not been established. The branch is retained so this work can be reopened if a concrete need emerges. The independently useful authority cleanup in merged #4300 is retained. The implementation and verification below describe the closed proposal, not a shipped feature.
Summary
Workstream 2 of #4299 derives one durable backend diagnostic from the canonical prepared-request observations merged in #4300:
no_predecessor,preserved,diverged,unknown, orunavailable.latest_contextprojection and exposed through the existing Runtime Host Context Diagnostics protocol.This PR was originally stacked on #4300 in GitHub Stack #4303. #4300 is merged; PR2 is now rebased directly onto current
main.Lifecycle and ownership
sequenceDiagram participant Host as Runtime Host participant Runtime participant Ledger as Canonical attempts + durable lineage participant Projection as latest_context participant Protocol as Context Diagnostics Host->>Runtime: admitted main call + providerStateIdentity Runtime->>Ledger: read retry / step / continuation / previous-root lineage alt predecessor state is durable Ledger-->>Runtime: one predecessor, none, or ambiguous Runtime->>Runtime: compare ordered cacheable segments Runtime->>Projection: commit verdict with canonical attempt else causal predecessor is not readable yet Ledger-->>Runtime: unresolved Runtime->>Projection: commit internal rebuild marker with canonical attempt Projection-->>Protocol: public unavailable result Ledger-->>Ledger: predecessor later becomes durable Host->>Runtime: later diagnostics query Runtime->>Ledger: rebuild from final durable facts Runtime->>Projection: CAS-repair final verdict end Projection-->>Host: sealed context diagnostics Host-->>Protocol: validate and return bounded backend resultOwnership remains single-source:
ModelCallAttempt.requestObservationfrom refactor(runtime): make dispatched attempts own request observations #4300 is the only observation DTO.providerStateIdentityqualifies the comparison domain, including connection revision and proxy configuration.latest_contextremains a repairable projection, not a new event or authority.Backend behavior
unknown; it never proves preservation.unavailable.unavailablebut remains repairable; once durable facts are readable, warm, cold, and restart paths converge.unavailableand does not cause repeated ledger scans.Verification
Focused Runtime verifier on rebased head
a6a4aa1a36a3b8997df5edc389184b65bd3109dc: 48/48 passed.Cumulative #4300 + #4302 backend verifier on the same head: 133/133 passed. It covers:
ModelCallAttemptobservation codec,latest_contextbehavior,Additional checks:
git diff --checkpassed.Scope and simplification
Final diff: 12 backend files,
+1357/-47:+585/-13+772/-34The PR adds no separate observation DTO, copied-lineage migration, new Runtime event, parallel projection, provider wire capture, mutable last-request state, permanent dual-read/write path, or frontend presentation.
A later ablation audit superseded the earlier no-removals conclusion: the candidate-level invalid-event state can be removed, while blindly replacing the existing snapshot path with full recomputation breaks historical behavior. These experiments were not committed.
Non-goals