Skip to content

feat(ogar-from-rails): extract_app — opt-in Rails engine walking (consumes ruff#28)#75

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/ogar-from-rails-extract-app
Jun 19, 2026
Merged

feat(ogar-from-rails): extract_app — opt-in Rails engine walking (consumes ruff#28)#75
AdaWorldAPI merged 1 commit into
mainfrom
claude/ogar-from-rails-extract-app

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Wires AdaWorldAPI/ruff#28's extract_app_with / extract_app into ogar-from-rails, so producers can opt into harvesting the whole Rails application (core app/models plus every mounted engine's app/models).

New API (purely additive):

  • pub fn extract_app_with(path, curator) -> Vec<Class> — whole-app harvest tagged with the curator namespace.
  • pub fn extract_app(path) -> Vec<Class> — defaults to "openproject" curator.

Existing extract / extract_with stay core-only (backward compatible). Engines are opt-in.

Why

OpenProject keeps a large share of its domain in modules/* engines (e.g. TimeEntry lives in modules/costs/app/models). With the old core-only walk, OP's side of the billable_work_entry (0x0103) bridge was empty — Redmine's TimeEntry lifted but OpenProject's didn't, understating the OP↔Redmine convergence.

Tests

  • extract_app_harvests_openproject_modules (env-gated, real corpus):
    • extract_app strictly exceeds core-only extract.
    • The harvested TimeEntry maps onto billable_work_entry/0x0103 and carries source_curator="openproject".
    • Core-only definitively does NOT see modules/costs/TimeEntry (regression guard on the gap).
  • nonexistent_source_tree_yields_empty_vec extended to cover the two new no-panic paths.

Workspace check + test green.

Unblocks

A follow-up regen on AdaWorldAPI/redmine-rs (calling extract_app_with("openproject") instead of extract_with) will populate the OP side of billable_work_entry and flip the cross-fork convergence from 25/26 → 26/26 shared.

Threads through ruff#28's extract_app_with so producers can opt into
walking the core app/models PLUS every mounted engine's app/models
(modules/*, engines/*). OpenProject keeps a large share of its domain
in modules/* engines (TimeEntry lives in modules/costs/app/models),
invisible to the existing core-only extract / extract_with.

New API (additive):
- pub fn extract_app_with(path, curator) — whole-app harvest tagged with
  the curator namespace; cross-root reopen-merge handled by ruff.
- pub fn extract_app(path) — defaults to "openproject" curator.

Existing extract / extract_with stay core-only (backward compatible).

Tests:
- nonexistent_source_tree_yields_empty_vec extended to cover the two new
  no-panic paths.
- extract_app_harvests_openproject_modules (env-gated, real corpus) —
  extract_app strictly exceeds extract; the harvested TimeEntry maps onto
  billable_work_entry/0x0103 and carries source_curator="openproject";
  core-only definitively does NOT see modules/costs/TimeEntry (regression
  guard on the gap).

Closes the modular-engine extraction gap on the producer side, which
unblocks completing the billable_work_entry bridge in redmine-rs (OP's
TimeEntry was previously invisible and the bridge was Redmine-only).
@AdaWorldAPI AdaWorldAPI merged commit b76cebf into main Jun 19, 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