-
Notifications
You must be signed in to change notification settings - Fork 1
feat(warp-core): add WAL evidence segment catalog #644
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
Merged
+1,011
−7
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
dc95b60
feat(trace): establish trace observer boundary
flyingrobots 287323a
refactor(trace): pivot to canonical graph deltas over events
flyingrobots 4e59099
feat(warp-core): add CausalSegmentCatalog and evidence observer
flyingrobots 23c9e2f
feat(warp-core): derive causal segments from RecoveryScanReport
flyingrobots bc4026e
feat(warp-core): derive exact base segments per WAL transaction
flyingrobots 1fefc0e
feat(warp-core): add live evidence catalog cache to TrustedRuntimeWal
flyingrobots b168e48
feat(warp-core): add WAL evidence segment catalog
flyingrobots 348a6b7
Fix: add echo-trace package metadata
flyingrobots fbf6d53
Fix: format echo-trace source
flyingrobots 934d4c7
Fix: rebuild evidence catalog after recovered WAL commits
flyingrobots 65a5057
Fix: preserve last-good evidence catalog commit
flyingrobots f053004
Fix: add evidence catalog SPDX header
flyingrobots a510da1
Fix: index evidence segments by covered range
flyingrobots 58637e2
Fix: document evidence catalog review fixes
flyingrobots 368757e
Fix: update crossbeam epoch audit advisory
flyingrobots 638d061
Fix: normalize echo-trace workspace member formatting
flyingrobots cca3ecd
Fix: validate evidence catalog WAL transactions
flyingrobots File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> | ||
| [package] | ||
| name = "echo-trace" | ||
| version = "0.1.0" | ||
| edition = "2024" | ||
| license.workspace = true | ||
| repository.workspace = true | ||
| rust-version.workspace = true | ||
|
flyingrobots marked this conversation as resolved.
|
||
| description = "Canonical causal trace boundary for Echo graph delta streams" | ||
| readme = "README.md" | ||
| keywords = ["echo", "trace", "causal", "graph"] | ||
| categories = ["data-structures", "development-tools"] | ||
|
|
||
| [dependencies] | ||
|
|
||
| [lints] | ||
| workspace = true | ||
|
flyingrobots marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <!-- SPDX-License-Identifier: Apache-2.0 OR LicenseRef-MIND-UCAL-1.0 --> | ||
| <!-- © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> --> | ||
|
|
||
| # echo-trace | ||
|
|
||
| Canonical causal trace boundary for Echo graph delta streams. | ||
|
|
||
| `echo-trace` defines the small trait and data shapes used by trace sinks that | ||
| consume ordered graph deltas, seal deterministic chunks, and return receipts. | ||
| The crate is intentionally transport-neutral: it names the boundary between a | ||
| causal producer and a trace sink without owning storage, replay, or rendering. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // © James Ross Ω FLYING•ROBOTS <https://github.com/flyingrobots> | ||
|
|
||
| //! Echo Trace | ||
| //! | ||
| //! Graph is truth. Delta log is transport. Roaring is index. | ||
| //! Matrix is projection. Receipt is proof. | ||
| //! | ||
| //! This crate defines the canonical causal delta stream boundary. | ||
|
|
||
| /// Represents an execution tick identifier. | ||
| pub type TickId = u64; | ||
|
|
||
| /// A digest representing a causal frontier in the WARP graph. | ||
| pub type FrontierDigest = [u8; 32]; | ||
|
|
||
| /// The core graph delta, encapsulating the exact WSC rows appended in a tick. | ||
| /// Parameterized over the row types to avoid circular dependencies with `warp-core`. | ||
| pub struct CanonicalGraphDelta<'a, N, E, A> { | ||
| /// The tick at which this delta occurred. | ||
| pub tick: TickId, | ||
| /// The causal frontier digest before this delta. | ||
| pub causal_frontier_before: FrontierDigest, | ||
| /// The canonical NodeRows appended. | ||
| pub node_rows: &'a [N], | ||
| /// The canonical EdgeRows appended. | ||
| pub edge_rows: &'a [E], | ||
| /// The canonical AttRows appended. | ||
| pub att_rows: &'a [A], | ||
| /// The causal frontier digest after this delta. | ||
| pub causal_frontier_after: FrontierDigest, | ||
| } | ||
|
|
||
| /// Metadata describing an execution trace run. | ||
| pub struct TraceRunMeta { | ||
| /// The starting tick of the execution trace run. | ||
| pub start_tick: TickId, | ||
| /// The root causal frontier digest. | ||
| pub root_frontier: FrontierDigest, | ||
| } | ||
|
|
||
| /// A receipt for a sealed trace chunk. | ||
| pub struct TraceChunkReceipt { | ||
| /// The starting tick of this chunk. | ||
| pub start_tick: TickId, | ||
| /// The total number of ticks contained in this chunk. | ||
| pub tick_count: u64, | ||
| /// The cryptographic hash of the prior chunk. | ||
| pub prior_chunk_hash: [u8; 32], | ||
| /// The cryptographic hash of the current chunk. | ||
| pub chunk_hash: [u8; 32], | ||
| } | ||
|
|
||
| /// A receipt for a completed trace run. | ||
| pub struct TraceRunReceipt { | ||
| /// The total number of chunks generated in the run. | ||
| pub chunks: usize, | ||
| /// The final cryptographic hash representing the entire trace run. | ||
| pub final_hash: [u8; 32], | ||
| } | ||
|
|
||
| /// A generic error type for trace operations. | ||
| #[derive(Debug)] | ||
| pub enum TraceError { | ||
| /// An I/O error occurred while writing or reading the trace sink. | ||
| IoError, | ||
| /// The trace chunk could not be sealed. | ||
| SealError, | ||
| /// A causal boundary violation occurred. | ||
| BoundaryMismatch, | ||
| } | ||
|
|
||
| /// The trace boundary trait. | ||
| /// | ||
| /// Consumes canonical graph deltas, bounded in chunked streams. | ||
| pub trait TraceSink<N, E, A> { | ||
| /// Start a new trace run. | ||
| fn begin_run(&mut self, meta: &TraceRunMeta) -> Result<(), TraceError>; | ||
|
|
||
| /// Append a canonical graph delta to the stream. | ||
| fn append_delta(&mut self, delta: &CanonicalGraphDelta<'_, N, E, A>) -> Result<(), TraceError>; | ||
|
|
||
| /// Seal the current chunk and return its cryptographic receipt. | ||
| fn seal_chunk(&mut self) -> Result<TraceChunkReceipt, TraceError>; | ||
|
|
||
| /// Finish the entire trace run and return the final receipt. | ||
| fn finish_run(&mut self) -> Result<TraceRunReceipt, TraceError>; | ||
| } | ||
|
|
||
| /// A baseline sink that incurs near-zero overhead and does nothing. | ||
| pub struct NullTraceSink; | ||
|
|
||
| impl<N, E, A> TraceSink<N, E, A> for NullTraceSink { | ||
| fn begin_run(&mut self, _meta: &TraceRunMeta) -> Result<(), TraceError> { | ||
| Ok(()) | ||
| } | ||
| fn append_delta( | ||
| &mut self, | ||
| _delta: &CanonicalGraphDelta<'_, N, E, A>, | ||
| ) -> Result<(), TraceError> { | ||
| Ok(()) | ||
| } | ||
| fn seal_chunk(&mut self) -> Result<TraceChunkReceipt, TraceError> { | ||
| Ok(TraceChunkReceipt { | ||
| start_tick: 0, | ||
| tick_count: 0, | ||
| prior_chunk_hash: [0; 32], | ||
| chunk_hash: [0; 32], | ||
| }) | ||
| } | ||
| fn finish_run(&mut self) -> Result<TraceRunReceipt, TraceError> { | ||
| Ok(TraceRunReceipt { | ||
| chunks: 0, | ||
| final_hash: [0; 32], | ||
| }) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.