From ee94487f49d7ad94f520af071089b7a4fe92084d Mon Sep 17 00:00:00 2001 From: Bretton Date: Fri, 7 Aug 2026 22:40:06 -0700 Subject: [PATCH] fix(e2e): widen the parent-post wait's poll cadence past the limiter cliff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TestCommentIngestion's parent-post index wait ran at the default 250ms poll, whose arithmetic gives an effective ~25s ceiling (100/min global bucket) — far under the 45s contractBudget — and the wait was measured at 23.97s on a QUIET stack. Under full-suite make ci load it crossed the cliff 5 consecutive runs (both branches; predates task 4). At 600ms the whole budget fits inside the bucket, restoring the doc's own invariant that a 429 means the wait was truly hopeless. Co-Authored-By: Claude Fable 5 --- tests/e2e/comment_contract_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/e2e/comment_contract_test.go b/tests/e2e/comment_contract_test.go index b5bd65f..bfa39e0 100644 --- a/tests/e2e/comment_contract_test.go +++ b/tests/e2e/comment_contract_test.go @@ -273,13 +273,23 @@ func indexedPost(t *testing.T, p *pipeline, community provisionedCommunity, auth postRecord(community.DID, authorDID, title, "a post to hang comments on")) uri := postURI(community.DID, rkey) + // 600ms, not the default 250ms: this wait legitimately runs LONG. Under a + // full-suite `make ci` the posts consumer is draining every parallel + // contract's records at once, and this parent-post index was measured at + // 23.97s on a QUIET stack — right at the ~25s cliff where 250ms polling + // exhausts the global 100/minute bucket and the wait dies as a 429 with + // 20 seconds of budget still unspent (observed 5 consecutive CI runs, + // 2026-08-08). At 600ms the full 45s contractBudget fits inside the + // bucket (75 polls < 100), so the wait fails on the budget or not at all — + // which is what contractPollInterval's own doc says a 429 here should + // mean. Discovery latency on a healthy fast run costs ~350ms extra. p.Await(t, "the post these comments hang off to be indexed", func() (bool, error) { view, err := p.Post(context.Background(), uri) if err != nil { return false, err } return !view.NotFound, nil - }) + }, testkit.WithPollInterval(600*time.Millisecond)) return strongRef{URI: uri, CID: record.CID} } -- 2.54.0