Repository navigation
fix(prism): allow one-candidate startup replay pages - #256
Conversation
Add an opt-in cursor page size for startup and forced ancestor replay while preserving complete enumeration, retry deduplication, and accounting gates. Document the mitigation and its limits while issue #255 remains under investigation.
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. |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Found 2 test failures on Blacksmith runners: Failures
|
Use a controlled Docker fixture for policy tests so runner daemon startup cannot exceed the subprocess deadline. Preserve explicit success fixtures and assert that valid configurations reach the expected Docker boundary.
Large pending candidate payloads can be decoded together during startup replay, stalling the coordinator long enough to lose its writer lease. This adds
PRISM_BLOCK_REPLAY_PAGE_SIZEso operators can request one candidate per cursor page during startup and forced ancestor re-drive.The setting accepts 1–1024 and defaults to the existing 1024. The cursor walk still enumerates all pending work before opening the startup gate. Page failures preserve the gate and retry without duplicate adoption; accounting, lease fencing, cleanup backpressure, ordinary polling, and the legacy cursorless fallback retain their existing behavior. Compose wiring, configuration validation, and operator guidance are included.
Related to #255; this is a partial mitigation and leaves that issue open. A synthetic Python 3.14.7 Linux ARM64 probe with approximately 232 MB per candidate reduced the observed decoding pause from 920 ms for two candidates to 470 ms for one. This is preliminary local evidence, not a production recovery result. A single large candidate and live candidate encoding can still exceed the lease budget; smaller pages also add database/RPC calls and do not cap total queued memory.
The environment-policy unit tests also use controlled Docker fixtures, including the minimal-PATH case. This prevents successful validation from waiting on the CI runner's real Docker daemon; explicit success-path fixtures continue to exercise source pinning and production provenance. The affected assertions now require reaching the expected Docker boundary.
Validation:
d392800; the other three were caused by the read-only test mount, and all six source-staging tests passed on a writable copy. The broader macOS run also passed those audit tests; its five Linux-only spool failures passed when rerun on Linux.Self-review of the full diff against
2.x.xfound no remaining issues, including configuration bounds, cursor completeness, failed-page retries, accounting gates, and test-fixture isolation.No production deployment is included. After review and deployment, opting into
PRISM_BLOCK_REPLAY_PAGE_SIZE=1requires checking completed pending-block accounting and subscribe/authorize/notify health on both public Stratum listeners. Restore1024to undo the tuning.