feat: extract Cortex domain and SQLite storage - #364
Open
jmagar wants to merge 6 commits into
Open
Conversation
jmagar
force-pushed
the
feat/cortex-domain-extraction
branch
2 times, most recently
from
August 18, 2026 16:46
8e44cd5 to
d60bfa2
Compare
jmagar
force-pushed
the
feat/cortex-domain-extraction
branch
from
August 20, 2026 02:00
d60bfa2 to
77cf3e5
Compare
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.
Summary
cortex-domaincortex-storage-sqlitewith schema/migration paritycortex-ingest-coreand purecortex-inventorycontracts needed for downward dependenciesWave 2 is intentionally batched into this existing PR because the shared Rust runner pool is saturated.
Key boundaries
7edf23fadb94650c2d2a2f9c80111fb44319eea8rusqlite 0.40.2+r2d2_sqlite 0.35.0KNOWN_SCHEMA_VERSION = 47PatternSourceRowand pattern intermediates are crate-private; consumers usefetch_patternscortex-storage-sqlitecontains zerodead_codesuppressionsProduct/storage evidence from 77cf3e5
D13 changes only xtask policy/tests and extraction docs, so product/storage evidence remains the immediately preceding exact implementation head:
Exact-head D13 evidence on 5715089
Fresh CI caught six mechanically extracted donor-parity SQLite modules exceeding Soma's hard file-size ceiling. The fix uses the repository's existing exact-path transitional-limit mechanism, not a crate-wide exemption or weaker CI:
target/debug/xtask patterns: exit 0xtask check-docs: passedAdversarial review
D1-D13 are recorded in
docs/cortex-extraction/REVIEW.md. Latest findings:PatternSourceRowescaped the storage API. Fixed with publicfetch_patternsand crate-private intermediates.dead_codesuppressions remained. Fixed; storage now has zero such suppressions.D11 and D12 are also explicit Wave 8 terminal regression audits after all planned extraction work: no internal/raw SQLite row may escape again, and storage must still have zero
dead_codesuppressions.Fresh CI stabilization on ce544cd
Fresh CI after the D13 fix exposed a pre-existing self-update test race rather than a Cortex regression. The scheduler-sensitive async-executor assertion was replaced with a deterministic unit proof around
blocking_transaction, and transaction integration validation is serialized only during the test helper's stage+validate window to avoid intermittent LinuxETXTBSYfrom concurrent temporary executable validators. Production self-update code is unchanged. Evidence: deterministic regression 25/25; rebuilt transaction suite 38/38; default-parallel rebuilt transaction suite 5/5 complete runs; fullsoma-self-update --all-targets --all-featurestests passed; strict all-target/all-feature Clippy passed with-D warnings.