fix(ogar-vocab): codex P2 — plural table aliases for wiki_pages + custom_fields#67
Merged
Merged
Conversation
… custom_fields
Codex flagged that ogar_codebook('wiki_pages') returned None because the
exact-match layer omitted the plural snake_case form, and the lexical
fallback runs only after, returning 'wiki_page' without re-entering the
codebook lookup. Same defect on 'custom_fields'.
Other project-mgmt promotions on #66 already accept plural Rails-table
forms (members, journals, repositories, versions, queries, attachments,
comments) — only project_wiki_page and project_custom_field were missed.
- Add 'wikipages' / 'wiki_pages' (+ PascalCase 'WikiPages' via lowercase)
to the project_wiki_page promoted arm.
- Add 'customfields' / 'custom_fields' to the project_custom_field arm.
- Regression test plural_table_aliases_resolve_to_promoted_codebook_id
pins six tableized variants -> codebook id, locking the contract for
the rest.
ogar-vocab 39 (+1), all real-corpus pass; clippy clean.
AdaWorldAPI
pushed a commit
that referenced
this pull request
Jun 19, 2026
Codex flagged that ogar_codebook('issue_relations') returned None: the
promoted arm only matched the singular 'issue_relation', so the Rails-
tableized plural fell through to lexical, which drops the trailing s and
returns 'issue_relation' — the singular curator alias, NOT a canonical
concept name. canonical_concept_id then misses on the curator alias.
Same defect class as #67 (wiki_pages, custom_fields). Fix is the same:
add the plural snake_case + lowercase-PascalCase forms to the promoted
arm so they short-circuit before lexical:
'issuerelations' | 'issue_relations'
The plural_table_aliases_resolve_to_promoted_codebook_id test gains 3
entries pinning the contract: issue_relations / issuerelations /
IssueRelations all map to project_relation codebook id.
ogar-vocab 41, clippy clean.
(Note: same defect exists on 4 other compound concepts —
time_entries / issue_statuses / issue_priorities / memberships —
fixed in a follow-up PR off main since they touch already-merged
canonical classes.)
AdaWorldAPI
pushed a commit
that referenced
this pull request
Jun 19, 2026
Audit of compound-name promoted concepts revealed 4 more cases of the plural-table-alias defect codex flagged on PR #66 (wiki_pages, custom_fields, #67) and PR #68 (issue_relations, fixed on #68's branch): TimeEntry Rails table 'time_entries' lex 'time_entrie' BUG IssueStatus Rails table 'issue_statuses' lex 'issue_statuse' BUG IssuePriority Rails table 'issue_priorities' lex 'issue_prioritie' BUG Membership plural 'memberships' lex 'membership' BUG All four cases: ogar_codebook(plural_form) returned None because the single-s lexical fallback drops to a non-canonical string (Rails uses irregular pluralization — ies→y, s→ses — that single-char drop doesn't reverse). The promoted-arm only ran once on the full input, before lex, so the lex'd string never got re-matched. Fix: add the plural snake_case + lowercase-PascalCase forms to each arm: billable_work_entry: + 'timeentries' | 'time_entries' project_status: + 'issuestatuses' | 'issue_statuses' priority: + 'issuepriorities' | 'issue_priorities' project_membership: + 'membership' | 'memberships' Extended plural_table_aliases_resolve_to_promoted_codebook_id with 11 new entries (3 per concept where applicable) pinning each tableized variant -> codebook id. ogar-vocab 41 (test row count unchanged; entries inside extended); clippy clean; all 10 real-corpus tests still pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex P2 on merged #66 — plural table aliases
Codex flagged that
ogar_codebook("wiki_pages")returnedNonebecause the exact-match arm omitted the plural snake_case form. Same defect oncustom_fields. Other project-mgmt promotions on #66 already accept plural Rails-table forms (members,journals,repositories,versions,queries,attachments,comments) — onlyproject_wiki_pageandproject_custom_fieldwere missed.Fix
"wikipage" | "wiki_page" | "wikipages" | "wiki_pages" | "project_wiki_page" | "projectwikipage"→project_wiki_page"customfield" | "custom_field" | "customfields" | "custom_fields" | "project_custom_field" | "projectcustomfield"→project_custom_fieldRegression test
plural_table_aliases_resolve_to_promoted_codebook_idpins 6 tableized variants → codebook id (wiki_pages,WikiPages,wikipages,custom_fields,CustomFields,customfields). Locks the contract so future promotions don't drift.ogar-vocab39 (+1) · clippy clean.🤖 Generated with Claude Code