Skip to content

feat: replace NoteRequestWithRetry and sendRequestWithRetry - #210

Merged
rdlauer merged 6 commits into
mainfrom
rob-retry-removal
Oct 8, 2026
Merged

rdlauer merged 6 commits into
mainfrom
rob-retry-removal

Conversation

@rdlauer

@rdlauer rdlauer commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

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)

rdlauer and others added 6 commits October 8, 2026 13:06
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>
@rdlauer
rdlauer requested a review from tjvantoll October 8, 2026 18:31

@tjvantoll tjvantoll left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

holy crap

@rdlauer
rdlauer merged commit d5fa670 into main Oct 8, 2026
1 check passed
@rdlauer
rdlauer deleted the rob-retry-removal branch October 8, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants