Bylaws: Codex structural review (2026-09-25)
Recorded by the orchestrator from Codex's final message (its sandbox is read-only). Verdict: FAIL.
The references are clean: 54 rules, 43 clauses and 23 cases, with no duplicates, no orphans and every id resolving. Six clauses are never asserted by a test: CL-FISCAL-YEAR, CL-AGM, CL-VOTING-MEMBERS, CL-BOARD-MEETINGS, CL-OFFICERS and CL-EFFECTIVE.
| id | sev | location | problem | fix |
|---|---|---|---|---|
| F1 | low | tests | The 6 clauses above have no clause-level assertions | Add tests for each clause and each rendered branch |
| F2 | medium | BL-TC-01..11, input model | Selectors are omitted and there are no global defaults, so the exact clause set can't be determined | Define canonical defaults for every selector, or have each test supply all selectors |
| F3 | high | CL-ART-DISSOLUTION-QD / BL-TC-02 | The clause is statically kind: mandatory, but the test wants it offered and not labelled mandatory | Split into mandatory and recommended variants, or make kind dynamic |
| F4 | high | CL-AGM / BL-TC-04 | CL-AGM always prints "public accountant", but Ontario forbids that language | Make the AGM text jurisdiction-specific |
| F5 | high | CL-ARTICLES-CROSSREF / BL-TC-06 | US output gets Canadian special-resolution and articles-of-amendment wording | Add a text_US variant |
| F6 | high | CL-MEMBER-CONDITIONS / BL-TC-08, 21 | Requires ≥1 condition and an admitting_body, which the tests don't supply | Supply them in the tests or add validated defaults |
| F7 | medium | BL-TC-22 | dissolution_choice is not a defined input | Add the field and its validation, or rewrite the test |
| F8 | high | BL-TC-23 vs CL-BOARD-NUMBER / CA-FED-06 | The invariant forbids a director range in the by-law, but the mandatory clause prints it | Decide whether the repetition is allowed, then fix the invariant or the clause |
| F9 | high | CL-MEMBER-CONDITIONS / BL-TC-11 | The covenant refers to a Schedule B that doesn't exist; Schedule A can be referenced without its clause | Add a Schedule B clause and cross-field validation |
| F10 | medium | CL-NOTICE-CA-FED | The notice method both has no template branch or validation | Define its rendering and a combined validation |
| F11 | medium | CL-MEMBER-CONDITIONS | Profession of faith is always emitted, although it is presented as selectable | Make it conditional, or document it as mandatory |
| F12 | high | CL-AMEND-MEMBERS-ONLY + CL-EFFECTIVE / BL-TC-09 | The members-only document contradicts the Board-passage effective clause | Give CL-EFFECTIVE authority-specific variants |
| F13 | high | CL-BOARD-TERM + CL-BOARD-EMPLOYEE-CAP-ON / CA-ON-05 | An ex-officio voting pastor contradicts "directors are elected by members" | Add an ex-officio exception and explain how its term ends |
| F14 | medium | CL-VOTING-MEMBERS | absentee_voting defaults to "none" but is used as a truthy value, so it can print "vote by none" | Use an explicit condition and an enum-to-prose map |
| F15 | medium | CL-BOARD-TERM / BL-TC-19(c) | There is no minimum term, so 0 years isn't rejected | Add director_term_years >= 1 |
| F16 | medium | amendment_threshold | The input model, the enum and the tests disagree | Use one numeric representation with a 2/3 minimum |
| F17 | high | CL-INTERP, CL-MEMBER-CLASSES-BYLAW, CL-AUDIT-US, CL-DISCLAIMER | state, admitting_body, us_review_level_phrase and date are used but not declared | Declare them and add a pre-render completeness check |
| F18 | high | purpose, statement-of-faith, denominational and property-trust clauses | Free text has no non-blank requirement and no escaping contract | Require the text where applicable and escape it (the engine's renderTemplate escapes variables and throws on missing ones) |
| F19 | medium | CL-PASTOR-CALL, CL-OFFICERS, CL-AUDIT-US, CL-BOARD-TERM | Raw enum values render badly ("at least simple", "search_committee", "one 3th") | Add display maps and formatter variables |
| F20 | medium | age, inactivity, requisition %, US notice, board notice, consecutive terms, AGM timing | No bounds | Add bounds, or refer to state law |
Numeric values Codex confirmed are consistent: ON directors ≥3; FED soliciting ≥3 with ≥2 independent; FED non-soliciting ≥1; ON employee cap ≤ floor(n/3); ON notice 10–50 days; FED mail notice 21–60 and electronic 21–35; quorum 1–100%; discipline response ≥15 days; special resolution ≥2/3; ON director term ≤4 AGMs.