Skip to content

docs(architecture): describe the renewal check at stream establishment and on each heartbeat - #254

Merged
avi-papineni merged 1 commit into
mainfrom
docs/architecture-renewal-check
Nov 24, 2026
Merged

avi-papineni merged 1 commit into
mainfrom
docs/architecture-renewal-check

Conversation

@avi-papineni

Copy link
Copy Markdown
Contributor

ARCHITECTURE.md §5 described the agent's renewal timer and its two clocks, but not the wall-clock check added in #244 and recorded in ADR-0016's 2026-11-10 amendment. The automated ADR review on #244 pointed this out as an advisory finding, and it merged without the line.

This adds it in the two places §5 describes renewal:

  • the sync daemon paragraph now says the daemon reads the wall clock against the renewal point when the stream is established and on each heartbeat, renews at once if the point has passed, sends nothing of its own for the check, and never moves the schedule;
  • the "Renewal" item of the agent's loops names the check beside the timer.

Documentation only. No behavior changes; v0.5.2 already ships the behavior described.


Generated by Claude Code

…each heartbeat

ARCHITECTURE.md described the renewal timer and its two clocks but not
the wall-clock check that #244 added and ADR-0016's 2026-11-10 amendment
records, so the document was out of step with the decision it describes.
Section 5 now says what the daemon does when a renewal point passes while
its timer was not running.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

No ADR contradictions found (diff-anchored review — the diff touches only ARCHITECTURE.md, not docs/adr/ or CLAUDE.md).

Scope

The PR adds two sentences to ARCHITECTURE.md §5 ("Agent") describing the wall-clock check added to the renewal timer, to catch it up with ADR-0016's 2026-11-10 amendment ("a renewal point that passes while the host is suspended"). I read ADR-0016 in full (the amended decision 4 and its 2026-11-10 amendment note) and the surrounding ARCHITECTURE.md §5/§6 text; no other ADR bears on this change.

Content check

  • The sync-daemon paragraph addition — "A timer does not run while a host is suspended or its VM paused, so the daemon also reads the wall clock against the renewal point whenever the stream is established and on each heartbeat, and renews at once if the point has passed; that check sends nothing of its own and never moves the schedule." — tracks the ADR-0016 amendment: "the daemon compares the wall clock with it when its sync stream is established and on each heartbeat... a wait whose instant has passed ends at once, as if its timer had fired. The comparison sends nothing and adds no request or polling... never moves the renewal point or re-rolls its jitter."
  • "sends nothing of its own" correctly keeps this inside CLAUDE.md's no-polling rule (ADR-0002 as amended), which the ADR text itself cites for the same reason.
  • The "Renewal" item update (§5.4) is a consistent cross-reference to the same check.
  • No other hard rule is implicated: no SQL/ORM, no firewall/nftables change, no proto change, no cert/identity change, no vocabulary or origin-story issue, no generated file touched, no Makefile change.

Minor note (not a contradiction, no action required)

ADR-0016's amendment states the wall-clock check applies to "every wait the daemon schedules, the renewal point and each retry" — i.e. a pending retry's backoff wait is also compared against the wall clock, not only the initial two-thirds-mark renewal point. The new ARCHITECTURE.md sentence names only "the renewal point," so a reader could take the retry case as uncovered. This doesn't contradict the ADR and doesn't block anything — flagging it only as the kind of narrowing a future amendment pass might want to pick up, the same way this PR picked up the gap left by #244.

No dangling references introduced (the ADR-0016 as amended citation already in the surrounding text is unchanged and valid), and no other document is left inconsistent by this change.

@avi-papineni
avi-papineni merged commit 69a81d7 into main Nov 24, 2026
13 checks passed
@avi-papineni
avi-papineni deleted the docs/architecture-renewal-check branch November 24, 2026 23:41
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