Check that the instrument stays internally whole - #2
Open
NetworkTheoryAppliedResearchInstitute wants to merge 1 commit into
Open
NetworkTheoryAppliedResearchInstitute wants to merge 1 commit into
NetworkTheoryAppliedResearchInstitute wants to merge 1 commit into
Conversation
P1-001 carries 104 numbered provisions and 199 internal cross references, all maintained by hand. Nothing about that arrangement is self-checking. Renumber a provision and every reference to it keeps pointing at a number that now means something else, or nothing at all, and the breakage stays invisible until a reader follows one — which, for a governing instrument, is the worst possible moment to discover it. Adds bylaws-conformance-suite.py, which makes that failure loud. Eight checks: the preamble, sixteen articles in order and the appendix; provisions running 1..n inside each article with the groups matching the article count; every section cross reference resolving; every lettered sub-item reference resolving; the header version agreeing with the filename; no personal data beyond the organizational footer; the seven translations present; the prior instruments preserved. Standard library only, no dependencies, in the manner of the JFA suite. Run against the instrument as it stands it reports RESULT: all checks PASS, exit 0 — 104 provisions across 16 articles, 199 references of which 77 are distinct, 11 sub-item references, all resolving. The instrument is clean today, which is the reason to add this now rather than after something breaks. The suite fails as intended on a renumbered provision, a renamed article, a dropped sub-item, a version that disagrees with its filename, and an unexpected email address. Adds the Conformance workflow and .githooks/pre-push alongside it, on the same terms as the Janus repository: no paths filter, because this is meant to become a required status check and a required check that never runs blocks a pull request forever; and the hook is documented as a convenience rather than a gate, since hooks are not distributed with a repository and --no-verify skips them. Adds CONTRIBUTING.md, which this repository never had despite DCO being enforced on every commit. It records the sign-off requirement, what the suite constrains, and — explicitly — what it does not: there is no invariant registry here yet. Binding provisions to the architecture's lines requires deciding which provisions are load bearing, which is a governance judgment rather than a mechanical one. .gitattributes pins the hook, the workflow and the suite to LF. Checked out with CRLF on a Linux runner the hook has a bad interpreter line and will not run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: the Institute <info@ntari.org>
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.
The same three layers now on Janus, adapted to what a governing instrument actually risks — plus a suite, which this repo had none of.
The risk being addressed
P1-001 carries 104 numbered provisions and 199 internal cross references, all maintained by hand. Nothing about that is self-checking. Renumber a provision and every reference to it keeps pointing at a number that now means something else, or nothing at all — and the breakage stays invisible until a reader follows one. For a governing instrument that is the worst possible moment to find out.
It starts green
The instrument is clean today. That is the argument for adding this now rather than after something breaks — it locks in integrity that already exists instead of ratifying drift.
It fails when it should
A suite that cannot fail is worthless, so I tested it against deliberately broken copies:
9.10renumbered to9.999.10(d)reletteredWhat's here
bylaws-conformance-suite.py.github/workflows/conformance.ymlmain.githooks/pre-pushCONTRIBUTING.md.gitattributesSame two deliberate choices as Janus: no
paths:filter, because this is meant to become a required status check and a required check that never runs blocks a PR forever; and the hook is a convenience, not a gate — hooks aren't distributed with a repository and--no-verifyskips them. The PR check is what holds.What it explicitly does not do
It checks that the instrument is internally whole. It does not check that a provision is wise, lawful, or consistent with the architecture — those bind a reader, not a parser.
Specifically, there is no invariant registry yet. The JFA suite's real power is binding prose to registered invariants with stable IDs, so the document and the registry cannot drift apart without a check failing. The equivalent here would bind provisions to the architecture's lines — §9.10(a) to the privacy floor of line 7, §1.4(a) to stewardship of the document. That requires deciding which provisions are load bearing, which is a governance judgment rather than a mechanical one, and is left for a later change.
CONTRIBUTING.mdsays so in as many words so the omission is on the record rather than looking like an oversight.Merge order
The required status check is not in this PR. Adding it now would block #1 (the relicensing PR), which has no workflow in its branch and would wait forever on a check that cannot report.
Merge this → the workflow lands on
main→ then the check becomes required, via a repo-level ruleset rather thanOrg Baseline - Protect main, which is shared across NTARI-RAND.Worth noting
mainhere has norequired_status_checksrule at all today, so a red DCO wouldn't stop a merge either.One note on #1
I deliberately did not add a licensing check.
LICENSEis currently AGPL-3.0 and #1 relicenses the instrument to CC BY-SA 4.0 — a check written now would encode a fact that's about to change. Once #1 lands, a check pinning the specification license is a two-line addition and worth making.