-
Notifications
You must be signed in to change notification settings - Fork 1
feat: developer CLI and provenance payload spec (PP-1) #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7aab434
d21c111
4c1f95a
d17a790
1d6ce82
e9ba2ee
9b56db2
c167b5e
e407a6e
0450063
88ebaee
314e515
4ff9961
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,122 @@ | |
|
|
||
| ## Unreleased | ||
|
|
||
| ### Fixed — Developer CLI (`echo-cli`) | ||
|
|
||
| - **Bench Filter:** `echo-cli bench --filter <pattern>` now passes the filter | ||
| as a Criterion regex (`-- <pattern>`) instead of a `--bench` cargo target | ||
| selector. Previous behavior would look for a bench _target_ named after the | ||
| pattern rather than filtering benchmarks by regex. | ||
| - **Verify Expected Hash:** `--expected` now correctly reports "unchecked" for | ||
| warps 1+ instead of silently claiming "pass". Emits a stderr warning when | ||
| `--expected` is used with multi-warp snapshots. Text and JSON output now | ||
| use consistent lowercase status values. | ||
| - **Unused Dependency:** Removed `colored = "2"` from `warp-cli` (declared but | ||
| never imported). | ||
| - **Output Hardening:** `emit()` no longer panics on JSON serialization failure; | ||
| falls back to stderr. Bench exit status now reports Unix signal numbers | ||
| instead of a misleading `-1`. | ||
| - **Error Handling:** `collect_criterion_results` now logs a warning on | ||
| unparseable `estimates.json` instead of silently skipping. `format_duration` | ||
| returns "N/A" for NaN/negative values. `att_row_to_value` warns on missing | ||
| blob data instead of silent fallback. | ||
| - **Dead Code:** Replaced blanket `#![allow(dead_code)]` on `lib.rs` with | ||
| targeted `#[allow(dead_code)]` on the `output` module only. | ||
| - **Man Page Headers:** Subcommand man pages now use prefixed names | ||
| (`echo-cli-bench`, `echo-cli-verify`, `echo-cli-inspect`) in `.TH` headers | ||
| instead of bare subcommand names. | ||
| - **Visibility:** Narrowed all non-API structs and functions from `pub` to | ||
| `pub(crate)` in bench, verify, inspect, and wsc_loader modules. Only | ||
| `cli.rs` types remain `pub` (required by xtask man page generation). | ||
| - **cargo-deny:** Fixed wildcard dependency error for `warp-cli` in | ||
| `xtask/Cargo.toml` by adding explicit `version = "0.1.0"` alongside | ||
| the path override. | ||
| - **Man Page Cleanup:** `cargo xtask man-pages` now removes stale | ||
| `echo-cli*.1` files before regeneration so the output directory is an | ||
| exact snapshot. | ||
|
|
||
| ### Fixed — Code Review (PR #289, Round 2) | ||
|
|
||
| - **Inspect Tree Warp Identity:** Multi-warp snapshots now label each tree | ||
| section with its warp index (`Tree (warp 0):`, `Tree (warp 1):`) instead of | ||
| flattening all trees into a single unlabeled `Tree:` section. | ||
| - **WSC Loader Attachment Checks:** Replaced `debug_assert!` with runtime | ||
| warnings for attachment multiplicity violations. Previously, release builds | ||
| silently dropped extra attachments; now emits a warning to stderr. | ||
| - **Test Naming:** Renamed `tampered_wsc_fails` to `tampered_wsc_does_not_panic` | ||
| to accurately reflect the test's behavior (no assertion, just no-panic guard). | ||
| - **Test Coverage:** Added `roundtrip_with_edge_attachments` and | ||
| `roundtrip_with_descend_attachment` tests to `wsc_loader.rs`, covering | ||
| previously untested code paths. | ||
| - **SPEC-0005 `global_tick` Invariant:** Reworded from `patches[i].global_tick == i` | ||
| to correctly state contiguity relative to the payload's start tick, since | ||
| payloads can begin at any absolute tick via `from_store(store, wl, 5..10)`. | ||
| - **SPEC-0005 BTR Verification:** Fixed step 5 of the verification algorithm | ||
| to reference the actual hash formula from §5.4 instead of a nonexistent | ||
| `parents` field. | ||
| - **SPEC-0005 Derivation Algorithm:** Fixed backward-cone traversal that dropped | ||
| transitive dependencies. The original filter checked the root query slot at | ||
| every hop; now accepts all frontier nodes unconditionally (they are already | ||
| known-causal) and traces all `in_slots` backward. | ||
| - **Stale `warp-ffi` References:** Removed dead `warp-ffi` entry from | ||
| `det-policy.yaml`, C ABI text from `phase1-plan.md`, and stale CLI names | ||
| from `rust-rhai-ts-division.md`. | ||
|
|
||
| ### Fixed — Docs & CI | ||
|
|
||
| - **TASKS-DAG Spec Path:** `SPEC-PROVENANCE-PAYLOAD.md` → | ||
| `SPEC-0005-provenance-payload.md` in sub-task title and AC1 (two | ||
| occurrences). Same stale path fixed in ROADMAP backlog `security.md`. | ||
| - **SPEC-0005 Byte Counts:** Domain separation tag sizes corrected: | ||
| `echo:provenance_payload:v1\0` = 27 bytes (was 28), | ||
| `echo:provenance_edge:v1\0` = 24 bytes (was 25). | ||
| - **Project Tour:** Updated `warp-cli` description from "Placeholder CLI home" | ||
| to list actual subcommands (verify, bench, inspect). | ||
| - **CI Formatting:** Removed stray blank line between warp-geom and warp-wasm | ||
| rustdoc steps in `ci.yml`. | ||
|
|
||
|
Comment on lines
+69
to
+81
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changelog fragmentation: Third "Fixed" section dilutes focus. The changelog now has three separate "Fixed" subsections under "Unreleased" (lines 8, 42, 69), creating cognitive overhead and violating the "keep a changelog" convention of consolidating changes by type. Additional issues:
🔨 Consolidation strategy
### Added — Provenance Payload Spec (PP-1)
- **SPEC-0005:** Published `docs/spec/SPEC-0005-provenance-payload.md` mapping
Paper III (AION Foundations) formalism to concrete Echo types. Defines four
new types (`ProvenancePayload`, `BoundaryTransitionRecord`, `ProvenanceNode`,
`DerivationGraph`), wire format with CBOR encoding and domain separation tags,
two worked examples (3-tick accumulator, branching fork), bridge to existing
`ProvenanceStore`/`PlaybackCursor` APIs, and attestation envelope with SLSA
- alignment.
+ alignment.
+ ✓ Domain separation tag sizes corrected: `echo:provenance_payload:v1\0` = 27 bytes,
+ `echo:provenance_edge:v1\0` = 24 bytes. |
||
| ### Added — Developer CLI (`echo-cli`) | ||
|
|
||
| - **CLI Scaffold (`warp-cli`):** Replaced placeholder with full `clap` 4 derive | ||
| subcommand dispatch. Three subcommands: `verify`, `bench`, `inspect`. Global | ||
| `--format text|json` flag for machine-readable output. | ||
| - **Verify Subcommand:** `echo-cli verify <snapshot.wsc>` loads a WSC snapshot, | ||
| validates structural integrity via `validate_wsc`, reconstructs the in-memory | ||
| `GraphStore` from columnar data, and computes the state root hash. Optional | ||
| `--expected <hex>` flag compares against a known hash. | ||
| - **WSC Loader:** New `wsc_loader` module bridges WSC columnar format to | ||
| `GraphStore` — the inverse of `warp_core::wsc::build_one_warp_input`. | ||
| Reconstructs nodes, edges, and attachments from `WarpView`. | ||
| - **Bench Subcommand:** `echo-cli bench [--filter <pattern>]` shells out to | ||
| `cargo bench -p warp-benches`, parses Criterion JSON from | ||
| `target/criterion/*/new/estimates.json`, and renders an ASCII table via | ||
| `comfy-table`. Supports `--format json` for CI integration. | ||
| - **Inspect Subcommand:** `echo-cli inspect <snapshot.wsc> [--tree]` displays | ||
| WSC metadata (tick, schema hash, warp count), graph statistics (node/edge | ||
| counts, type breakdown, connected components via BFS), and optional ASCII | ||
| tree rendering depth-limited to 5 levels. | ||
| - **Man Pages:** Added `clap_mangen`-based man page generation to `xtask`. | ||
| `cargo xtask man-pages` generates `docs/man/echo-cli.1`, | ||
| `echo-cli-verify.1`, `echo-cli-bench.1`, `echo-cli-inspect.1`. | ||
|
|
||
|
Comment on lines
+82
to
+105
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Section ordering: "Added" should precede "Fixed" to establish context. Lines 82-105 document the addition of Additional observations:
📐 Ordering fix
- **Man Pages:** Added `clap_mangen`-based man page generation to `xtask`.
- `cargo xtask man-pages` generates `docs/man/echo-cli.1`,
+ Run `cargo xtask man-pages` (see `.cargo/config.toml` for xtask setup) to generate
+ `docs/man/echo-cli.1`,
`echo-cli-verify.1`, `echo-cli-bench.1`, `echo-cli-inspect.1`.
Based on learnings: The learning states "Use 🤖 Prompt for AI Agents |
||
| ### Removed | ||
|
|
||
| - **`warp-ffi` crate deleted:** The C ABI integration path (`crates/warp-ffi`) | ||
| has been removed. The C ABI approach was abandoned in favor of Rust plugin | ||
| extension via `RewriteRule` trait registration and Rhai scripting. See | ||
| TASKS-DAG.md #26 (Graveyard). This is a **BREAKING CHANGE** for any | ||
| downstream code that depended on the C FFI surface. | ||
|
|
||
|
Comment on lines
+106
to
+113
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Breaking change lacks actionable migration path for affected users. Lines 106-113 correctly document the Issues:
For a breaking removal, users need:
🔧 Improved migration guidance ### Removed
- **`warp-ffi` crate deleted:** The C ABI integration path (`crates/warp-ffi`)
has been removed. The C ABI approach was abandoned in favor of Rust plugin
- extension via `RewriteRule` trait registration and Rhai scripting. See
- TASKS-DAG.md `#26` (Graveyard). This is a **BREAKING CHANGE** for any
- downstream code that depended on the C FFI surface.
+ extension via `RewriteRule` trait registration and Rhai scripting.
+
+ **Migration:** If you were using `warp-ffi` for external rule engines:
+ - Use the Rust-native `RewriteRule` trait (see `crates/warp-core/src/rules.rs`)
+ - For non-Rust environments, evaluate the developer CLI (`echo-cli`) for
+ out-of-process integration via WSC snapshots
+ - Rhai scripting support is planned but not yet available
+
+ This is a **BREAKING CHANGE**. If your use case is blocked, open a GitHub
+ discussion with your integration requirements.Move this section to appear after "Added — Provenance Payload Spec" (line 123). 🤖 Prompt for AI Agents |
||
| ### Added — Provenance Payload Spec (PP-1) | ||
|
|
||
| - **SPEC-0005:** Published `docs/spec/SPEC-0005-provenance-payload.md` mapping | ||
| Paper III (AION Foundations) formalism to concrete Echo types. Defines four | ||
| new types (`ProvenancePayload`, `BoundaryTransitionRecord`, `ProvenanceNode`, | ||
| `DerivationGraph`), wire format with CBOR encoding and domain separation tags, | ||
| two worked examples (3-tick accumulator, branching fork), bridge to existing | ||
| `ProvenanceStore`/`PlaybackCursor` APIs, and attestation envelope with SLSA | ||
| alignment. | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
Comment on lines
+8
to
+123
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify SPEC-0005 file and check changelog claims
# Check SPEC-0005 exists
echo "=== Verifying SPEC-0005 file ==="
if [ -f "docs/spec/SPEC-0005-provenance-payload.md" ]; then
echo "✓ SPEC-0005 file exists"
wc -l docs/spec/SPEC-0005-provenance-payload.md
else
echo "✗ SPEC-0005 file NOT FOUND at claimed path"
fi
# Verify cargo xtask man-pages command exists
echo -e "\n=== Checking xtask man-pages command ==="
if [ -f "xtask/src/main.rs" ]; then
if grep -q "man-pages" xtask/src/main.rs 2>/dev/null; then
echo "✓ man-pages command found in xtask"
grep -A5 "man-pages" xtask/src/main.rs | head -10
else
echo "✗ man-pages command not found in xtask"
fi
else
echo "xtask/src/main.rs not found"
fi
# Check for remaining warp-ffi references (should be minimal after removal)
echo -e "\n=== Scanning for remaining warp-ffi references ==="
echo "Changelog claims: 'Removed dead warp-ffi entry from det-policy.yaml, C ABI text from phase1-plan.md'"
rg -i "warp-ffi" --type md --type yaml 2>/dev/null | head -20 || echo "No rg output"
# Check if colored dependency was actually removed from warp-cli
echo -e "\n=== Verifying colored dependency removal claim ==="
if [ -f "crates/warp-cli/Cargo.toml" ]; then
if grep -q "colored" crates/warp-cli/Cargo.toml; then
echo "✗ 'colored' still present in warp-cli/Cargo.toml"
grep "colored" crates/warp-cli/Cargo.toml
else
echo "✓ 'colored' not found in warp-cli/Cargo.toml"
fi
else
echo "crates/warp-cli/Cargo.toml not found"
fi
# Check for det-policy.yaml
echo -e "\n=== Checking det-policy.yaml for warp-ffi entry ==="
if [ -f "det-policy.yaml" ]; then
if grep -q "warp-ffi" det-policy.yaml; then
echo "✗ warp-ffi entry still in det-policy.yaml"
grep -n "warp-ffi" det-policy.yaml
else
echo "✓ No warp-ffi in det-policy.yaml"
fi
fi
# Check for phase1-plan.md
echo -e "\n=== Checking phase1-plan.md for C ABI references ==="
if [ -f "phase1-plan.md" ]; then
if grep -qi "C ABI\|FFI\|warp-ffi" phase1-plan.md; then
echo "✗ C ABI or warp-ffi references still in phase1-plan.md"
grep -ni "C ABI\|FFI\|warp-ffi" phase1-plan.md
else
echo "✓ No C ABI/warp-ffi references in phase1-plan.md"
fi
fiRepository: flyingrobots/echo Length of output: 1241 🏁 Script executed: #!/bin/bash
# Deeper xtask investigation and git history check
echo "=== Searching entire xtask directory for 'man' or 'mangen' ==="
find xtask -type f -name "*.rs" -o -name "*.toml" | xargs grep -l "man\|mangen" 2>/dev/null || echo "No man-page related code found"
echo -e "\n=== Full xtask file structure ==="
ls -la xtask/src/ 2>/dev/null || echo "xtask/src not found"
echo -e "\n=== Checking xtask Cargo.toml dependencies ==="
if [ -f "xtask/Cargo.toml" ]; then
grep -i "clap\|mangen\|man" xtask/Cargo.toml || echo "No man-page deps found"
fi
echo -e "\n=== Verifying git history for warp-ffi removal ==="
# Check if warp-ffi crate directory was deleted
git log --oneline --all -- crates/warp-ffi 2>/dev/null | head -5 || echo "Cannot access git history"
echo -e "\n=== Check for recent commits touching CHANGELOG or warp-ffi references ==="
git log --oneline -20 2>/dev/null | head -10 || echo "Cannot access git log"
echo -e "\n=== Verify AGENTS.md still references warp-ffi ==="
grep -n "warp-ffi" AGENTS.md 2>/dev/null || echo "warp-ffi not found in AGENTS.md"Repository: flyingrobots/echo Length of output: 1272 🏁 Script executed: #!/bin/bash
echo "=== Searching xtask/src/main.rs for man-pages or mangen usage ==="
rg "man|mangen" xtask/src/main.rs -A 3 | head -30
echo -e "\n=== Git show for warp-ffi deletion commit (12feebb) ==="
git show 12feebb --stat 2>/dev/null | head -20
echo -e "\n=== Check if crates/warp-ffi directory exists ==="
if [ -d "crates/warp-ffi" ]; then
echo "✗ crates/warp-ffi STILL EXISTS"
ls -la crates/warp-ffi
else
echo "✓ crates/warp-ffi directory has been deleted"
fi
echo -e "\n=== Verify all warp-ffi references in public docs ==="
rg "warp-ffi" docs/ AGENTS.md CONTRIBUTING.md 2>/dev/null || echo "Checked docs"
echo -e "\n=== Check if warp-cli crate exists and is properly structured ==="
if [ -d "crates/warp-cli" ]; then
echo "✓ warp-cli crate exists"
ls -la crates/warp-cli/
echo -e "\n=== warp-cli/Cargo.toml (first 30 lines) ==="
head -30 crates/warp-cli/Cargo.toml
else
echo "✗ crates/warp-cli not found"
fiRepository: flyingrobots/echo Length of output: 3406 Changelog refactoring + AGENTS.md blocking issue before release. The "Unreleased" section violates changelog conventions (triple "Fixed" fragmentation, section ordering chaos, forward references to SPEC-0005 before introduction, PR archaeology, formatting trivia). These require structural refactoring per the original assessment. Critical blocking issue: AGENTS.md line 12 still claims Additional structural flaws:
Refactor before release: merge three "Fixed" sections, reorder per convention (Added → Removed → Fixed), promote SPEC-0005 addition above its fixes, delete internal review iterations and formatting trivia, strengthen migration guidance for breaking changes. 🤖 Prompt for AI Agents
Comment on lines
+114
to
+123
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forward reference problem: SPEC-0005 fixes precede its introduction. Lines 114-123 introduce SPEC-0005, but fixes to SPEC-0005 already appeared in:
This forces readers to parse corrections to a spec they haven't encountered yet, creating cognitive dissonance. Additional issues:
📖 Improved structure
### Added — Provenance Payload Spec (PP-1)
-- **SPEC-0005:** Published `docs/spec/SPEC-0005-provenance-payload.md` mapping
- Paper III (AION Foundations) formalism to concrete Echo types. Defines four
- new types (`ProvenancePayload`, `BoundaryTransitionRecord`, `ProvenanceNode`,
- `DerivationGraph`), wire format with CBOR encoding and domain separation tags,
- two worked examples (3-tick accumulator, branching fork), bridge to existing
- `ProvenanceStore`/`PlaybackCursor` APIs, and attestation envelope with SLSA
- alignment.
+- **SPEC-0005 (Provenance Payload):** Published formal spec at
+ `docs/spec/SPEC-0005-provenance-payload.md`, mapping Paper III (AION Foundations)
+ formalism to concrete Echo types.
+ - **Types:** `ProvenancePayload`, `BoundaryTransitionRecord`, `ProvenanceNode`,
+ `DerivationGraph`
+ - **Wire format:** CBOR encoding with domain separation tags
+ - **Examples:** 3-tick accumulator, branching fork scenarios
+ - **Integration:** Bridges to `ProvenanceStore`/`PlaybackCursor` APIs
+ - **Attestation:** Envelope aligned with SLSA provenance spec
+
+ *(PP-1 refers to feature tracking ID in internal roadmap.)*
🤖 Prompt for AI Agents |
||
| ### Fixed (CI) | ||
|
|
||
| - **Evidence Derivation:** Replaced artifact-directory-presence check for `DET-001` with | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR review archaeology doesn't belong in a user-facing changelog.
Lines 42-68 document the iterative code review process ("Round 2"), including test renames, internal test coverage additions, and reviewer-requested fixes. This is PR implementation minutiae, not user-facing release documentation.
Violations:
tampered_wsc_fails→tampered_wsc_does_not_panicis internal—users never see test names in releases.roundtrip_with_edge_attachmentstests is implementation QA, not a deliverable.git show <sha>, not working-tree inspection—but the changelog provides no commit SHA for readers to verify.What belongs in a changelog:
What doesn't:
🗑️ Proposed deletion
Delete lines 42-68 entirely. If any fixes have genuine user impact (e.g., inspect multi-warp tree labeling), migrate them to the relevant "Added" or "Fixed" section with user-facing descriptions:
Based on learnings: Retrieved learnings instruct that claims about stale reference removal in CHANGELOG.md must be verified via commit diff inspection (
git show <sha>), not current working tree state, to avoid false negatives. This section provides no commit references for verification.🤖 Prompt for AI Agents