GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(id): F12.13 replication wire contract + crypto primitives (#806 phase 1) by dezren39 · Pull Request #4447 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit details
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: f331d57771
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| return None; | ||
| } | ||
| let payload = frame.strip_prefix(REPLICATION_FRAME_MAGIC)?; | ||
| postcard::from_bytes::<Self>(payload).ok() |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reject trailing bytes when decoding signed frames
If bytes are appended to an otherwise valid signed frame, this decoder still accepts it: postcard::from_bytes ignores unused input. Signature verification then succeeds because it reserializes only the decoded envelope, but accept computes last_frame_digest over the entire received buffer, including the unsigned suffix. Consequently, the modified frame advances receiver state and causes the writer's next legitimate frame to fail with FrameChainMismatch. Use take_from_bytes and require an empty remainder so modified frames are refused before state advances.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 395a2b4: decode_frame now uses postcard::take_from_bytes and refuses any non-empty remainder, so a frame with an appended unsigned suffix no longer decodes (regression test: trailing_bytes_and_undecodable_entries_are_refused).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| for entry in payload.split_inclusive(|byte| *byte == b'\n') { | ||
| cursor = advance_cursor(cursor, entry); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Decode journal entries before advancing the verified cursor
If the pinned source signs a payload such as b"not-json\n", the tracker accepts it and subsequently accepts a terminal committing its cursor: this loop treats every newline-terminated byte sequence as a valid journal entry. That contradicts the tracker's entry-decoding guarantee and returns malformed journal data in an AcceptedFrame even though the existing journal restore path cannot decode it. Validate each line as a JournalEntry before advancing verified state, returning MalformedPayload without changing the tracker when decoding fails.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 395a2b4: chain_payload now decodes every payload line as a JournalEntry (serde_json) before advancing the cursor and returns MalformedPayload without state change otherwise — a signed-but-undecodable payload can no longer move the verified cursor (same regression test covers it).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Codex findings disposition (task 5832, lane code-j): both P2 findings are accepted as valid — (1) trailing-bytes rejection on signed-frame decode, (2) JournalEntry decode before cursor advance. Fixes are parked, not waived: the laptop load gate for this task (sustained load < 20; currently ~117 with ~71 rustc processes) blocks the edit+test cycle this shift. Task 5832 is parked with these findings as the resume condition; the PR will not be merged past them silently. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…cation contract Codex review findings on PR #4447: (1) decode_frame used postcard::from_bytes, which ignores trailing bytes — an unsigned suffix would desynchronize the frame chain; now take_from_bytes with an empty-remainder requirement. (2) chain_payload treated every newline-terminated byte sequence as an entry; each line now must decode as a JournalEntry before the verified cursor advances. Regression tests cover both.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.