Repository navigation
fix: fail closed on stored values no writer produces - #78
Conversation
- The hold check counts a Send item whose mail time is not an integer, so a corrupt item can no longer let it write closed. - Another lane's opening window end below 0 refuses the close as newer-incident-elsewhere, as one that is not an integer already does. - An email at its attempt limit that holds no claim is marked failed (errorName AttemptsSpent), so it no longer stays unsent with no error line. - The permission list renders an intrinsic action as canonical JSON, so two different intrinsics no longer merge into one entry. - Adversarial tests for these, and for the closure, pause pointer, decision, reopen payload, counter and closeability guards that held.
# Conflicts: # tracked-paths.json
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 1
Please check the settings in the CodeRabbit UI or the
|
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. |
|
@codex review |
There was a problem hiding this comment.
House review of bc8c2e4, its first house review.
The PR makes four guards fail closed on stored values no writer produces. The hold fold now counts a
Send whose mail time isn't a safe integer, isNewerElsewhere refuses a negative opening window end,
emailAttemptsSpent marks an email failed when it has used every attempt and holds no claim (logged
as AttemptsSpent), and permission snapshots render intrinsic actions as canonical JSON instead of
"[object Object]". It also adds adversarial tests, the live-run-1 example and the website's record
of processing. I checked each code change against its callers (action.ts
sendClaimed/failStrandedEmail/operatorEmails, the fixture and live event stores, permissions.ts) and
the doc's claims against the site's wrangler config, _headers and storage list. All of it is sound;
the only defect is a small test gap: the "unedited" check covers only the evidence record.
1 finding: 1 minor. It is a thread on this pull request, marked resolved once it is handled:
1. minor, test-gap packages/functions/src/live-run/failed-email-artifact.test.ts:41 The "unedited" check covers only the EVIDENCE item, not the CLOSURE, DECISION, STATE or COUNTER items the README and issue say are kept exactly as saved, a thread on its line
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour 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". |
There was a problem hiding this comment.
House review of 9dd4bd5, a re-review after bc8c2e4, review 2 of 3.
The pull request makes the close path fail closed on four stored values that no writer produces. A
Send whose mail time isn't a safe integer now counts in the hold check, another lane's window end
below zero refuses the close, an email at its attempt limit with no claim is marked failed and
logged as AttemptsSpent, and two different intrinsic IAM actions stay as two separate permission
entries. It also adds adversarial tests, the live run 1 failed-email example with a test on it, and
the website's record of processing. Earlier finding 1 is fixed: the new commit adds a SHA-256 check
over the whole saved file, so the CLOSURE, DECISION, STATE and COUNTER items are now covered too.
The hash holds on every clone because .gitattributes forces LF checkout (`* text=auto eol=lf`), and
no formatter is configured that could rewrite the file. I found no new defects in the new commits
and no unlisted critical or major problems elsewhere in the pull request.
No findings.
Not reviewed
.jscpd.json
Neither issue asks for this. It is minor supporting work that keeps the duplicate-code checker off
the new examples JSON.
tracked-paths.json
Supporting work that registers the new docs and example files. Neither issue asks for it explicitly.
Closes #76.
Closes #77.
I ran a stress pass over the close path, and four stored values got through when they should have refused. A Send item with a mail time that isn't an integer slipped past the hold check, another lane's window end below zero didn't refuse the close, an email at its attempt limit with no claim stayed unsent with no error, and two different intrinsic actions merged into one permission entry. Each of those now fails closed. The new adversarial tests cover them, plus the guards that already held.
I also added live run 1's failed operator email as an example, its incident items exactly as saved with a test that they're unedited, and the website's record of processing.
Tests pass, and the tests for the four fixes failed before them.