Skip to content

nav plane + concept re-keying: the transcode-doctrine Phase 0/1/3/5 machinery#72

Merged
AdaWorldAPI merged 3 commits into
mainfrom
claude/nav-plane-labyrinth-recon
Jul 10, 2026
Merged

nav plane + concept re-keying: the transcode-doctrine Phase 0/1/3/5 machinery#72
AdaWorldAPI merged 3 commits into
mainfrom
claude/nav-plane-labyrinth-recon

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Three commits landing the language-general transcode-doctrine machinery ("mess → config DTO → proposer placement → residual DTO → next pass"), rebased onto main post-#69/#70/#71 and converged with the parallel UI-navigation plane that landed there (navigates_to / selects_view / invokes_action / renders_as).

Commit 1 — UI-config plane (Phase 0 labyrinth recon, the room map). Main's nav plane carries the Klickweg EDGES; this adds the ROOM MAP a concept re-keying pass navigates by:

  • ruff_spo_triplet: closed vocab 68 → 71surfaces_concept (corpus-owner room→concept config rows, Authoritative: the config IS the claim) / handles_event (Designer += wiring) / contains_control (control-tree containment). NavigatesTo unified with main's (its "pure screen→screen" discipline kept — my method-pattern variant dropped). Count-lock test renamed predicate_count_locked_at_71.
  • ruff_csharp_spo harvester, converged with main's arm: main's EmitNavArm (Show/ShowDialog, field-instantiation SPA idiom, selects_view ribbon, CommonDialog exclusion) kept wholesale; grafted on top: screen classification extended to fixpoint through corpus base chains + optional --room-prefixes, --room-aliases dir→concept binding, and EmitUiConfigArm (event wiring + containment, type-level walk so constructors/Designer partials are covered).

Commit 2 — the re-keying machinery (Phases 1/3/5).

  • concept_split.rs: fixes the CONCEPT = CLASS give-up point (entries_from_actions resolving a God-object class to classid 0 for every row). Tokenizer (underscore + case boundaries, concept_key discipline), ConceptConvention (verbs/scopes/aliases — pure data-as-config, zero domain tokens shipped), split_method_name, rekey_model, ResidualMethod slag rows. Boundary-4: SplitName::concept is concept_key-fixed-point on both branches (alias values folded; tested).
  • surface_schema.rs: getter-over-lookup-table shapes (combo/option/template) classified as SCHEMA, not behavior, before action lifting.
  • structured_names.rs: NameGrammar-driven parsing of positional name-encoded trees (f_2_3 → form 2 / section 3) + part_of_edges.
  • examples/rekey_exam.rs: the corpus-agnostic furnace exam (all convention/codebook/expectation rows arrive as runtime config; no corpus tokens or data committed).

Commit 3 — codex P2 fixes (template-over-option surface precedence: last surface token in name order wins; the qualified-base fix folded into the converged prepass, which uses main's LastSegment).

Exercised end-to-end against a real 103.5k-triple WinForms God-object corpus on the CONVERGED tree: 173 navigates_to + 22 selects_view (main's arm) + 4 551 contains_control + 1 452 handles_event + 191 surfaces_concept (this PR's config plane); all triples load()-validated; furnace exam green — all expected domain concepts re-derived with nonzero classids, 594 methods keyed, 2 154 residuals ledgered, zero silent drops.

Test Plan

  • cargo test -p ruff_spo_triplet -p ruff_csharp_spo133 + 5 passing on the rebased tree (new: tokenizer/split/rekey/residual reasons, alias fixed-point, name-grammar tiers + part_of edges, surface classification incl. last-match precedence, UI-config-arm loader pin, count-lock 71).
  • Harvester built + run with dotnet-sdk-8 against the real corpus post-merge (numbers above).
  • Reviewed pre-push: identifier scrub of doc prose (generic invoice/cipher fixtures only), alias-branch concept_key fold + fixed-point test, both codex P2 threads addressed.

@cursor

cursor Bot commented Jul 9, 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_38cb950a-00aa-42ac-bad7-87882acad52f)

@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: f0adeb8b35

ℹ️ 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 crates/ruff_csharp_spo/harvester/Program.cs Outdated
Comment thread crates/ruff_spo_triplet/src/surface_schema.rs Outdated
AdaWorldAPI pushed a commit that referenced this pull request Jul 10, 2026
…on surface precedence

