Skip to content

test(hosts): cover the renewal loop and the validity deadline - #93

Merged
wstein merged 3 commits into
mainfrom
test/84-renewal-loop-tests
Oct 16, 2026
Merged

wstein merged 3 commits into
mainfrom
test/84-renewal-loop-tests

Conversation

@wstein

@wstein wstein commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Implements #84: tests for the renewal loop and the session validity deadline.

  • 93ed7ad: factor the session deadline into a pure sessionDeadline function (no behaviour change).
  • 07ac5c7: loopback TLS/WebSocket tests for renewal success, renewal failure on a valid identity, reload failure after renewal, and a real blocked read ended at the deadline. Renames the stub-only watchdog test to TestWatchValidityCancelsOnInvalidIdentity.

Each new test fails without the code it protects. The reload-failure case stubs the renewal step instead of calling the server.

Known gaps (non-blocking): the cancel()/CloseNow() path on non-elapsed invalidity is not tested through session; real client-certificate mTLS is not exercised.

Review: CLEAR (Opus 5.5) on 07ac5c7. make check on this head is pending. Stacked on the pilot PR (H51:b).

🤖 Generated with Claude Code

@wstein

wstein commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Review CLEAR on 07ac5c7 (Opus 5.5). Restacked onto pilot 75526bb (CI boundary fix); git range-diff shows every commit identical, so the review carries over. make check on this head: pending.

@wstein
wstein force-pushed the pilot/installable-pilot-pr branch from 75526bb to 7656115 Compare October 16, 2026 10:42
@wstein
wstein force-pushed the test/84-renewal-loop-tests branch from 509efb3 to 33804a3 Compare October 16, 2026 10:42
@wstein

wstein commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Rebased onto main 54a002f after #95 merged; git range-diff shows every patch identical (for #83 only one context line in docs/index.md differs), so the review carries to 33804a3. make check on this head: pending.

@wstein
wstein marked this pull request as ready for review October 16, 2026 10:55
@wstein

wstein commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Ready per owner: review CLEAR on this head; local make check replaced by one final check on main after the stack merges (owner rule).

@wstein
wstein force-pushed the pilot/installable-pilot-pr branch from 7656115 to 866e46c Compare October 16, 2026 11:19
@wstein
wstein force-pushed the test/84-renewal-loop-tests branch from 33804a3 to 0ce831f Compare October 16, 2026 11:19
@wstein
wstein marked this pull request as draft October 16, 2026 11:20
@wstein
wstein marked this pull request as ready for review October 16, 2026 11:21
@wstein

wstein commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Nits fixed per owner (H66:b) in one comment-only commit. Review CLEAR on 0ce831f (Opus 5.5). The remaining nit (assert connected in the blocked-read test) is covered by #98's a793f2e.

@wstein
wstein force-pushed the pilot/installable-pilot-pr branch from 866e46c to 2235c20 Compare October 16, 2026 11:31
Base automatically changed from pilot/installable-pilot-pr to main October 16, 2026 11:31
wstein and others added 3 commits October 16, 2026 13:32
The retry clamp in session could only be exercised through a live
socket. A pure sessionDeadline lets tests pin each branch directly.
No behaviour change.

Refs: #84
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Run's renewal branches and the clamp that bounds a session after a
failed renewal had no direct tests; deleting the clamp still passed.
Drive Run against a loopback TLS/WebSocket server for renewal success,
renewal failure on a valid identity and reload failure, and end a
blocked real ws.Read at the deadline. Rename the watchValidity test to
match what it proves and register the new IDs.

Refs: #84
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The reload-failure test keeps its server only for the identity fixture,
and the blocked-read test proves the socket close, not a direct
CloseNow call, since context cancel also closes it.

Refs: #84
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@wstein
wstein force-pushed the test/84-renewal-loop-tests branch from 0ce831f to 6189c0a Compare October 16, 2026 11:32
@wstein

wstein commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Restacked onto main e82167b after #96/#91 merged; range-diff identical, review carries to 6189c0a.

@wstein
wstein merged commit a5656c1 into main Oct 16, 2026
3 checks passed
@wstein
wstein deleted the test/84-renewal-loop-tests branch October 16, 2026 11:39
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.

1 participant