feat(runtime): brain-split configuration and fold-cursor migration - #2183
feat(runtime): brain-split configuration and fold-cursor migration#2183ohdearquant wants to merge 3 commits into
Conversation
ohdearquant
left a comment
There was a problem hiding this comment.
Automated review. Posted by this repository's automated pull-request review pipeline; this is not a human read and does not gate the merge by itself.
Verdict on head 36c0ec8: REQUEST-CHANGES, 3 blocking findings. Finding details are delivered to the review's recipients rather than posted here. Do not merge this head while blocking findings are outstanding; a pipeline comment on a newer head supersedes this one.
…s, fingerprint separation Three fixes reconciling the B1 slice to merged ADR-171: - V22 cursor gains `last_event_id`: the (rowid, event id) witness pair from ADR-171's replay protocol. An implicit rowid is renumbered by VACUUM, so a bare rowid cursor could silently skip or re-fold after routine maintenance; the witness lets a worker validate the position, rebase by id on mismatch, and rewind-never-skip when the witnessed row was purged. - brain_split docs no longer promise behavior this tree does not have: the field is a forward-deployed seam, nothing populates it, and the fold worker that consumes it is the next change in the series. - compute_config_id folds the brain-split mode when configured, so split and legacy fold semantics can never share a warm daemon; the component is skipped when None (mirroring the topology component), preserving byte-identity for every existing daemon. Test proves Some != None and that None contributes no component; a no-op mutant reddens it.
ohdearquant
left a comment
There was a problem hiding this comment.
Automated review. Posted by this repository's automated pull-request review pipeline; this is not a human read and does not gate the merge by itself.
Verdict on head d01c40a: REQUEST-CHANGES, 1 blocking finding. Finding details are delivered to the review's recipients rather than posted here. Do not merge this head while blocking findings are outstanding; a pipeline comment on a newer head supersedes this one.
First slice of the brain feedback-fold decoupling (ADR-171 phase 1). This lands the inert machinery only — nothing reads the new configuration yet, and no dispatch behavior changes.
brain_fold_cursor: one durable checkpoint row per tailed event source, advanced by compare-and-set inside the same transaction as the fold it covers, so each feedback event folds exactly once across any number of worker processes.RuntimeConfig.brain_split: Option<BrainSplitConfig>(newbrain_splitmodule):None— the value every construction site in this PR uses — keeps today's behavior, the feedback fold running synchronously inside verb dispatch.Someis wired up by the follow-up PR that adds the fold worker.RuntimeConfigstruct-literal construction site across the workspace.Stacked on #2177, which makes the schema-terminal predicates version-agnostic so a V22 can land at all; this PR is the first consumer of that fix.
Testing
cargo fmt --check --all,cargo clippy --workspace --all-targets --all-featuresclean.