zeromodel

Post-split remediation — Stage 3: zeromodel-navigation finite identified hierarchy

Baseline SHA (start of this stage): c1ce710db50655a6082567fd3f376c3134095ea2 (branch main, working tree clean at start — same preflight check as Stage 2, see post-split-stage-2-trust-validation.md). Final SHA / working-tree state: uncommitted at the time of writing — nothing committed, tagged, published, or pushed in this stage. Objective: compile and traverse a finite, deterministic hierarchy over identified artifacts, explicitly not search — no similarity/relevance definitions, no learned or heuristic routing.

Two hierarchy concepts kept separate

Architecture built

Files

A structural property worth recording

Content-addressed identity makes genuine self-reference or cycles structurally infeasible to construct honestly (a tile’s id is a hash of its own children’s ids, so a cycle would require solving a hash fixed point). The two closure tests for these cases (test_self_referencing_tile_fails_closure, test_cyclic_hierarchy_fails_closure) therefore exercise the defensive guard directly via monkeypatch against a simulated corrupted store, rather than via the real compiler — this is noted in-line in both tests rather than left implicit.

Tests

packages/navigation/tests/ — 21 tests, all passing:

Governance integration

Same wiring as Stage 2 — see post-split-stage-2-trust-validation.md’s governance section; Navigation additionally has its own .github/workflows/navigation-package.yml.

Claims boundary (as documented in packages/navigation/README.md)

Supported: compiling and deterministically traversing a finite, identified hierarchy with complete artifact resolution and a replayable trace. Explicitly not claimed: planet-scale hierarchies, infinite in-memory capacity, logarithmic-time guarantees, semantic search, nearest-neighbour retrieval, “40-hop world navigation,” or storage-independent performance.

Validation run this session

python -m pytest -q packages/navigation/tests       # 21 passed
python -m mypy packages/navigation/src               # Success: no issues found
python -m ruff check packages/navigation/src packages/navigation/tests    # All checks passed
python -m ruff format --check packages/navigation/src packages/navigation/tests  # passed (after one format pass)
python scripts/check_quality.py                       # Quality checks passed (all 9 packages)
python scripts/run_fast_tests.py                      # see combined report below
python scripts/validate_release_candidate.py          # Release candidate validation passed

Explicitly not run without further authorization


Combined governance wiring (Stage 2 + Stage 3)

Both new packages, plus the implicit Stage 1 zeromodel-artifacts, were wired into every governance surface in the same pass:

Full fast-suite result (final run, this session)

Collected: 950, deselected: 82, passed: 867, failed: 0, skipped: 1

Four consecutive runs were taken to check runtime stability after adding 64 new package-local tests:

run runtime
1 (first run after installing 3 new packages/rebuilding wheels) 107.84s
2 87.58s
3 79.88s
4 90.73s

The first run’s elevated time is consistent with cold bytecode-cache/import overhead immediately after installing three new editable packages; the following three consecutive runs give a slowest of 90.73s and a median of 87.58s — both within the acceptance targets Stage A2.1 established (slowest < 100s, median < 90s), against the 120s budget.

Full quality gate result (final run, this session)

python scripts/check_quality.py
...
Quality checks passed

Ruff format, ruff lint, mypy, package boundaries, architecture rules, and code-quality limits (function/module/class size, nesting, parameter count) all pass across all nine packages with zero legacy exceptions added for the three new packages. Two real defects were caught and fixed during this stage’s own quality pass before commit-readiness: three functions (verify_artifact_for_scope, compile_hierarchy, traverse) initially exceeded the 100-line hard function-length limit and were refactored into single-concern helpers (no behavior change — full test suite re-verified green after each refactor); a mypy type mismatch in compute_authorization_id’s internal draft-payload helper was resolved by replacing the ad hoc stand-in dataclass with a shared, explicitly-typed field-based payload builder.

Full release-candidate validation result (final run, this session)

python scripts/validate_release_candidate.py
...
docs/architecture/package-public-api-1.0.13.csv: 258 public symbols across 9 distributions
Release candidate validation passed

This rebuilt all nine wheels, installed them into a clean venv, ran pip check (no broken requirements), and regenerated the public API manifest — required because the manifest is a checked-in CSV snapshot, not something several fast-suite tests regenerate themselves.

Explicitly not run without further authorization (repository-wide)