Skip to content

test: close the deferred test-hardening items (F7-07, F7-09, F1-08)#95

Merged
lesnik512 merged 1 commit into
mainfrom
test/f-deferred-hardening
Jun 14, 2026
Merged

test: close the deferred test-hardening items (F7-07, F7-09, F1-08)#95
lesnik512 merged 1 commit into
mainfrom
test/f-deferred-hardening

Conversation

@lesnik512

Copy link
Copy Markdown
Member

What

Final tail PR (6 of 6) — test / test-infra only, no runtime behavior change. Closes the three items deferred from #91.

  • F7-07 — the loop-mode NOTIFY-wakeup tests used min=max=5.0 with a 2s budget (only ~2.5× margin, so load/jitter could let a poll deliver and the test pass even with NOTIFY broken). Bumped the poll interval to 30.0 (15× margin, still under the 60s lease_ttl so no factory warning) — the poll path provably can't meet the 2s budget, so a broken _notify_event wakeup now fails the test instead of flaking it.
  • F7-09 — tightened loose telemetry assertions:
    • OTel middleware: exact counts (== 1, not >= 1 / any()); the OTel acked-histogram test now also asserts messaging.outbox.status == "acked".
    • Prometheus middleware: sum matching samples instead of max(...), so a duplicate-series / double-emit regression pushes the total past 1.0 and fails (the max fold hid it).
  • F1-08 — extract _claim_fake_row, shared by FakeOutboxClient.fetch and _sync_dispatch, so the lease + deliveries_count increment (the max_deliveries boundary) runs on one path. Note: routing _sync_dispatch through fetch verbatim (as the finding's headline suggested) would gate on next_attempt_at and break sync-mode's documented "future-dated rows fire immediately" — so I shared only the claim mechanics; eligibility gating stays in fetch.

Verification

  • just test516 passed, 100% coverage
  • just lint clean (ruff + ty)

Pass-3 audit: fully closed

With this, every confirmed finding from the 2026-06-14 pass-3 deep audit is resolved, documented, or consciously dropped across PRs #85#95. The Tail disposition ledger in planning/audits/2026-06-14-deep-audit-pass3-findings.md is the authoritative record.

🤖 Generated with Claude Code

Final tail PR — test/test-infra only, no runtime behavior change.

- F7-07: the loop-mode NOTIFY-wakeup tests used min=max=5.0 with a 2s budget (2.5x
  margin — load/jitter could let a poll deliver). Bumped to 30.0 (15x margin, still
  under the 60s lease_ttl so no factory warning), so the poll path provably can't meet
  the 2s budget: a broken NOTIFY now fails the test instead of flaking it.
- F7-09: tightened loose telemetry assertions. OTel middleware uses exact counts
  (== 1, not >= 1 / any()); the OTel acked-histogram test now also asserts
  messaging.outbox.status == "acked". Prometheus middleware tests SUM matching samples
  instead of max(...), so a duplicate-series/double-emit regression pushes past 1.0
  and fails.
- F1-08: extract _claim_fake_row, shared by FakeOutboxClient.fetch and _sync_dispatch,
  so the lease + deliveries_count increment (the max_deliveries boundary) runs on one
  path. Eligibility gating (next_attempt_at <= now) stays in fetch only — sync mode
  deliberately fires future-dated rows immediately, so routing it through fetch verbatim
  would have broken that; sharing just the claim mechanics preserves it.

just test -> 516 passed, 100% coverage; just lint clean. Findings doc: pass-3 fully closed.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@lesnik512 lesnik512 merged commit ad6bd4a into main Jun 14, 2026
3 checks passed
@lesnik512 lesnik512 deleted the test/f-deferred-hardening branch June 14, 2026 14:26
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