Skip to content

feat(namespaces): stage-two dispositions and a NodeShape-aware guard - #164

Merged
scbrown merged 2 commits into
mainfrom
malcolm/m5s11-stage2-namespaces
Oct 24, 2026
Merged

scbrown merged 2 commits into
mainfrom
malcolm/m5s11-stage2-namespaces

Conversation

@scbrown

@scbrown scbrown commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

What

Stage two of the Intigraph namespace migration (aegis-m5s.1.1). It builds on #163 and leaves stage one's ledger byte-identical.

  • namespaces/intigraph/stage-two.json adds 45 reviewed pairs (hash-pinned like stage one):
    • 37 of the 39 declarations that stage one kept legacy. Each keeps its local name and moves into the pack its already-mapped siblings use: 30 to camayoc/core/ns#, 7 to camayoc/delivery/ns#.
    • 8 NodeShapes that stage one never saw: 2 to delivery, 5 to code-entities, 1 to core. They get owl:sameAs only.
    • 2 stay legacy permanently: closedAt and assignedTo. They describe the deprecated work-item type, so any replacement belongs to the Seeds profile, not Camayoc.
  • Builder guard: sh:NodeShape now counts as a declaration. That gap is why the 8 shapes were missed: code-entities.ttl binds the legacy namespace as bobbin:, and the old guard checked only properties and classes.
  • New stage-two checks:
    • every stage-one retained term gets exactly one disposition;
    • each new IRI keeps the old local name inside a Camayoc pack;
    • no pair collides with stage one;
    • every pair must name a term the sources actually declare, which catches a mapped shape that disappears from source.
  • Manifest: adds stage_two_sha256 and unpublished_pairs (45).
  • ontology/core.ttl: over now reads "the alternatives visible when the decision was made" (naming review). This is a description change only; the IRI is unchanged.

Not in this PR

  • No shape load, pin change, data rewrite or installer change.
  • automatic_load stays false.
  • The stage-two terms are published: false. Their namespaces already resolve through the registered w3id rule, but the published documents do not yet carry the 45 new terms, so no release or pin should rely on them until those documents are republished.

Verification

  • Namespace and packaging suites updated: 1254 + 45 pairs, 2 retained.
  • New tests:
    • an unmapped NodeShape refuses;
    • no legacy declaration survives in a stable file except the kept two (with a positive control on the sources);
    • each bad stage-two disposition refuses with its own named reason (renamed, foreign pack, collision, undisposed);
    • a vanished declaration refuses.
  • Sabotage: removing sh:NodeShape from the declaration kinds, or disabling the vanished-declaration, coverage or local-name guard, turns its test red. The file was restored byte-identical after each case.
  • Report controls (tests/test_stable_namespace_reports.py):
    • the real quipu validate --format json runs on the same fixtures twice, legacy shapes over legacy data and the stable pack over remapped data;
    • mapped back, the two reports are identical;
    • the stable report names the new ChangeEventShape IRI, and the code-entities debt shapes stay warnings;
    • sabotage (stable pack without the rename, and debt promoted to Violation) fails both tests.
  • CI: a new required namespace-reports job pins quipu-ai-v0.16.1 (sha256 checked). The existing 0.14.1 CLI has no JSON report. It refuses a run where everything skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_0185RxTpLsPCQFB9ni72Nzac

scbrown and others added 2 commits October 23, 2026 20:20
Stage two of the Intigraph namespace migration (aegis-m5s.1.1), additive to
the frozen stage-one ledger. stage-two.json adds 45 hash-pinned pairs: 37 of
the 39 retained declarations move to camayoc/core or camayoc/delivery with
their local names, and 8 legacy NodeShapes that the stage-one guard could not
see move to delivery, code-entities and core. closedAt and assignedTo stay
legacy permanently; the Seeds profile owns any replacement.

The builder treats sh:NodeShape as a declaration, requires one disposition
for every retained term, keeps each local name inside a Camayoc pack, refuses
stage-one collisions, and refuses a pair whose term no source declares. The
manifest records the stage-two hash and 45 unpublished pairs.

A new required CI job compares real quipu 0.16.1 validation reports for the
legacy and stable packs. Mapped back, the reports are identical, the stable
one names the new shape IRIs, and debt shapes stay warnings.

No load, pin, data rewrite or installer change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185RxTpLsPCQFB9ni72Nzac
The integration job permits zero skips. test_stable_namespace_reports.py
skips without QUIPU_REPORT_BIN, so the job failed its verdict with 2
skipped. Fetch the same pinned quipu-ai-v0.16.1 CLI there too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185RxTpLsPCQFB9ni72Nzac
@scbrown

scbrown commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator Author

Ian — source APPROVE after independent post-green review of all nine paths, exact fb287c53495ecd1f8c162c02ec828d0b511ff896, base 6cff93433e8d5a895a17cef678aa9ead108f291d (aegis-m5s.1.1, review aegis-hbl).

The 45-row pinned stage-two ledger matches the approved 37 declarations + 8 NodeShapes, preserves local names and the two retained lifecycle terms, and adds no shape equivalence beyond sameAs. NodeShape/disposition guards, inverse graphs, serialized policy annotations and report warning/source-shape behavior remain covered.

Independent validation: 23 focused namespace/report/package tests passed, plus provided/unset/broken report-CLI controls (actual run / explicit skips rejected by integration / broken promise fails). Both HOME guards clean. Fresh exact-head CI: 8/8 completed success. Normal T3 classification 1c6c32a5; native review 3b859009 accepted, reviewer Ian.

Source only: bundle remains automatic_load:false, with all 45 additions unpublished. Actual term publication precedes any release/pin reliance; no profile/alias load, runtime migration, release or deployment is accepted by this review. Tim owns normal landing and exact-main watch.

@scbrown
scbrown merged commit 3e55363 into main Oct 24, 2026
8 checks passed
@scbrown
scbrown deleted the malcolm/m5s11-stage2-namespaces branch October 24, 2026 00:44
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.

1 participant