Repository navigation
feat: replace NoteRequestWithRetry and sendRequestWithRetry - #210
Merged
Merged
Conversation
note-c already retries a request that fails with an I/O error, and its first transaction after boot waits for Notecard to answer an I2C reset, so the sendRequestWithRetry() wrapper and the "Notecard may not be ready yet" comment are unnecessary. Applied to all 25 copies of cx_sleep.h and to 76's host_sleep.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Swap sendRequestWithRetry/requestAndResponseWithRetry for the plain calls and drop the timeout constants that only fed them. - Remove the card.version warm-up/ping requests (56, 63, 76, 78, 79, 81, 85) and the boot-time retry loops and helpers whose only purpose was the cold-boot I2C race (60, 61, 66, 69, 70, 71, 82, 83, 87). - Keep retries that run on a later wake; drop only their race wording. note-c's ordinary request path already retries I/O errors, and the first transaction after boot waits ~8-10 s for Notecard, so these added nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elerators Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JGetString() returns "" rather than NULL when a field is missing, so 83's `if (rsp && JGetString(rsp, "err"))` threw away every env.get reply (environment variable overrides were never applied) and 82's `if (!JGetString(rsp, "err"))` never read the card.time epoch. Also drop 82's 3-try card.time loop; note-c already retries I/O errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56's env.get retry, 60's three tries per note.template, 63's three tries in loadFenceFromFlash() (its not-found and malformed-record handling is unchanged) and 83's five tries in sendAlert() were all justified by transient I2C or Notecard-readiness hiccups, which note-c's request path already retries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Accelerators 09, 18 and 37 bundle a note-c copy that predates note-c's automatic I/O retries (added 2023-06), so the plain NoteRequest() swap in the previous archive commit removed their only recovery from a transient startup failure. Restore the original calls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem Context
Changes
Screenshot (if applicable)
Testing
Unit / integration / e2e tests?
Steps to test manually?
Any other sorts of testing notes to include?
Any other related PRs
Ticket(s)