Skip to content

feat(deed): conformance lane — grammar-faithful validator + spec-driven translator (campaign #837) - #849

Merged
hyperpolymath merged 1 commit into
mainfrom
feat/837-conformance-lane
Sep 17, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
feat/837-conformance-lane

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

The campaign's tooling half arrives alongside the merged spec half (#840–#848). One property defines the lane: nothing invalid ever lands — emission is gated by validation, and CI gates the repo.

deed_lint.py — the validator

Stdlib-only, written against spec/abnf/deed.anbf v1.0.0 (current until the canonical-file ruling):

  • SPDX header required; exactly one form; full input consumed (trailing content is an error)
  • head=estate-deed|repo-deed|estate-atlas-deed|praxis-deed; :schema-version STRING exactly once
  • filename↔head dispatch with the exact-stem-first side condition (estate_chora.deed can never parse as repo-deed; dots in stems preserved — final-suffix split only)
  • booleans ONLY #t/#f; bare true/false/yes/no rejected as values (they lex as symbols — the grammar's note is enforced here as a value-level semantic)
  • #u5"name" literals (body is the RFC 4122 §4.3 NAME input)
  • strings: exactly 4 escapes (\" \\ \n \t); \r/\uXXXX parse errors; raw control bytes rejected
  • separators SP/line-end/comment only — tabs invalid (K9-consistent); bare CR rejected
  • 14-case embedded corpus (--self-test) mirrored to fixtures/valid|invalid + one REAL translated deed (rsr-template-repo_chora.deed)

It has already caught two real things: my own mapping spec's :present true/#u5"<hex>" errors (fixed in #841 before merge) and a validator-side guard bug (empty clauses rejected against grammar).

a2ml_to_deed.py — the translator

Implements the specs in 1-formats/deed/mappings/ — and ONLY those. It cannot invent mappings:

Modes: full (six instance files → one deed), per-family (clade|agentic|neurosym|playbook, meta/ecosystem merge via full), state-scan (family-3 classification report — the ruling's paperwork, no translation), scorecard-scan (family-5 census + absolute-path leak TSV).

Findings delivered, not silently fixed

CI

deed-conformance.yml: self-test → fixtures → lint every committed *.deed, triggered on grammar/tools/deed changes. checkout pinned by SHA, persist-credentials: false.

Refs #837; does not close it (campaign still open: conversion wave, remaining rulings).

…en translator (campaign #837)

tools/deed_lint.py: stdlib-only validator for deed.anbf v1.0.0 — header,
single form with full-consumption, head whitelist, :schema-version
exactly once, #t/#f only, #u5 name bodies, four-escape strings,
SP/line-end/comment separators only (tabs invalid), estate-first
filename dispatch with stem side conditions. Embedded 14-case corpus +
fixtures/valid+invalid dirs, --self-test and --fixtures modes.

tools/a2ml_to_deed.py: implements the mappings in 1-formats/deed/
mappings/ and ONLY those (P-2a table-closed fail on untabled fields).
P-1 uuid re-derive-and-compare, refuse-to-emit without --beholding-chora,
booleans → #t/#f, enums → symbols against closed sets, SPDX passthrough,
and a lint post-condition: an invalid deed cannot be written. Modes:
full/clade/agentic/neurosym/playbook translation, state-scan (family-3
ruling paperwork classifier), scorecard-scan (family-5 census + leak TSV).

Reference: full six-instance translation of rsr-template-repo passes the
lane end-to-end (uuid oracle: uuid5(URL, github.com/hyperpolymath/
rsr-template-repo) == a5ea1382-…, verified). Live estate recon extended
the tables exactly as designed via PRs #846/#847/#848.

CI: deed-conformance.yml gates self-test → fixtures → every committed
*.deed on pushes/PRs touching the grammar, tools, or deeds.

Refs #837
@coderabbitai

coderabbitai Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 19 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3027f4d7-1123-4f0c-b907-e82d0937ca02

📥 Commits

Reviewing files that changed from the base of the PR and between 408d3a6 and 95759ec.

📒 Files selected for processing (19)
  • .github/workflows/deed-conformance.yml
  • 1-formats/deed/tools/README.adoc
  • 1-formats/deed/tools/a2ml_to_deed.py
  • 1-formats/deed/tools/deed_lint.py
  • 1-formats/deed/tools/fixtures/invalid/inequals_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/inescape-u_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/inhead_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/inmissing-schema_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/inno-header_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/insection_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/intab_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/intrailing_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/intrue-literal_chora.deed
  • 1-formats/deed/tools/fixtures/invalid/inunbalanced_chora.deed
  • 1-formats/deed/tools/fixtures/valid/booleans-uuid_chora.deed
  • 1-formats/deed/tools/fixtures/valid/minimal_chora.deed
  • 1-formats/deed/tools/fixtures/valid/nested_chora.deed
  • 1-formats/deed/tools/fixtures/valid/quoted-list-symbols-007_chora.deed
  • 1-formats/deed/tools/fixtures/valid/rsr-template-repo_chora.deed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@@ -0,0 +1,551 @@
#!/usr/bin/env python3
@@ -0,0 +1,437 @@
#!/usr/bin/env python3
@hyperpolymath
hyperpolymath merged commit 6054f0f into main Sep 17, 2026
24 of 32 checks passed
@hyperpolymath
hyperpolymath deleted the feat/837-conformance-lane branch September 17, 2026 22:58
hyperpolymath added a commit that referenced this pull request Sep 19, 2026
…l.sh + catalog truth (R-H3) (#854)

**Completes your own R-H3 ruling: the A2ML retirement, minus the
corpse.**

Your hook comments (2026-09-15, R-H3) already removed the A2ML manifests
gate from `pre-commit`/`pre-push` and documented exactly why: A2ML no
longer exists as a format; `validate-a2ml.sh` greps manifest syntax the
live s-expression `.deed` grammar doesn't have; it passed **0 of 222**
tracked files, blocking every commit through the hook; repairing the
regex would turn all 222 red at once. R-H2 says a grammar-faithful
validator returns once wired — and the live implementations exist
(dual-accept `deed-ecosystem/validate-action`, pushed today; the #849
conformance-lane validator).

What was left behind:
- **`.githooks/validate-a2ml.sh` — deleted.** Unwired dead code since
R-H3 (verified: no reference in `install.sh`, `uninstall.sh`, `hooks/`,
`setup.sh`, `Justfile`).
- **`CICD-WORKFLOW-CATALOG.md` lines 179–180** still advertised "A2ML/K9
validation" / "full validation: A2ML, K9, …" — corrected to the
post-R-H3 reality with the ruling referenced.

Deliberately untouched: prose mentions in
`.machine_readable/scorecards/*.a2ml` and `1-formats/deed/README.adoc`
("Fact 1 — the only runnable gate cannot read a deed") — those are
historical record of *why* R-H3 happened, not live plumbing. The 223
`.a2ml` data files remain under the #64 extension-migration campaign
(validator scans both extensions until it completes). Companion PR in
rsr-template-repo replaces its pinned pre-commit provider
(`hyperpolymath/a2ml-pre-commit` — now deleted upstream, so the config
is broken plumbing) with a local dual-accept hook.

Co-authored-by: hyperpolymath <hyperpolymath@users.noreply.github.com>
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