Skip to content

Deprecate ogar-adapter-surrealql — a separation-of-concerns error; point to V3 replacement#224

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/deprecate-surrealql-compile-time-only
Jul 22, 2026
Merged

Deprecate ogar-adapter-surrealql — a separation-of-concerns error; point to V3 replacement#224
AdaWorldAPI merged 1 commit into
mainfrom
claude/deprecate-surrealql-compile-time-only

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jul 22, 2026

Copy link
Copy Markdown
Owner

What (root reason corrected)

Operator ruling (2026-07-22). The root reason is a separation-of-concerns error, NOT a storage/serialization one — operator correction: "it's not about touching storage; it's the initial misconception that runtime AST can be delegated to the SurrealQL DLL AST API. Even if it would work it would be a fundamental SoC misconception."

OGAR is a compiler; its IR (Class/ActionDef) is its own concern:

  • parse_surrealql_ddl (built on surrealdb-parser/surrealdb-ast — the foreign AST DLL API) delegates OGAR's own AST/IR front-end concern to that foreign API. OGAR sources lift into Class via OGAR's own ogar-from-<lang> front-ends, never a foreign-AST round-trip.
  • emit_surrealql_ddl treats SurrealQL DDL as if it were part of OGAR's IR pipeline; DDL is at most a pure adapter output, never a spine.

Even if it worked perfectly it would still be wrong — an architectural (SoC) error, not a functional one. The crate was ALREADY structural-only (never emitted DEFINE EVENT … WHEN … THEN), so this is not "remove a smuggled behavioral arm" — it retires the AST-delegation pattern. The DO arm can never use SurrealQL; behavior is ActionDef, compile-time.

(Downstream consequences that also hold but are NOT the root: no runtime (de)serialization; compile-time only; ADR-022/023 Firewall.)

Replacement (already shipped, compile-time)

  • Behavior -> ogar-render-askama::render_class_with_methods (Rust methods that ARE the ActionDef DO-arm; on_enter => &mut self).
  • Spine -> the compiled ClassView in the lance-graph<->OGAR V3 substrate.

Code (additive, no deletion — 22 adapter tests stay green)

  • #[deprecated] on emit_surrealql_ddl, parse_surrealql_ddl, ParseError, each noting the SoC reason + replacement + DISCOVERY-MAP D-SURREALQL-DEPRECATED.
  • Crate-level #![allow(deprecated)] — silences only THIS crate's internal use; external callers still get the warning.
  • ogar-knowable-from (the ONLY external caller — default-off surrealql-hint): #[allow(deprecated)] + downstream-deprecated comment.
  • Cargo description flagged DEPRECATED.

Canon (append-only; regrade in place)

  • DISCOVERY-MAP: D-SURREALQL + D-HINT regraded G->DEPRECATED; new dated D-SURREALQL-DEPRECATED entry recording the SoC ruling + replacement map.
  • SURREAL-AST-AS-ADAPTER §7: dated correction superseding the 2026-06-04 "No deprecation" line (orthogonal to that doc's behavior-out-of-DDL carving; the new ground is the AST-delegation SoC error). ogar-vocab Class/ActionDef/ActionInvocation unaffected.
  • INTEGRATION-MAP: emit/parse rows regraded DEPRECATED; Track O2's "DEFINE EVENT->ActionDef" retired.

Verified

  • cargo clippy -p ogar-adapter-surrealql --all-targets -- -D warnings -> exit 0
  • cargo clippy -p ogar-knowable-from --features surrealql-hint --all-targets -- -D warnings -> exit 0
  • adapter tests 22/22; fmt clean.

Scope note

Sibling storage-membrane adapters (ogar-adapter-ttl, -postgres-ddl, -clickhouse-ddl) are out of scope — they are pure adapter outputs (storage egress), not an AST-delegation into OGAR's IR pipeline. -postgres-ddl is operator-ruled as the transactional System-of-Record.

🤖 Generated with Claude Code

@cursor

cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_adf596da-e6a5-4997-af75-a4b7c3b3ee72)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review July 22, 2026 01:43

@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: 3ffe5f928a

