Repository navigation
Conversation
The pre-Phase-D carve-out let a caller supply its own proof. It could PREPARE at an arbitrary pre-D start timestamp, creating an intent there, then COMMIT at another pre-D timestamp the resolution path accepted because it was pre-D. Neither half consulted anything durable. This closes the first step. ValidateForwardedTxnStartTimestamp now admits a pre-Phase-D start only inside an admission window -- the longest legal lock TTL plus an hour of grace for skew and rolling activation -- after which no transaction can still legitimately be preparing at such a start. An allocator that cannot report the Phase-D floor leaves the window open; a missing signal must not narrow into a refusal that would strand legitimate legacy resolution. The window reads a wall clock, which the HLC rules forbid for ordering. It is not an ordering decision: it governs whether a request may create state, never where that state sorts. No visibility, OCC or MVCC comparison consults it, so skew costs availability for legacy resolution, never correctness. ClassifyPrePhaseDCommit is the second half -- prefer the primary's durable record over the time bound wherever it is readable -- and ships tested but unwired. It needs a signal the forwarded-commit path does not have yet: whether this node can definitively read the primary, as distinct from not finding a record. Wiring it without that would make a remote primary indistinguishable from a missing record and refuse the cross-shard resolutions the design is careful to preserve. ShardStore.primaryTxnRecordedStatus already draws that distinction; exposing it is the remaining work, tracked in the doc. ABORT stays a window decision even with a local primary: abortTSFrom synthesises its timestamp, so no record can ever support it. Claude-Session: https://claude.ai/code/session_013rNHooj7NF3giihWVba8QE
|
@codex review |
|
@claude review |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The change adds a bounded admission window for new pre-Phase-D PREPAREs and still allows COMMIT and ABORT to resolve existing intents. No concrete merge-blocking issue was found in the supplied context. Pre-merge checks |
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @bootjp's task in 3m 34s —— View job Review
SummaryThe design (§4.2/§4.3 in Finding 1 (blocking): the admission window is a no-op in every real deployment
Walking the chain that
So the type assertion at This gap is invisible in the test suite because Fix: add Finding 2 (minor): likely data race in the new tests on the package-level clock var
Everything else
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3e27a89ff3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7fe4e617ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🟡 Changes recommended
Production allocator wrappers bypass the new bound, while resolution logic, wall-clock reliance, and test races introduce additional correctness concerns.
4 open findings
What changed in this PR
Adds bounded admission for pre-Phase-D transaction intents and introduces durable-evidence classification for future commit resolution wiring.
Changes:
- Adds Phase-D floor sourcing and an intent-creation window.
- Adds commit-evidence classification and targeted tests.
- Updates the design status and implementation record.
| File | Description |
|---|---|
kv/tso.go |
Enforces the new admission window. |
kv/tso_prephase_d.go |
Defines window and evidence-classification logic. |
kv/tso_prephase_d_test.go |
Tests admission and classification behavior. |
docs/design/2026_09_02_partial_prephase_d_resolution_evidence.md |
Records the partial implementation decision. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e80cc0c83b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


Summary
Bound creation of a new pre-Phase-D intent to the maximum transaction lock TTL plus one hour of grace after Phase-D activation. The check uses the applied Phase-D floor and a fresh allocation from the durable TSO group. It bypasses cached batch slots, which could otherwise keep the window apparently open long after the TSO passed its end. An allocator without a floor or fresh-admission capability fails closed for new pre-D PREPAREs.
ClassifyPrePhaseDCommitalso records the decision for a local primary commit record. It remains unwired until the forwarding path can distinguish an unreadable remote primary from a definitively absent local record. Existing intent resolution remains admissible after the creation window closes.Behavior and risk
A newly forwarded PREPARE with a pre-Phase-D start is rejected with
ErrPrePhaseDWindowClosedafter the window. The exceptional path now makes one fresh TSO allocation to measure durable progress. Ordinary post-Phase-D timestamps use the existing validation path.Test evidence
go test ./kv -run 'Test(PrePhaseD|ForwardedStartTimestamp)' -count=1— pass.-race— pass.golangci-lint run ./kv/... --timeout=5mwith workspace caches — 0 issues.TestPrePhaseDAdmissionBypassesStaleBatchSlotretains an unused old batch slot, advances the underlying TSO beyond the window, and verifies admission closes.-race;golangci-lint run ./kv/... ./adapter/...reported 0 issues.Self-review
Summary by CodeRabbit