Skip to content

floor: fix non-exhaustive errors in surrealql adapter + add compile CI#29

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/floor-fix-non-exhaustive-and-ci
Jun 5, 2026
Merged

floor: fix non-exhaustive errors in surrealql adapter + add compile CI#29
AdaWorldAPI merged 1 commit into
mainfrom
claude/floor-fix-non-exhaustive-and-ci

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Summary

main has been silently uncompilable on cargo check --workspace --all-targets since PR #15 closed — that's when #[non_exhaustive] was added to the vocab AssociationKind, EnumSource, and EnumDecl, but the matches/struct-expressions in ogar-adapter-surrealql were 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.rs

Production code:

  • 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.

Test code (same crate, same file):

  • Three EnumDecl { … } struct expressions replaced with EnumDecl::new(…) + field assignment. EnumDecl is #[non_exhaustive] as a struct, so 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
  • Swatinem/rust-cache for re-runs
  • Runs on push: main and every PR

Once 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 receipts

Pins the cross-session convergence (2026-06-05) on The Firewall:

Source Receipt
OGAR docs This ADR + docs/THE-FIREWALL.md (PR #26)
Runtime implementation bardioc PR #17LanceMembraneWriter (outer write), Rubicon dispatch (inner)
Runtime handover bardioc PR #18 + lance-graph PR #470 — BINDSPACE_DISSOLUTION_HANDOVER.md independently arrives at the same inner = trie-append / outer = commit_event split, citing PR #28's _effectiveReaders pattern as the model for task-scoped qualia activation

Three 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:

$ cargo check --workspace --all-targets
Finished `dev` profile [unoptimized + debuginfo] target(s)

$ cargo test --workspace
test result: ok. 80 passed; 0 failed; 0 ignored …
all doctests ran in 0.31s; 8 passed

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→Class walk) both want to land on a workspace that actually compiles. Floor first, substance second.

https://claude.ai/code/session_01PBTGaPCSnnt6u3pjXpbLwY

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
@AdaWorldAPI AdaWorldAPI merged commit a1a29df into main Jun 5, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread .github/workflows/ci.yml
Comment on lines +29 to +32
- name: cargo check --workspace --all-targets
run: cargo check --workspace --all-targets
- name: cargo test --workspace
run: cargo test --workspace

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants