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

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) <noreply@anthropic.com>
@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
lesnik512 added a commit that referenced this pull request Sep 5, 2026
…e/ (#159)

The spec for a change is now its PR body. .github/PULL_REQUEST_TEMPLATE.md carries
the shape and is reviewed with the diff, so there is no change file and no lane to
pick. Two things outlive the PR, one home each: a rejected alternative becomes an
ADR under docs/adr/, and unscheduled work becomes a GitHub issue.

architecture/ was 12 capability pages restating what faststream_outbox/ already
says. Its invariants were already executable: 32 existing tests now carry an
INVARIANT: docstring -- the claim on line 1, what breaks it in the second
paragraph -- and only one test is genuinely new. Engine ownership was asserted in
CLAUDE.md and pinned by nothing, so a broker that disposed the caller's engine
would have passed the whole suite. tests/test_invariant_census.py enforces the
docstring shape.

planning/ carried forward only its decision records, cut in review from five to
two: the metrics-recorder record and free-threading (a merge of two). The
doc-code-fence record declined a CI feature never built; the conn-union record's
contract already lives in AbstractOutboxClient's docstring. The
BrokerUsecase-invariance rationale from planning/lint-suppressions.md is now a
one-line comment at each suppression site. The audits were all closed (PRs
#61-#95). The open deferred item is #158; the SQLAlchemy cyext workaround is #160.

CONTEXT.md is written: 16 terms, each listed only because there is a synonym to
reject. CLAUDE.md is compressed against its own admission check.

Curated release notes go with the planning tree -- release.yml falls back to
GitHub's generated notes.
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