- Program.cs: screen classification now compares the LAST dotted segment of
  a base type (LastDotSegment), so `System.Windows.Forms.Form` /
  `global::...UserControl` bases and namespace-qualified screen creations
  match the bare screenBases/corpus registry instead of slipping past the
  fixpoint and silently dropping the screen's nav triples.
- surface_schema.rs: when a name carries multiple surface tokens
  (`add_option_widget_template`), the LAST match in name order wins — the
  trailing table-kind token names the actual storage, so
  get/add_option_*_template classify as TemplateSource, never EnumSource.
  All matched surface tokens leave the residue (concept material only).

131 crate tests green; furnace exam re-run unchanged (6 concepts, 2154
residuals).
@cursor

cursor Bot commented Jul 10, 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_16a93d43-e49c-4635-960b-96842b2cd38a)

claude added 3 commits July 10, 2026 06:29
…cates + Roslyn nav arm)

The "ERB/RB split": before a concept re-keying pass can untangle a God-object
DAL, the pipeline needs the labyrinth map — which screens (rooms) exist, how
they navigate, which concept each surfaces. This lands the language-agnostic
NavGraph plane + its first frontend arm (C#/WinForms).

ruff_spo_triplet (closed vocab 64 -> 68, council-reviewed shape):
- navigates_to      (screen -> screen | nav-method IRI)   Inferred
- surfaces_concept  (screen -> concept, config-declared)  Authoritative
- handles_event     (control -> "<Event>:<handler-IRI>")  Authoritative
- contains_control  (parent -> control)                   Authoritative
surfaces_concept's tier is deliberate: the binding is a corpus-owner
config-table row (data-as-config) — the config IS the claim.

ruff_csharp_spo harvester (opt-in --nav, zero change without the flag):
- screen classification to fixpoint (UserControl/Form bases transitively +
  --room-prefixes uc_,mod_,con_), two-pass;
- EmitNavArm walks each screen type: Designer `+=` wiring -> handles_event,
  `Controls.Add` -> contains_control, screen-type object creation +
  nav-pattern dispatch (--nav-method-prefixes/-suffixes, default
  Show_*/*_Show/*_Hide) -> navigates_to;
- --room-aliases dir=concept rows -> surfaces_concept. All convention knobs
  are config, no corpus-specific tokens in code.
- examples/validate_load.rs: generic ndjson-through-load validator.

Verified on a real WinForms corpus (279 files / 167K LOC): 103416 triples,
6239 nav-plane rows (4496 contains_control, 1403 handles_event, 189
surfaces_concept across 93 screens, 151 navigates_to), all accepted by
ruff_csharp_spo::load. Tests: 98/98 + 4/4 (new loads_and_validates_nav_arm_
ndjson pin); count-lock test renamed predicate_count_locked_at_68.
…de-doctrine machinery

Three modules that turn a God-object harvest into re-keyed concepts, with
every unresolved method landing on a slag ledger instead of silently
dropping (doctrine: "mess -> config DTO -> proposer placement -> residual
DTO -> next pass"):

- concept_split.rs (Phase 1): fixes the CONCEPT = CLASS give-up point.
  tokenize_method_name ('_' + case boundaries, concept_key discipline),
  ConceptConvention (verbs / scopes / concept_aliases — pure data-as-config,
  zero domain tokens shipped), split_method_name, rekey_model over
  functions+helpers, ResidualMethod{NoVerbPrefix,EmptyResidue} slag rows.
  Boundary-4: SplitName::concept is concept_key-fixed-point on BOTH branches
  (alias values are folded through concept_key; tested).
- surface_schema.rs (Phase 3): classify_surface — getter-over-lookup-table
  shapes (combo/option/template) are SCHEMA, not behavior; classified before
  action lifting so enum plumbing stops polluting the capability surface.
  SubtabSurface/GridSurface reserved for the coming convention rows.
- structured_names.rs (Phase 5): NameGrammar-driven parse of positional
  name-encoded trees (f_2_3 -> form 2 / section 3) + part_of_edges for the
  FacetCascade forest.
- examples/rekey_exam.rs: the furnace exam — corpus-agnostic, fully
  config-driven (verb/scope/alias/codebook/expect rows at runtime; no corpus
  tokens or data committed). Exercised against a real 103k-triple WinForms
  God-object harvest: all expected concepts re-derived nonzero, 594 methods
  keyed, 2154 residuals ledgered, zero silent drops.
- examples/validate_load.rs: generic ndjson-through-load validator.

131 crate tests green (33 new). Reviewed: P0 doc-identifier scrub, P1
alias-branch fixed-point fold + test, P2 doc/reserved notes applied.
…on surface precedence

- Program.cs: screen classification now compares the LAST dotted segment of
  a base type (LastDotSegment), so `System.Windows.Forms.Form` /
  `global::...UserControl` bases and namespace-qualified screen creations
  match the bare screenBases/corpus registry instead of slipping past the
  fixpoint and silently dropping the screen's nav triples.
- surface_schema.rs: when a name carries multiple surface tokens
  (`add_option_widget_template`), the LAST match in name order wins — the
  trailing table-kind token names the actual storage, so
  get/add_option_*_template classify as TemplateSource, never EnumSource.
  All matched surface tokens leave the residue (concept material only).

131 crate tests green; furnace exam re-run unchanged (6 concepts, 2154
residuals).
@AdaWorldAPI AdaWorldAPI force-pushed the claude/nav-plane-labyrinth-recon branch from d6684bd to 68c976a Compare July 10, 2026 06:32
@cursor

cursor Bot commented Jul 10, 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_ec00975c-d322-42b3-85b5-39121b6a2e14)

@AdaWorldAPI AdaWorldAPI merged commit 1fa73b9 into main Jul 10, 2026
1 check passed
AdaWorldAPI pushed a commit that referenced this pull request Jul 10, 2026
AdaWorldAPI pushed a commit that referenced this pull request Jul 10, 2026
…on (gap b)

Closes the routes.rb stratum (E-CLICKWEG-CHOREOGRAPHY-1 gap b): an
AST-walk (lib-ruby-parser) over config/routes.rb + modules/*/config/
routes.rb that resolves a route-helper stem (+ verb) to its
controller#action, making the InvokesAction/NavigatesTo join resolvable
for the first time. Two additive predicates RoutesTo (stem ->
verb:controller#action) + RouteScope (member/collection/canonical/
standalone), both Authoritative; predicate count-lock 71 -> 73.

Faithful Rails semantics per the council-hardened v3 spec
(openproject-nexgen-rs .claude/ruff-expansions/2026-07-10-routes-arm-spec.md):
canonical-seven with collection_token/member_token (news -> news_index
when singular==plural), singleton-collection-singular, absolute
/-controller strip, controller:-kwarg ranking, module:-scope-wrap,
naked-verb-in-resources nesting, string-path auto-naming, as:"",
decl-order first-wins + duplicate_stem_conflicts, multi-name replay,
escaped_dynamic for non-literal args, only/except coercion, shallow
member-drop. 19 unit fixtures + an env-gated (RAILS_CORPUS_SRC) drift
fuse pinned to the measured corpus: 29 files, 1625 declared, 1534
emitted, escaped {mounts=9 via_all=6 dynamic=13}, escaped_other exactly
["use_doorkeeper"].

Central-review fixes over the first implementation (gated in the shared
target, verified on the real corpus):
- namespace-path controller fallback: a bare verb with explicit action
  in a namespace (get "plugin/:id", action: :show_plugin in
  namespace :admin;:settings) resolves to admin/settings#show_plugin
  (the real Admin::SettingsController) instead of leaking the verb name
  into escaped_other. escaped_other is now exactly the Doorkeeper macro.
- escaped_dynamic pinned to the measured 13 (not the grep-estimated 2):
  the walker counts every conservatively-declined declaration, all
  counted, none silently dropped.
- as: value used verbatim for the collection name (Rails guide:
  resources :foos, as: :bar -> bar, not bars) — test corrected.
- 3-level nesting spot-check uses new_project_meeting_agenda_item_outcome
  (the except: %i[index show] filter removes the show helper) — the
  walker correctly respects except:.

Edit allowlist honored: routes.rs (new) + lib.rs (register) + schema.rs
(pub(crate) singularize) + triple.rs (2 variants). Base ruff main #72 +
W3. Pre-existing #72-file fmt/pedantic warnings left untouched (out of
scope).
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