Repository navigation
refactor(global-db): run configuration and rollup writes as jobs - #4252
Merged
Merged
Conversation
…obal-db-config-jobs
|
ScriptedAlchemy
enabled auto-merge
October 18, 2026 05:32
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.
Step 5i-3 of the storage plan: global-db gets
RegisteredGlobalDb::transactand its configuration and observability rollup writes become writer jobs.API.
RegisteredGlobalDb::transact(body)runsbodyas one job overDatabase::transactand returnsResult<Result<R, E>>. The body gets aRegisteredGlobalDbWriteTx, which implementsQueryExecutorandExecutor, so the existing&impl Executorhelpers run in it unchanged. The write scope is checked before queueing. The runtime verifies the same authority at COMMIT, so a scope that ends mid-body rolls the job back.RegisteredGlobalDbWriteTxis exported (approved).Sites converted. Configuration store (initialize, daemon source binding, registry-shape convergence, component activation, profile
commit_direct), control (save_plan,commit_direct,commit_protected,dry_run_rollback,apply_rollback), revision (save_change_plan,commit), and the rollup rebuild, dirty-day claim and release, empty-day frontier initialize, claim and release, and compaction. The configuration mutation-scope probe is now a directrequire_active_write_scopecheck instead of begin-and-rollback.Behavior kept. A rollup rebuild that finds its stored receipt still ends by rolling back (
RebuildAbort::Replayed), so replay does not advancegraph_transaction_generation. Bodies areFn, so each site clones its inputs into the closure. Job failures report onefailed to <operation>error where the interactive path reported begin, commit and close separately.Proof.
transact_rolls_back_when_scope_ends_before_commitandcopied_transact_handle_cannot_write_after_scope_drop_inside_the_bodycover the primitive. A mutation that removed the wrapper's own commit-time scope check left both green, because the runtime already verifies authority at commit. The check is deleted and the decision recorded indecisions.tsv.Verification (Bazel). global-db
unit_testand its five integration targets,rustfmt_check_2024and--config=clippyon global-db,tracedecay-applicationunit_testandapplication_suite, andtracedecaydaemon_suite,mcp_suiteandsession_suitepass.session_suitefailed once with 39 schema-init lease timeouts while the host load average was near 500 and passed on a rerun.Not in this PR: the other global-db sites (stack delivery, observation projection, analytics, LCM and the rest), the old
RegisteredGlobalDbWriteTransaction, and the interactive API deletion.