You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dashboard-vs-STATE CI gate + Phase B (CNO-law proptest, delete legacy tree, honest obliteration) (#81)
Two threads of estate-honesty work in januskey. All changes build clean
and are test-verified.
## Thread 1 — `dashboard-check`: make "dashboards that lie" a build
failure
New Rust workspace crate `crates/dashboard-check` (Rust =
policy-preferred CLI language) that reads the machine-readable **source
of truth** (`.machine_readable/6a2/STATE.a2ml`) and fails CI when a
hand-maintained dashboard diverges from it — the structural fix for the
estate's #1 recurring defect (the historical `TOPOLOGY.md` "100%
Production Ready" vs `STATE.a2ml` 60%/Grade-D).
- `a2ml` is TOML, so it parses with the `toml` crate (no bespoke
reader). Extracts `completion-percentage` / `crg-grade` / `last-updated`
(tolerating januskey's quoted `"60"`/`"D"` and other repos' bare
integers); asserts they match `TOPOLOGY.md` (`OVERALL: …%`, `Grade X`)
and `READINESS.md` (`CRG Grade: X`), and that the dashboard isn't older
than STATE.
- **8 unit tests** (quoted+bare parsing, every drift class,
aligned-pass, and a prose-shadowing regression).
- **Verified end-to-end:** passes on this repo; catches an injected
100%-vs-60% drift with the exact `completion mismatch` message.
- Wired as `just check-dashboard` + CI job **Dashboard Check** (SPDX
header, `contents: read`, SHA-pinned actions). Prototyped here; designed
to be vendored estate-wide.
## Thread 3 — Phase B honesty/tests
- **B5 — runnable reversibility evidence.** A property test asserting
the CNO round-trip law `execute∘undo ≡ identity` on the filesystem,
across all supported operations over random content (temp tree + stores,
snapshot → execute → undo with a fresh executor → assert byte-for-byte
restored). The honest substitute for the "formal proofs pending" badge.
Chown excluded (undo unimplemented); tests the filesystem effect, not
the deliberately non-involutive `OperationType::inverse`.
- **B2 — delete the legacy `src/januskey/` monolith** (non-workspace,
pre-extraction duplicate of `crates/januskey-cli`, labelled LEGACY).
Every reference repointed (README, ARCHITECTURE, EXPLAINME, docs/wiki,
`idrisiser/*.tsig`); the two contractile checks that scanned it
simplified (they already preferred `crates/januskey-cli`).
`src/abi/*.idr` (Idris ABI) untouched. No dangling references remain.
- **B8 — stop overstating obliteration.** The doc-comment claimed
content is "cryptographically unrecoverable"; overwrite-in-place can't
guarantee physical erasure on SSD/CoW/journaling media (the caveat
already lived in `threat-model.a2ml`). Mirrored that honest wording into
`obliteration.rs` and softened the README claim, with the obliteration
exception called out.
## Verification
- `cargo build --workspace` — clean.
- `cargo test -p januskey --lib` — **26 passed**; `--test
property_tests` — **4 passed** (incl. the new CNO-law case); `cargo test
-p dashboard-check` — **8 passed**.
- `dashboard-check --check .` — green on this repo; clippy clean on the
new crate.
## Context
Threads 1 & 3 of a three-thread follow-up (Lean mirror merged in #110;
this is the januskey pair). Draft pending human review.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_015qwVESTcbfanY2iJPQNoSz
---
_Generated by [Claude
Code](https://claude.ai/code/session_015qwVESTcbfanY2iJPQNoSz)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: EXPLAINME.adoc
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,19 @@ The README makes claims. This file backs them up.
10
10
11
11
=== Claim 1: "100% Reversible - Every operation can be undone, always"
12
12
13
-
**How it works:** JanusKey implements architectural reversibility by storing inverted operations alongside each mutation. The delete operation, implemented in `src/januskey/src/obliteration.rs`, calculates and stores a full restoration record before removing file content. The `delta.rs` module generates inverse metadata that sufficient to reconstruct the pre-operation state. Every operation in the transaction layer (`src/januskey/src/metadata.rs`) maintains a "prior state" record, enabling perfect reversal through the `undo` pathway.
13
+
**How it works:** JanusKey implements architectural reversibility by storing inverted operations alongside each mutation. The delete operation, implemented in `crates/januskey-cli/src/obliteration.rs`, calculates and stores a full restoration record before removing file content. The `delta.rs` module generates inverse metadata that sufficient to reconstruct the pre-operation state. Every operation in the transaction layer (`crates/januskey-cli/src/metadata.rs`) maintains a "prior state" record, enabling perfect reversal through the `undo` pathway.
14
14
15
15
**Caveat:** Reversibility is strong only when the operation log remains intact. If `.jk/` metadata store is corrupted or lost, recovery becomes impossible. The system trades **write amplification** (each operation doubles metadata I/O) for guaranteed recoverability.
16
16
17
-
**Evidence:** `src/januskey/src/lib.rs` (public API) delegates to `obliteration.rs` and `delta.rs` for operation logic; see `Reversible` trait (if present) or reversibility-proof comments in `attestation.rs`.
17
+
**Evidence:** `crates/januskey-cli/src/lib.rs` (public API) delegates to `obliteration.rs` and `delta.rs` for operation logic; see `Reversible` trait (if present) or reversibility-proof comments in `attestation.rs`.
**How it works:** The metadata store (`src/januskey/src/metadata.rs`) maintains an append-only operation log. The `attestation.rs` module calculates cryptographic commitments (SHA256 hashes) of each operation, creating a tamper-evident chain. Content-addressed storage (`src/januskey/src/content_store.rs`) ensures deduplication by content hash, preventing duplicate storage while maintaining full history.
21
+
**How it works:** The metadata store (`crates/januskey-cli/src/metadata.rs`) maintains an append-only operation log. The `attestation.rs` module calculates cryptographic commitments (SHA256 hashes) of each operation, creating a tamper-evident chain. Content-addressed storage (`crates/januskey-cli/src/content_store.rs`) ensures deduplication by content hash, preventing duplicate storage while maintaining full history.
22
22
23
23
**Caveat:** The audit trail is only as trustworthy as the append-only mechanism. If the log is truncated or rewritten on-disk, the chain breaks. For forensic-grade auditing, integrate with an external append-only store (database, blockchain).
0 commit comments