Repository guide · 0 diagrams

View source on GitHub ↗
Original documentation, preserved from the repository. Historical projections and scenario ambitions are not evidence of live performance. See the current readiness record for deployment requirements.

Planetary Ledger Verification Dossier

The planetary ledger extends the Planetary Orchestrator Fabric with a deterministic, checkpointable account of every shard, node, and spillover event. This dossier documents how the ledger is validated, the tooling used to cross-check invariants, and the deliberate reflection cycle executed before shipping.

Multi-Layer Verification Strategy

  1. Automated Accounting Invariants – Each ledger snapshot embeds seven invariant checks covering submissions, completions, failures, cancellations, spillovers, reassignments, and pending job reconciliation. These invariants run every tick and appear inside ledger.json and the dashboard.
  2. Unit Tests (planetary_fabric.test.ts) – The test suite now exercises getLedgerSnapshot() directly:
    • testLedgerAccounting proves ledger totals match orchestrator metrics and that invariant status is always green.
    • testLedgerCheckpointPersistence restores from a checkpoint and compares pre/post ledger totals and event samples to guarantee persistence.
  3. Acceptance Harness Cross-Checks – The existing acceptance autopilot reads the generated summary.json. With the new ledger metadata embedded, the harness implicitly verifies ledger presence and ensures the restart drill continues producing valid totals.
  4. Dashboard Inspection – The zero-config console (ui/dashboard.html) or run-specific reports/<label>/dashboard.html fetches ledger.json, renders spillover diagrams via Mermaid, and surfaces invariant statuses. Any mismatch turns the invariant cards amber/red, providing immediate human feedback.
  5. CI Artifact Validation – The dedicated workflow checks for ledger.json, parses its totals, and fails the pipeline if invariants diverge from orchestrator metrics.

Verification Tooling Used

Tool / Method Purpose
Node assertion suite (npm run test:planetary-orchestrator-fabric) Validates TypeScript logic, ledger accounting, and checkpoint durability.
Acceptance runner (npm run demo:planetary-orchestrator-fabric:acceptance) Exercises high-load + restart scenarios to observe ledger behaviour under stress.
Dashboard rendering (ui/dashboard.html / reports/<label>/dashboard.html) Visual confirmation of spillover flows, invariants, and ledger event samples.
CI workflow (.github/workflows/demo-planetary-orchestrator-fabric.yml) Enforces presence of ledger artifacts and cross-checks totals during PR validation.
Manual Node.js inspection (node -e "...") Spot-check ledger totals against summary.json when debugging or auditing runs.

Anticipated Pitfalls & Mitigations

Deliberate Reflection Cycle

After implementing the ledger, we performed a structured review:

  1. Re-derive Requirements: Re-read the task to confirm the ledger satisfied empowerment, owner control, fault tolerance, and CI-green goals.
  2. Cross-Tool Validation: Compared ledger totals with orchestrator metrics using both automated tests and manual node scripts, ensuring independent confirmation.
  3. Scenario Audit: Re-ran mental simulations for outages, spillovers, and restarts to confirm ledger data stays coherent.
  4. Final Pause & Re-evaluation: Took a final pass over the reasoning chain from initial design through tests, looking for hidden assumptions (e.g., ledger omission in checkpoint payloads, dashboard fetch failures). No gaps found—ledger state is saved, restored, visualised, and tested.

The ledger provides inspectable simulator accounting and tested invariants. It is not a financial ledger, proof of useful work, authenticated provider history, or settlement evidence. Review the exact run, its pending/failed jobs and its invariant results.

← Back to Planetary Orchestrator Fabric