Repository navigation
fix(egress-proxy): publish activity after quiet at once; status states its bounds (#1528) - #1548
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…s its bounds (#1528) spored's ActivityPublisher now writes the first new activity immediately once the published value is older than the throttle window, and throttles only the writes that follow. spawn egress-proxy status reports the tag as a lower bound (last activity at or after, expires no earlier than) and shows the tag's age; JSON gains expires_at_is_lower_bound and publish_interval_seconds. Co-Authored-By: Claude <[email protected]>
…st (#1528) Co-Authored-By: Claude <[email protected]>
…y test (#1528) Co-Authored-By: Claude <[email protected]>
scttfrdmn
force-pushed
the
fix/1528-egress-activity-edge
branch
from
November 6, 2026 18:02
d8a1157 to
0ca9382
Compare
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.
Fixes #1528
spawn egress-proxy statusreadspawn:egress-proxy-last-activityas if it were exact. spored rewrites that tag at most every 10 minutes (egressproxy.ActivityPublisher), so it can trail the proxy's real last activity, and the countdown erred toward "sooner". In the live case, status at 23:42 said "expires in 8m" (about 23:51), and spored terminated the proxy at 23:55:24, 15 minutes after its last traffic at 23:39:58. Expiry itself was always correct. This PR changes both halves.(a) Publisher rule (changes spored)
pkg/egressproxy/activitytag.goActivityPublisher.Due:ActivityPublishEvery, 10m), and the previous attempt was the write that published it, a new value is due on the tick that sees it, even within 10 minutes of the last attempt.What the rule guarantees, checked by a 20,000-tick randomized property test:
Honest limit: on the issue's own timeline, spored's first write (23:39:46) carried the launch time 23:36:25. The tag now updates at 23:46:46, when that value turns 10 minutes old, rather than at 23:49:46. Before then it still trails by up to its own age, and the status wording in (b) covers that window.
Rollout: this is a spored change. It reaches a proxy only after a release, when a proxy is launched, or upgraded with
spawn egress-proxy upgrade, on that release. Proxies that are already running keep the old rule, and the (b) wording is correct for them as well.(b)
statusstates its boundsText, before:
After:
Other expiry lines:
expires at its deadline, in 3m. The deadline is exact.expires at its deadline, passed 2m agoexpires no earlier than <t> (idle period 15m; by the tag it passed 2m ago, but spored ends it on its own clock, from its real last activity)--help(anddocs-gen/egress-proxy.md) gains a paragraph on this.JSON: every existing key is kept, and the key-set test pins two new ones:
activity.expires_at_is_lower_bound: true whenexpires_atis the idle expiry, false when it is the deadline or unknown.activity.publish_interval_seconds: 600, or null when activity is unknown.Tests
pkg/egressproxy/activitytag_test.go:23:50:46 00:00:46 00:10:46 00:20:46cmd/egress_proxy_test.go: rendering for idle expiry, deadline first, idle expiry passed and deadline passed, with the issue's 23:42 numbers. Status text and JSON key-set pins are updated.Revert gate
origin/main, tests kept:Checks (hermetic: AWS env stripped)
make check: passesgo test ./...: passeslambda/ttl-reapergo test ./...: passesmake test-e2e-tier0: passessemgrep scan --config=auto --erroron the changed files: clean. The property test uses a fixed-seed LCG, notmath/rand.make gen-docs:docs-gen/egress-proxy.mdregenerated, andcheck-docspassesmake api-snapshot: unchanged, because the new fields are unexportedNo Lambda change.
🤖 Generated with Claude Code