ℹ️ 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 docs/INTEGRATION-MAP.md Outdated
| `ogar-python` | Odoo 17.0 core (`@api.depends/@api.onchange/@api.constrains` → `ActionDef` per `ADAPTERS-AND-ACTORS §3.4.1`; `_inherits` → mixins; mapping locked `ODOO-TRANSCODING.md §3,§5`) | **ABSENT** (queued) → **Track O3** |
| `ruff_openproject` / `ruff_ruby_spo` | Rails AR source → SPO triples; vendored in openproject‑nexgen‑rs; test extracts `[TimeEntry, WorkPackage]` from a Rails fixture | **[G] CODED** `[per xs]` |
| `parse_surrealql_ddl` walk | SurrealQL DDL → `Vec<Class>`: DEFINE TABLE→Class; `record<X>`→BelongsTo; `option<record<X>>`→BelongsTo+optional; `option<prim>`→Attribute(required=false). NOT yet: `ASSERT IN`→EnumDecl, DEFINE EVENT→ActionDef, non-owning-side post-pass | **[H] scaffold** — feature `surrealdb-parser` wired (OGAR #23 rust 1.95), walk partial (`ogar-adapter-surrealql/src/lib.rs:143-165, 219-299`) → **Track O2** |
| `parse_surrealql_ddl` walk | SurrealQL DDL → `Vec<Class>` | **[H] scaffold →DEPRECATED (2026‑07‑22)** — parsing a DDL string back into IR is runtime deserialization of code, forbidden by the compile‑time substrate; the IR is wire‑truth (sources lift via `ogar-from-<lang>`, never a DDL round‑trip). Track O2 (below) is retired, not deferred. See DISCOVERY‑MAP `D‑SURREALQL‑DEPRECATED`. |

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 Keep the integration map's SurrealQL status consistent

This row now says the SurrealQL parse path is deprecated and O2 is retired, but the same living map still advertises parse_surrealql_ddl walk [H scaffold] in the overview and S3 as [H] partial walk, while S2 still lists emit_surrealql_ddl as [G] wired. Because this document explicitly says implementation follows the map, readers using the overview or seam table will continue planning against the retired SurrealQL paths; please update those remaining entries as part of this deprecation.

Useful? React with 👍 / 👎.

…int to V3 replacement

Operator ruling (2026-07-22), root reason CORRECTED from an earlier
storage-framing to the actual one: this is a **separation-of-concerns**
misconception, not a storage/serialization one. Operator: "it's not about
touching storage — it's the initial misconception that runtime AST can be
delegated to the SurrealQL DLL AST API; even if it would work it would be a
fundamental SoC misconception."

OGAR is a compiler; its IR (Class/ActionDef) is its OWN concern:
- parse_surrealql_ddl (built on surrealdb-parser/surrealdb-ast — the foreign
  AST DLL API) delegates OGAR's own AST/IR front-end concern to that foreign
  API. OGAR sources lift into Class via OGAR's own ogar-from-<lang> front-ends,
  never a foreign-AST round-trip.
- emit_surrealql_ddl treats SurrealQL DDL as if it were part of OGAR's IR
  pipeline; DDL is at most a pure adapter OUTPUT, never a spine.

Even if it worked perfectly it would still be wrong — an architectural error,
not a functional one. Note the crate was ALREADY structural-only (never emitted
DEFINE EVENT … WHEN … THEN), so this is not "remove a smuggled behavioral arm";
it retires the AST-delegation SoC pattern. The DO arm can never use SurrealQL;
behavior is ActionDef, compile-time. (Downstream consequences that also hold but
are NOT the root: no runtime (de)serialization; compile-time only; ADR-022/023.)

Replacement (already shipped, compile-time): behavior ->
ogar-render-askama::render_class_with_methods (Rust methods that ARE the
ActionDef DO-arm); spine -> the compiled ClassView in the lance-graph<->OGAR
V3 substrate.

Code (additive, no deletion — 22 adapter tests stay green):
- #[deprecated] on emit_surrealql_ddl, parse_surrealql_ddl, ParseError, each
  noting the SoC reason + the replacement + DISCOVERY-MAP D-SURREALQL-DEPRECATED.
- crate-level #![allow(deprecated)]: silences only THIS crate's internal use;
  external callers still warned.
- ogar-knowable-from (the ONLY external caller, default-off surrealql-hint):
  #[allow(deprecated)] + downstream-deprecated comment.
- Cargo description flagged DEPRECATED.

Canon (append-only; regrade in place):
- DISCOVERY-MAP: D-SURREALQL + D-HINT regraded G->DEPRECATED; new dated
  D-SURREALQL-DEPRECATED entry recording the SoC ruling + replacement map.
- SURREAL-AST-AS-ADAPTER §7: dated correction superseding the 2026-06-04
  "No deprecation" line (orthogonal to that doc's behavior-out-of-DDL carving;
  the new ground is the AST-delegation SoC error). ogar-vocab
  Class/ActionDef/ActionInvocation UNAFFECTED.
- INTEGRATION-MAP: emit/parse rows regraded DEPRECATED; Track O2's
  "DEFINE EVENT->ActionDef" retired.

Verified: cargo clippy -p ogar-adapter-surrealql --all-targets -- -D warnings
(exit 0); -p ogar-knowable-from --features surrealql-hint --all-targets
-- -D warnings (exit 0); adapter tests 22/22; fmt clean.

Generated by Claude Code.
@AdaWorldAPI
AdaWorldAPI force-pushed the claude/deprecate-surrealql-compile-time-only branch from 3ffe5f9 to e169bd4 Compare July 22, 2026 01:53
@AdaWorldAPI AdaWorldAPI changed the title Deprecate ogar-adapter-surrealql (compile-time-only ruling); point to V3 replacement Deprecate ogar-adapter-surrealql — a separation-of-concerns error; point to V3 replacement Jul 22, 2026
@AdaWorldAPI
AdaWorldAPI merged commit b3ea8ea into main Jul 22, 2026
1 check passed
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