Skip to content

sites: one publish plane, retried only when the refusal can pass - #305

Merged
shreeve merged 1 commit into
mainfrom
sites-publish-plane
Sep 13, 2026
Merged

shreeve merged 1 commit into
mainfrom
sites-publish-plane

Conversation

@shreeve

@shreeve shreeve commented Sep 13, 2026

Copy link
Copy Markdown
Owner

The manager carried three copies of the same publish-and-retry loop (change, touched, and reload frames), and each retried forever on any non-OK answer, so a permanent refusal (409: no site of this app has a hub) hammered the edge once a second and filled the log for the life of the manager.

One publish(label, frame) helper now serves all three, and the answer decides the retry:

  • edge unreachable, 5xx, or 429: retry with backoff, as before
  • 404: the edge no longer knows this registration; re-register at once (the heartbeat's own path, run now instead of on its tick) and send the frame under the new id rather than lose it
  • anything else (409, or 400 for a malformed frame): the edge's verdict about the app, warned once with its detail, after which frames are dropped quietly until the app registers again

A new reloads test pins all three: the 404 re-registers before the frame lands, the 409 warns exactly once and silences later frames, and a fresh registration lifts the silence. Against the consolidation without the 404 path, the test fails as expected: the frame that met the 404 was lost even though the heartbeat re-registered.

Sites lane: 15 suites, 141 tests passing.

The manager carried three copies of the same publish-and-retry loop —
change, touched and reload frames — and each retried forever on any
non-OK answer, so a permanent refusal (409: no site of this app has a
hub) hammered the edge once a second and filled the log for the life
of the manager.

One publish helper now serves all three, and the answer decides the
retry: the edge unreachable, 5xx or 429 retry with backoff as before;
404 means the edge no longer knows this registration, so the manager
re-registers at once (the heartbeat's own path, run now instead of on
its tick) and sends the frame under the new id rather than lose it;
any other answer is the edge's verdict about the app — 409, or 400 for
a malformed frame — warned once, after which frames are dropped
quietly until the app registers again.

A reloads test pins all three: the 404 re-registers before the frame
lands, the 409 warns once and silences later frames, and a fresh
registration lifts the silence.
@shreeve
shreeve merged commit 67664e7 into main Sep 13, 2026
2 checks passed
@shreeve
shreeve deleted the sites-publish-plane branch September 13, 2026 05:54
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