floor: fix non-exhaustive errors in surrealql adapter + add compile CI#29
Conversation
main has been silently uncompilable on `cargo check --workspace --all-targets` since #15 closed (which added `#[non_exhaustive]` to the vocab enums). No compile CI to catch it, so every subsequent merge was verified on vibes. This lands the floor. Three parts: 1. `crates/ogar-adapter-surrealql/src/lib.rs` - Two wildcard arms (`AssociationKind`, `EnumSource`) — required by `#[non_exhaustive]`. The four/three existing arms cover every variant defined today; the wildcards `unreachable!` with a message so adding a vocab variant produces a clean panic at first emit instead of a silent miscompile. - Three test-side `EnumDecl { … }` struct expressions replaced with `EnumDecl::new(…)` + field assignment (the struct is `#[non_exhaustive]` too — direct construction is forbidden from outside the crate). - Dead `EnumVariant` import removed. 2. `.github/workflows/ci.yml` - Minimal compile CI: `cargo check --workspace --all-targets` + `cargo test --workspace`, pinned to Rust 1.95.0 per `rust-toolchain.toml`, with `Swatinem/rust-cache` for re-runs. - Runs on `push: main` and every PR. - This is the floor — once it's green on main, any future PR that breaks the workspace fails its own CI instead of merging. 3. `docs/ARCHITECTURAL-DECISIONS-2026-06-04.md` - ADR-022 (The Firewall) reception receipts — pinning the cross-session convergence (2026-06-05) that triangulated the inner/outer split: OGAR docs (#26), Rubicon implementation (bardioc PR #17), runtime architectural handover (bardioc #18 + lance-graph #470). Three independent landings now share the inner = trie-append / outer = `commit_event` boundary; weakening The Firewall now requires re-coordinating across all three surfaces — exactly the friction the change-policy clause was designed to produce. Verified locally: `cargo check --workspace --all-targets` clean; `cargo test --workspace` = 80/80 passing + 8/8 doctests. https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64c858ca77
ℹ️ 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".
| - name: cargo check --workspace --all-targets | ||
| run: cargo check --workspace --all-targets | ||
| - name: cargo test --workspace | ||
| run: cargo test --workspace |
There was a problem hiding this comment.
Compile feature-gated parser path in CI
The new workflow only runs Cargo with default features here; I checked crates/ogar-adapter-surrealql/Cargo.toml and the parser implementation plus its smoke tests are behind cfg(feature = "surrealdb-parser"). cargo check --help/cargo test --help show --all-features is what activates optional features, so this CI can stay green while the parser-backed build/tests are broken for users enabling that feature. Please add an all-features check/test or explicitly exercise -p ogar-adapter-surrealql --features surrealdb-parser.
Useful? React with 👍 / 👎.
Summary
mainhas been silently uncompilable oncargo check --workspace --all-targetssince PR #15 closed — that's when#[non_exhaustive]was added to the vocabAssociationKind,EnumSource, andEnumDecl, but the matches/struct-expressions inogar-adapter-surrealqlwere never updated. No compile CI to catch it, so every merge since has been verified on vibes.This PR lands the floor.
Three parts
1.
crates/ogar-adapter-surrealql/src/lib.rsProduction code:
AssociationKind,EnumSource) — required by#[non_exhaustive]. The four/three existing arms cover every variant defined today; the wildcardsunreachable!with a message so adding a vocab variant produces a clean panic at first emit instead of a silent miscompile.Test code (same crate, same file):
EnumDecl { … }struct expressions replaced withEnumDecl::new(…)+ field assignment.EnumDeclis#[non_exhaustive]as a struct, so direct construction is forbidden from outside the crate.EnumVariantimport removed.2.
.github/workflows/ci.ymlMinimal compile CI:
cargo check --workspace --all-targetscargo test --workspacerust-toolchain.tomlSwatinem/rust-cachefor re-runspush: mainand every PROnce this is green on
main, any future PR that breaks the workspace fails its own CI instead of merging.3.
docs/ARCHITECTURAL-DECISIONS-2026-06-04.md— ADR-022 reception receiptsPins the cross-session convergence (2026-06-05) on The Firewall:
docs/THE-FIREWALL.md(PR #26)LanceMembraneWriter(outer write), Rubicon dispatch (inner)BINDSPACE_DISSOLUTION_HANDOVER.mdindependently arrives at the same inner = trie-append / outer =commit_eventsplit, citing PR #28's_effectiveReaderspattern as the model for task-scoped qualia activationThree independent landings now triangulate the boundary. Weakening The Firewall now requires re-coordinating across all three surfaces — exactly the friction the change-policy clause was designed to produce.
Verification
Locally on this branch:
CI on this PR will be the first run of
.github/workflows/ci.yml.Why now, in this order
Per the queued-work review with the runtime session: this is the highest-leverage item — the next two follow-ups (#25 P2 canonical-identity fix, then the surrealql AST→
Classwalk) both want to land on a workspace that actually compiles. Floor first, substance second.https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY