Orchestrata Ultimate › Plans › tooling-wiring

Tooling wiring plan — every automation asset installed + wired (2026-08-02)

Source: plans/tooling-wiring.md at 8a2cb42ad · last changed 2026-08-02 · first committed 2026-08-02 · 90 lines.

Prose pending.

Plan text

Tooling wiring plan — every automation asset installed + wired (2026-08-02)

User command: "install and wire every single tool ... any existing tool that will benefit must be installed now." This plan records the audit verdict per tool and the wiring action taken. Scope is DEV TOOLING ONLY — governance-plan phases (handover §8) remain gated on user authorization.

Audit: what was already wired (verified 2026-08-02)

Tool State found Evidence
scripts/affected_tests.py → run_tests.py --affected WIRED run_tests.py:23,188 resolves via affected_tests --json
scripts/observe_pytest.py + live observer WIRED + ENFORCED PreToolUse force-test-observation.sh
Pre-commit suite (ruff/mypy/pyright-ratchet/AST checks/architecture/trace-lint) WIRED .pre-commit-config.yaml
Pre-push test gate (worktree-guarded) WIRED .git/hooks/pre-push
scripts/ast_daemon.py SessionStart auto-start WIRED but daemon DEAD stale pid 10954; log shows uv sync death on tree-sitter-typescript C-ext build (free-threaded ABI); --no-sync fix already in hook, corpse predates it
gen_level0.py / project_status.py (truth reporting) EXIST, artifact-sourced Phase-4 workflow plan
Canvas + UML + SVG export WIRED (this session) arch-canvas v0.2.0, submodule tools/arch-canvas

Gaps closed NOW (this session)

  1. AST daemon revived + self-healing start: stale pid/socket cleaned, daemon started via the existing hook path, health verified over the unix socket. Hook gains stale-artifact cleanup so a dead daemon never blocks respawn.
  2. rts.py installed + hardened to BYTE-COMPLETE capture (handover artifact → scripts/rts.py, user mandate: "AST must capture byte-identical code, all of the code"). TWO defects found and fixed on install (both verified by smoke cases):
    • stem-keyed modules never matched package-qualified call edges → silent unsafe under-selection (test skipped after its function changed);
    • only top-level functions were hashed — methods, classes, nested defs, decorators, imports, constants, module-level statements captured by NOTHING. Now: every def/class at any depth hashed on its exact source segment + a synthetic <module> symbol hashing the residue bytes, with symbol→module and module→import edges. Any single-byte change in any .py file changes at least one hash (proven: method / constant / decorator / whitespace cases all select). Scale: full src/ extract = 55,382 facts in 5.6 s. Standalone CLI; the MERGE into affected_tests.py remains the handover Phase-7 slice.
  3. scripts/doc_lint.py built + wired (pre-commit, warn-first): cross-checks doc claims against ground truth — container IPs/names vs incus list, test-count claims vs reports/run-tests-latest.json, volk-count vs the registry, retired-infra phrases (Neo4j-as-KG, MQI-as-bridge, 10.222.9.x). Kills the corrections-register defect-#6 class (hand-written claims drifting from reality).
  4. Skills updated to match reality:
    • ast-toolkit skill: daemon section (auto-start, health, status, fallback semantics, free-threaded build caveat).
    • NEW test-loop skill: the fast inner loop — run_tests.py --affected, observe_pytest.py list/attach, affected_tests.py --files/--since, rts.py, flaky_test_hunter.py, diagnose_test_failure.py.
  5. Byte-exact serialized AST snapshot (user mandate): FunctionInfo/ ClassInfo gained end_line + body_hash (sha256[:16] of the exact source segment), ModuleInfo gained residue_hash; analyzer populates them; ast-ultimate.json regenerated — 0/7694 functions and 0/823 modules missing hashes; old-format JSON still loads (verified). models.py 100% / analyzer.py 97% coverage.
  6. affected_tests.py UNSAFE under-selection fixed: a changed src/ .py with no node in the serialized closure (src/orchestrata_ast/, src/orchestrata_tools/, DELETED files) silently contributed zero tests. Now escalates FULL-SUITE with a reason. The test that enshrined the old silent behavior was corrected (39/39 green).
  7. ZERO hand-reading mandate wired: new source subcommand (exact byte-identical segment of any symbol, decorators included; module + --residue forms) + CLAUDE.md Key Rule, gen_level0.py → docs/LEVEL0.md, and the ast-toolkit skill all rewritten to REQUIRE toolkit queries for Python content — ad-hoc Read is for non-Python artifacts only.
  8. Doc drift zeroed: 33/34 doc_lint findings fixed (historical claims exempted in place, living docs corrected to orchgraph/janus reality); the 34th was a doc_lint CIDR false positive (10.92.53.0/24 matched as a host claim) — regex fixed + regression test. doc_lint: 0 FAIL / 104 files.
  9. Session CLI + commit + push: all wiring committed; backlog items updated.

Defect found and NOT real (recorded to stop re-litigation)

Black under target-version = py314 rewrites except (A, B): to the PEP 758 unparenthesized form. It is VALID 3.14 syntax accepted by ruff, pyright, and py_compile — not corruption. Saved as permanent memory (pep758-except-parens).

Deliberately NOT done (and why)

Item Why not now
Merge rts.py INTO affected_tests.py Phase-7 handover slice; changes selection semantics — needs the ground-truth audit loop around it
ast_api.py HTTP service as a daemon No consumer today; CLI socket daemon covers the need; wire when a dashboard exists
Pre-push switch from full suite to --affected Changes a safety gate's semantics — user decision, not wiring
Code-KB P0 Prolog queries on orchkg Governance-plan Phase 7 (gated)
OWL/Turtle→Cypher pipeline Rejected in plan evaluation (complexity budget) pending user review