Repository navigation
refactor(pipeline): step 5 — build-plane passes - #602
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ves into it src/cgis/pipeline.py -> src/cgis/pipeline/__init__.py (the module stays cgis.pipeline, so no importer changes; ruling P1) and resolver/uplift.py -> pipeline/uplift.py. Uplift was the resolver's only reader and writer of the store: the resolver-storage allowlist is empty (spec acceptance). A new test pins the post-write order — refresh_dispatch, then uplift — mutation-checked. Measured on a fresh ingest of src/: pipeline drift 0.072 -> 0.106, unresolved 0.402 -> 0.398 (lock 0.25/0.43); resolution drift 0.180 -> 0.179, unresolved 0.440 -> 0.452. The latter is a denominator effect — uplift moved unchanged (28 unresolved of 70 calls, 0.40, under the domain's 0.44), leaving 108/239 with no unresolved edge added — so resolution's hygiene baseline is re-baselined 0.45 -> 0.46 (user decision; reasoning in patterns.yaml). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… move The documented self-ingest (`cgis ingest ./src --domains docs/ontology/domains.yaml`) left the `cgis.pipeline` FILE node untagged — "*pipeline.py" no longer matches pipeline/__init__.py, and "*pipeline.*" never matched the bare id — and tagged every uplift node Pipeline *and* SemanticEngine, minting a SemanticEngine -> Pipeline domain edge (final review, Important). Pipeline now matches "*pipeline/*" and the bare `*pipeline` id, and owns the post-write passes; SemanticEngine drops its uplift patterns. Against main the only tag change is uplift: SemanticEngine -> Pipeline; the only domain edge change is SemanticEngine -> StorageLayer disappearing, which is true — the resolver no longer touches storage. Pinned by test_domains_ontology.py (RED before). ONTOLOGY.md's live rule points at pipeline/uplift.py (minor). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request implements Step 5 of the Language Packs plan, refactoring the cgis.pipeline module into a package (cgis/pipeline/) and moving the semantic uplift module (uplift.py) from cgis/resolver/ to cgis/pipeline/. This change successfully decouples the resolver from storage operations, emptying the resolver-storage forbidden-edges allowlist. The PR also updates relevant documentation, domain configurations, and tests, including a new test to verify the order of post-write passes and a test suite for domain ontology tagging. No review comments were provided for this pull request.
|



Step 5 of the language-packs migration (spec
docs/specs/2026-10-14-language-packs-design.md"Build plane", plandocs/plans/2026-10-14-language-packs-step5.md, part of #146). The post-write passes live in the pipeline; the resolver no longer touches storage. No graph changes.What moved
src/cgis/pipeline.pysrc/cgis/pipeline/__init__.py— module stayscgis.pipeline, so all 32 importers are unchanged (no re-export; ruling P1)src/cgis/resolver/uplift.pysrc/cgis/pipeline/uplift.py— 100% renamerefresh_dispatchwas already the pipeline's; its pure halfdispatch_edges(methods, inheritance)stays in the resolver (P2). Theresolver-storageallowlist is empty (spec acceptance): nocgis.resolvermodule importscgis.storage,TYPE_CHECKINGincluded.Identity
graph_identity.py diff, main 261cee3 vs this branch: cgissrc/@715cd9a identical (2019 / 7858), owner-api @8de2245 identical (19115 / 96258),ui/identical (286 / 497).--domainsand dumped every node and edge column (domains,ontology_class, metadata, DOMAIN_DEPENDS_ON): identical. Wheel and sdist contain the new package.Self-graph ontology (fixed after review)
docs/ontology/domains.yamlstill described the old layout: on the documented self-ingest thecgis.pipelineFILE node lost its domain, and every uplift node was tagged Pipeline and SemanticEngine (a false SemanticEngine → Pipeline domain edge). Pipeline now matches the package and owns the post-write passes; SemanticEngine drops its uplift patterns. Against main the only change is uplift's tag (SemanticEngine → Pipeline) and the SemanticEngine → StorageLayer domain edge disappearing — which is now true. Pinned bytests/self_parsing/test_domains_ontology.py.Measurements and one re-baseline
pipelinedrift 0.072 → 0.106, unresolved 0.402 → 0.398 (lock 0.25 / 0.43).resolutiondrift 0.180 → 0.179, unresolved 0.440 → 0.452: uplift moved unchanged (28 unresolved of 70 calls, 0.40) out of a domain at 0.44, leaving 108/239 with no unresolved edge added. The plan stopped there; by decision the hygiene baseline went 0.45 → 0.46, with the arithmetic inpatterns.yaml(the reviewer recounted it exactly). Nothing else was loosened.Left for a follow-up (ruling P3)
Language knowledge still in
cgis.resolver's text — the Python__init__root rule instrip_layout_prefixes, the JS-builtins root inclassify_fqn's generic tail,_is_dunderin DISPATCHES, and the language-named project state threaded throughIndexBuilder.build. Removing them changes behaviour, so it should be its own measured change.Deferred minors
test_cli::test_ingest_full_db_with_domains_runs_uplift.HOW_IT_WORKS.md/pipeline_flow.mermaidand the demoui/public/graph.jsonstill name the old paths; they regenerate.Gate: format, lint, mypy strict, 3231 passed, docstring 99%.
🤖 Generated with Claude Code