feat: TTD Protocol & Core Hardening (PR 1)#268
Conversation
This commit establishes the foundation for Time Travel Debugging by: - Porting EINT v2 and TTDR v2 codecs with high-integrity headers. - Adding AtomWrite provenance tracking to warp-core. - Implementing TTD-aware Merkle commitments (commit_hash v2). - Adding TruthSink::clear_session for memory safety. - Integrating protocol integrity drills and fuzzer tests. Part of PR 1 in the TTD incremental integration plan.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5bf2d757b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let mut header = frame.header; | ||
| header.parent_count = frame.parent_hashes.len() as u16; | ||
| header.channel_count = frame.channel_digests.len() as u16; |
There was a problem hiding this comment.
Reject reserved receipt mode before encoding TTDR frames
encode_ttdr_v2 accepts headers whose flags encode ReceiptMode::Reserved, but decode_ttdr_v2 rejects that mode in TtdrHeader::from_bytes, so a frame produced by this encoder can be undecodable by the paired decoder when callers accidentally set mode 3. This creates a self-incompatible wire path for a publicly exposed enum variant and should fail fast during encoding instead of emitting an invalid frame.
Useful? React with 👍 / 👎.
| let count = self.entry_hashes.len() as u32; | ||
| out.extend_from_slice(&count.to_le_bytes()); |
There was a problem hiding this comment.
Enforce channel entry-hash cap during TTDR encoding
The encoder writes entry_hashes.len() directly as a u32 without enforcing the decoder's MAX_ENTRIES_PER_CHANNEL limit (65,536), so frames with more entries are emitted successfully but are guaranteed to be rejected by decode_ttdr_v2 with TooManyEntries. This breaks round-trip compatibility for large-but-possible inputs and should be validated on encode to prevent generating invalid wire data.
Useful? React with 👍 / 👎.
- Reject ReceiptMode::Reserved during encoding to prevent undecodable frames. - Enforce MAX_ENTRIES_PER_CHANNEL cap during encoding. - Added regression tests for both cases.
|
@coderabbitai review please 🥕 |
|
Initiating FULL ANNIHILATION-GRADE INSPECTION of your Time Travel Debugging Protocol & Core Hardening implementation. Preparing to scrutinize:
Every. Single. Byte. Will. Be. Judged. Deploying review now... 🧠 Learnings used✅ Actions performedReview triggered.
|
|
@chatgpt-codex-connector both issues resolved:
|
|
You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard. |
Establish the high-integrity foundation for Time Travel Debugging.
Goal
Implement bit-exact wire formats and core provenance records to enable deterministic worldline replay and 'Show Me Why' debugging features.
Changes
Verification