diff --git a/docs/UNIFIED_FLEET_SOVEREIGNTY_STATUS.md b/docs/UNIFIED_FLEET_SOVEREIGNTY_STATUS.md new file mode 100644 index 0000000..131a02a --- /dev/null +++ b/docs/UNIFIED_FLEET_SOVEREIGNTY_STATUS.md @@ -0,0 +1,107 @@ +# [DIRECTIVE] Unified Fleet Sovereignty & Comms Migration + +Grounding report for `timmy-home #524`. + +Issue #524 is a multi-lane directive, not a one-commit feature. This report grounds the directive in repo evidence, highlights stale cross-links, and names the missing operator bundles that still need real execution. + +This remains a `Refs #524` artifact. The directive spans multiple repos and operator actions, so this report makes the current repo-side state executable without pretending the whole migration is complete. + +## Directive Snapshot + +- Repo-grounded workstreams: 0 +- Partial workstreams: 4 +- Missing workstreams: 1 +- Drifted references: 4 + +## Reference Drift + +- #813 is cited for Nostr Migration Leadership, but its current title is 'docs: refresh the-playground genome analysis (#671)'. +- #819 is cited for Nostr Migration Leadership, but its current title is 'docs: verify #648 already implemented (closes #818)'. +- #139 is cited for v0.7.0 Feature Audit, but its current title is '🐣 Allegro-Primus is born'. +- #103 is cited for Morrowind Local-First Benchmark, but its current title is 'Build comprehensive caching layer — cache everywhere'. + +## Workstream Matrix + +### 1. Nostr Migration Leadership — PARTIAL + +- Requirement: Replace Telegram with relay-based sovereign comms, verify wizard keypairs, and prove the NIP-29 group path is stable. +- Referenced issues: + - #813 (closed) — docs: refresh the-playground genome analysis (#671) [DRIFT] + - #819 (open) — docs: verify #648 already implemented (closes #818) [DRIFT] +- Repo evidence present: + - `infrastructure/timmy-bridge/client/timmy_client.py` — Nostr event client scaffold already exists + - `infrastructure/timmy-bridge/monitor/timmy_monitor.py` — Nostr relay monitor already exists + - `specs/wizard-telegram-bot-cutover.md` — Telegram cutover planning exists, so the migration lane is real +- Missing operator deliverables: + - wizard keypair inventory and ownership matrix + - NIP-29 relay group verification report + - operator runbook for cutting traffic off Telegram +- Why this lane remains open: The repo has Nostr-adjacent scaffolding, but the directive still lacks a verified migration packet and the cited issue links drift away from the stated Nostr scope. + +### 2. Lexicon Enforcement — PARTIAL + +- Requirement: Enforce the Fleet Lexicon in PR review and issue triage so the team uses one shared language. +- Referenced issues: + - #388 (closed) — [KT] Fleet Lexicon & Techniques — Shared Vocabulary, Patterns, and Standards for All Agents [aligned] +- Repo evidence present: + - `docs/WIZARD_APPRENTICESHIP_CHARTER.md` — The repo already uses wizard-language canon in docs + - `specs/timmy-ezra-bezalel-canon-sheet.md` — Canonical agent naming already exists + - `docs/OPERATIONS_DASHBOARD.md` — Operational roles are already described in repo language +- Missing operator deliverables: + - machine-checkable lexicon policy for review/triage + - terminology lint or reviewer checklist tied to the lexicon +- Why this lane remains open: The naming canon exists, but there is still no executable enforcement bundle that would catch drift during future reviews and triage passes. + +### 3. v0.7.0 Feature Audit — PARTIAL + +- Requirement: Audit Hermes features that can reduce cloud dependency and turn the findings into a sovereignty implementation plan. +- Referenced issues: + - #139 (open) — 🐣 Allegro-Primus is born [DRIFT] +- Repo evidence present: + - `scripts/sovereignty_audit.py` — Cloud-vs-local audit machinery already exists + - `reports/evaluations/2026-04-15-phase-4-sovereignty-audit.md` — Recent sovereignty audit report is committed + - `timmy-local/README.md` — Local-first status is already documented for operators +- Missing operator deliverables: + - Hermes v0.7.0 feature inventory linked to cloud-reduction leverage + - Sovereignty Implementation Plan derived from that feature audit +- Why this lane remains open: The repo has sovereignty-audit infrastructure, but it does not yet contain the requested v0.7.0 feature inventory or the plan that turns those findings into rollout steps. + +### 4. Morrowind Local-First Benchmark — PARTIAL + +- Requirement: Compare cloud and local Morrowind agents, prove local parity where possible, and document the reasoning gap when it fails. +- Referenced issues: + - #103 (open) — Build comprehensive caching layer — cache everywhere [DRIFT] +- Repo evidence present: + - `morrowind/local_brain.py` — Local Morrowind control loop already exists + - `morrowind/mcp_server.py` — Morrowind MCP control surface is already wired + - `morrowind/pilot.py` — Trajectory logging for evaluation already exists +- Missing operator deliverables: + - cloud-vs-local benchmark report for the combat loop + - reasoning-gap writeup tied to a proposed LoRA/fine-tune path +- Why this lane remains open: The repo has a local Morrowind stack, but it does not yet contain the requested benchmark artifact; the cited issue number also points at an unrelated caching task. + +### 5. Infrastructure Hardening / Syntax Guard — MISSING + +- Requirement: Verify Syntax Guard pre-receive protection across Gitea repos so syntax failures stop earlier. +- Referenced issues: none listed in the directive body +- Repo evidence present: none +- Missing operator deliverables: + - repo inventory of Gitea targets that should carry Syntax Guard + - deployment verifier for hook presence across those repos + - operator report proving installation state instead of assuming it +- Why this lane remains open: No repo-managed syntax-guard verifier is present yet, so this directive still depends on manual trust rather than auditable proof. + +## Highest-Leverage Next Actions + +- Nostr Migration Leadership: wizard keypair inventory and ownership matrix +- Lexicon Enforcement: machine-checkable lexicon policy for review/triage +- v0.7.0 Feature Audit: Hermes v0.7.0 feature inventory linked to cloud-reduction leverage +- Morrowind Local-First Benchmark: cloud-vs-local benchmark report for the combat loop +- Infrastructure Hardening / Syntax Guard: repo inventory of Gitea targets that should carry Syntax Guard + +## Why #524 Remains Open + +- The directive bundles five separate workstreams with different evidence surfaces. +- Multiple cited issue numbers have drifted away from the work they are supposed to anchor. +- Repo scaffolding exists for Nostr, sovereignty audits, and Morrowind, but the operator-facing bundles are still missing. +- Syntax Guard verification is still undocumented and unproven inside this repo. diff --git a/tests/test_unified_fleet_sovereignty_status.py b/tests/test_unified_fleet_sovereignty_status.py new file mode 100644 index 0000000..79e0e3d --- /dev/null +++ b/tests/test_unified_fleet_sovereignty_status.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +import importlib.util +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +SCRIPT_PATH = ROOT / "scripts" / "unified_fleet_sovereignty_status.py" +DOC_PATH = ROOT / "docs" / "UNIFIED_FLEET_SOVEREIGNTY_STATUS.md" + + +def _load_module(path: Path, name: str): + assert path.exists(), f"missing {path.relative_to(ROOT)}" + spec = importlib.util.spec_from_file_location(name, path) + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def _workstream(result: dict, key: str) -> dict: + for workstream in result["workstreams"]: + if workstream["key"] == key: + return workstream + raise AssertionError(f"missing workstream {key}") + + +def test_evaluate_directive_flags_reference_drift_without_faking_completion() -> None: + mod = _load_module(SCRIPT_PATH, "unified_fleet_sovereignty_status") + result = mod.evaluate_directive(snapshot=mod.default_snapshot(), repo_root=ROOT) + + assert len(result["reference_drift"]) == 4 + assert any("#813" in item for item in result["reference_drift"]) + assert any("#103" in item for item in result["reference_drift"]) + + nostr = _workstream(result, "nostr-migration") + assert nostr["status"] == "PARTIAL" + assert any("timmy_client.py" in item for item in nostr["repo_evidence_present"]) + + lexicon = _workstream(result, "lexicon-enforcement") + assert all(item["aligned"] for item in lexicon["reference_results"]) + assert lexicon["status"] == "PARTIAL" + + syntax_guard = _workstream(result, "syntax-guard") + assert syntax_guard["status"] == "MISSING" + assert any("deployment verifier" in item for item in syntax_guard["missing_deliverables"]) + + +def test_render_markdown_includes_required_sections_and_grounding_evidence() -> None: + mod = _load_module(SCRIPT_PATH, "unified_fleet_sovereignty_status") + result = mod.evaluate_directive(snapshot=mod.default_snapshot(), repo_root=ROOT) + report = mod.render_markdown(result) + + for snippet in ( + "# [DIRECTIVE] Unified Fleet Sovereignty & Comms Migration", + "## Directive Snapshot", + "## Reference Drift", + "## Workstream Matrix", + "### 5. Infrastructure Hardening / Syntax Guard — MISSING", + "`infrastructure/timmy-bridge/client/timmy_client.py`", + "machine-checkable lexicon policy for review/triage", + "## Why #524 Remains Open", + ): + assert snippet in report + + +def test_repo_contains_committed_issue_524_grounding_doc() -> None: + assert DOC_PATH.exists(), "missing committed directive grounding doc" + text = DOC_PATH.read_text(encoding="utf-8") + for snippet in ( + "# [DIRECTIVE] Unified Fleet Sovereignty & Comms Migration", + "## Reference Drift", + "## Workstream Matrix", + "## Highest-Leverage Next Actions", + "## Why #524 Remains Open", + ): + assert snippet in text