Skip to content

chore(ontology): step 6 — gates - #605

Merged
zaebee merged 5 commits into
mainfrom
feat/language-packs-step6
Oct 14, 2026
Merged

zaebee merged 5 commits into
mainfrom
feat/language-packs-step6

Conversation

@zaebee

@zaebee zaebee commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Step 6 of the language-packs migration (spec docs/specs/2026-10-14-language-packs-design.md "Drift gates", plan docs/plans/2026-10-14-language-packs-step6.md, part of #146). Config and tests only — no src/ change, so no graph can change.

What changes

  • This repository's project_level binding is retired (patterns.yaml, tolerances.lock, its observe-only test). The enforced topology gate is the forbidden-edge test in test_architecture.py with exact shrinking allowlists — after steps 1–5, surface-packs, engine-packs and resolver-storage are all empty. project_level stays a supported feature for other repositories (CLI, MCP cgis_drift → quotient: [], guardian all handle an empty binding list; their own-YAML tests are unchanged and green).
  • extraction becomes one domain per pack, languages.python and languages.typescript, both layered_dag at one shared tolerance 0.42, plus a core domain. A new test makes every registered pack (cgis.languages.MANIFESTS) declare languages.<name> at that tolerance and pattern — a Go pack arriving without one fails the suite and is named (mutation-checked).
  • The plane-quotient report (observe-only) owns its binding (QUOTIENT_PREFIX) and now fails if a plane node has no edge.

Measurements (main ca32430, fresh ingest of src/; reviewer re-measured, identical)

domain layered_dag best fit unresolved tolerance / hygiene
languages.python 0.393 funnel 0.328 0.356 0.42 / 0.37
languages.typescript 0.184 layered_dag 0.295 0.42 / 0.31
core 0.215 layered_dag (pure_utility 0.554) 0.191 0.25 / 0.21

languages.python and core start in the warning band — the headroom chosen below.

Rulings (G1, G2 decided at plan review)

  • G1 core is layered_dag, not the spec's pure_utility: since steps 1–4 it holds the layered pack contract (0.215 vs 0.554).
  • G2 the packs share layered_dag at 0.42 — the loosest pack plus headroom — so a new pack faces the same bar.
  • G3 the plane report builds its own binding; read plane unchanged (0.676).
  • G4 dotted domain names (languages.python) work throughout (quotient ids, CLI, MCP, guardian) — no fallback needed.

Correction from the final review

An earlier commit on this branch (4a7100b) reported the build plane improving 0.236 → 0.016. That was an artifact: the registry cgis.languages belongs to no drift domain, every build-plane edge into the languages area targets it, and the two pack nodes sat isolated. Fixed in f2a53a5: the report adds the registry as a plane-local node and fails on isolated plane nodes. The build plane reads 0.351 against orchestrator (main 0.236, with extraction as one node) — pipeline and resolver reach the packs only through the registry. Observe-only; the spec note says so.

Deferred

  • The registry module is unbound for per-domain drift, and coverage's ancestor rule reports it as covered — a drift-coverage follow-up.

Closes the design work of #146 in prose only — I will close #146 by hand after merge with a summary of steps 0–6 (step 7, the Go pilot, does not block it).

Gate: format, lint, mypy strict, 3232 passed, docstring 99%.

🤖 Generated with Claude Code

zaebee and others added 5 commits October 14, 2026 20:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The observe-only `cgis-project` binding (pipeline_stage, never enforced) is
replaced by what the language-packs migration built: the forbidden-edge gate
with exact shrinking allowlists (test_architecture.py) as the enforced topology
check, and the build/read plane quotients printed observe-only. The plane report
now owns its binding (QUOTIENT_PREFIX) instead of borrowing the deleted one —
same numbers (build 0.236, read 0.676). `project_level` stays a supported
feature for other repositories; only this one stops using it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`extraction` (one domain over every pack) becomes languages.python and
languages.typescript, both layered_dag at one shared tolerance, and core gets a
domain. All three are new domains, set at their measurement plus headroom
(main ca32430, fresh ingest of src/):

| domain               | layered_dag | best fit            | unresolved |
| languages.python     | 0.393       | funnel 0.328        | 0.356      |
| languages.typescript | 0.184       | layered_dag         | 0.295      |
| core                 | 0.215       | layered_dag (pure_utility 0.554) | 0.191 |

Rulings (user-decided at plan review): G1 core is layered_dag 0.25, not the
spec's pure_utility — since steps 1-4 the pack contract in core is layered.
G2 the packs share 0.42, the loosest pack plus headroom, so a new pack faces
the same bar; tests/unit/test_patterns_yaml.py fails for a registered pack with
no domain or a different tolerance (both mutation-checked). The build plane's
quotient now lists the packs: drift 0.236 -> 0.016, the pipeline-centred star.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… fail

Step 6's build-plane report read 0.016 against orchestrator — not an
improvement but an artifact: `cgis.languages` (the registry) belongs to no
drift domain, every build-plane edge into the languages area targets it, and
the two pack nodes sat isolated in the quotient (final review, Important). The
report now adds the registry as a plane-local node (longest-prefix match keeps
the packs to their own domains) and fails when any plane node has no edge —
the check that would have caught it. The build plane reads 0.351 (main 0.236,
when `extraction` was one node): pipeline and resolver reach the packs only
through the registry. Spec note corrected. Also pins core's layered_dag
(ruling G1) in test_core_has_a_domain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements Step 6 of the Language Packs migration by retiring the observe-only 'project_level' quotient binding and introducing individual drift domains for each language pack ('languages.python', 'languages.typescript') and 'core'. It also updates the self-parsing tests to report plane quotients independently and adds test coverage to ensure all registered packs declare their domains at a shared tolerance. The review feedback highlights two type-safety issues: the 'DomainConfig' instantiation for 'languages' in 'test_drift.py' is missing required arguments ('profile' and 'drift_tolerance'), and a potential 'None' subscripting error in 'test_patterns_yaml.py' that would fail strict type-checking.

Comment thread tests/self_parsing/test_drift.py
Comment thread tests/unit/test_patterns_yaml.py
@sonarqubecloud

Copy link
Copy Markdown

@zaebee
zaebee merged commit 7290e21 into main Oct 14, 2026
4 checks passed
@zaebee
zaebee deleted the feat/language-packs-step6 branch October 14, 2026 21:23
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.

decision(quotient): rebind project_level after burn-in — pipeline_stage vs orchestrator

1 participant