Skip to content

docs(plan): codex P2 fixup — point W0.2 at the real emitter#89

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/redmine-plan-fixup
Jun 21, 2026
Merged

docs(plan): codex P2 fixup — point W0.2 at the real emitter#89
AdaWorldAPI merged 1 commit into
mainfrom
claude/redmine-plan-fixup

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Codex P2 on #88render_classes_schema doesn't exist in OGAR

The merged plan referenced
op_codegen_projection::render_classes_schema(&ogar_canonical_classes())
as the W0.2 driver. Codex correctly flagged that:

  • op-codegen-projection lives in openproject-nexgen-rs, not OGAR —
    pulling from a sibling port's crate would couple rm-store to OpenProject.
  • ogar_canonical_classes() doesn't exist anywhere.
  • The actual exported emitter in OGAR is
    ogar_adapter_surrealql::emit_surrealql_ddl(&[Class]).

Fix: redirect W0.2 at the real emitter, and call out the OGAR-side
prerequisite — ogar_vocab::all_promoted_classes() (or a sibling
hand-list pinned by a class_ids::ALL-walking test) — so the
foundation phase isn't blocked on missing OGAR API.

🤖 Generated with Claude Code

Codex P2 on PR #88: the original W0.2 referenced
`op_codegen_projection::render_classes_schema(&ogar_canonical_classes())`,
but neither symbol exists. `op-codegen-projection` lives in
openproject-nexgen-rs (the OpenProject port-side bridge from the
triples path), not in OGAR — `rm-store` shouldn't pull from a sibling
port's crate.

Fix: redirect W0.2 to the actual exported OGAR emitter
`ogar_adapter_surrealql::emit_surrealql_ddl(&[Class])` (hand-written
formatter, already round-trip-pinned).

Plus a called-out OGAR prerequisite (~1 day, blocks W0.2): add
`ogar_vocab::all_promoted_classes() -> Vec<Class>` so rm-store has a
single call site to drive the emitter. Sibling alternative spelled
out if the enumerator slips: hand-list the calls in rm-store with a
class_ids::ALL-walking drift test.
@AdaWorldAPI AdaWorldAPI merged commit 84d92c6 into main Jun 21, 2026
1 check passed
AdaWorldAPI added a commit that referenced this pull request Jun 21, 2026
… 32 promoted concepts

Adds `pub fn all_promoted_classes() -> Vec<Class>` to ogar-vocab.
Returns every promoted class fn's output (`project()`,
`project_work_item()`, …, `currency_policy()`) in `class_ids::ALL`
order.

# Why

Drives the W0.2 prerequisite called out in the Redmine Integration
Plan (REDMINE-INTEGRATION-PLAN.md, post-#89 fixup). Before this,
the 32 promoted constructor fns existed but weren't enumerable as
a slice — a consumer wanting to drive all of them at once
(e.g. `ogar_adapter_surrealql::emit_surrealql_ddl(&[Class])` for
a whole-schema DDL emit) had to hand-list 32 calls, drift-prone.

```rust
use ogar_vocab::all_promoted_classes;
use ogar_adapter_surrealql::emit_surrealql_ddl;

let ddl = emit_surrealql_ddl(&all_promoted_classes());
// → SurrealQL DDL for the full 32-concept schema, in codebook
//   (class_ids::ALL) order.
```

# Tests (4)

- `all_promoted_classes_matches_class_ids_all_in_length` — count gate
- `all_promoted_classes_matches_class_ids_all_order` — position-by-position
  pin: each entry's canonical_concept + canonical_id match the same
  position in class_ids::ALL
- `all_promoted_classes_has_no_duplicates` — defensive against
  copy-paste typos in the enumerator
- `all_promoted_classes_every_class_has_canonical_id` — every entry
  must round-trip through canonical_id()

A new codebook promotion that adds to `class_ids::ALL` but forgets a
constructor call here fails the length/order tests immediately.

# Coverage

64/64 ogar-vocab unit tests pass.
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.

1 participant