Skip to content

test: deflake atomic compaction telemetry contention - #407

Merged
100yenadmin merged 2 commits into
mainfrom
test/328-deflake-compaction-telemetry
Sep 4, 2026
Merged

100yenadmin merged 2 commits into
mainfrom
test/328-deflake-compaction-telemetry

Conversation

@Tosko4

@Tosko4 Tosko4 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Closes #328.

The atomic two-engine test intentionally overlaps both telemetry writers, but production is also intentionally allowed to abandon best-effort telemetry after 100 ms. Runner scheduling could therefore exercise a valid skipped sample while the test still required both increments.

This keeps the production 100 ms policy unchanged and replaces it only inside this regression with a 5 second SQLite wait. Both writers still begin together, so the test continues to prove cross-connection serialization and a final total of two.

Verification:

  • focused two-mode test: 2 passed
  • 50 consecutive low-FD focused runs: passed
  • complete telemetry file: 31 passed
  • Ruff and git diff --check clean

@Tosko4
Tosko4 requested a review from 100yenadmin as a code owner August 31, 2026 05:54
@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: 0f828c85-9397-4671-b696-acfd2d8a361f

📥 Commits

Reviewing files that changed from the base of the PR and between a84ca05 and 4143a3c.

📒 Files selected for processing (1)
  • tests/test_compaction_telemetry.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: test (3.14)
  • GitHub Check: test (3.11)
  • GitHub Check: test (3.13)
  • GitHub Check: test (3.12)
  • GitHub Check: Analyze (python)
⚠️ CI failures not shown inline (1)

GitHub Check: AI review exact-head: Exact-head AI review

Conclusion: failure

View job details

Protected base changed; fresh exact-base/head review receipts are required.
🔇 Additional comments (1)
tests/test_compaction_telemetry.py (1)

3-3: LGTM!

Also applies to: 12-12, 233-253


📝 Summary

Priority Level: P4/NIT

No correctness, reliability, security, or regression issues identified.

The test-only override applies a 5-second SQLite wait while asserting the production timeout remains 100 ms. This preserves production behavior and makes concurrent telemetry increments deterministic.

Confidence: 96%

Walkthrough

The atomic compaction telemetry test now patches SQLite busy-timeout handling. It preserves the production 100 ms timeout assertion while using a 5000 ms wait during the test to serialize overlapping writers.

Changes

Compaction telemetry test

Layer / File(s) Summary
Deterministic concurrent writer handling
tests/test_compaction_telemetry.py
The test patches _temporary_sqlite_busy_timeout, verifies the 100 ms production timeout, and delegates to a 5000 ms runtime wait for deterministic concurrent writes.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 4143a

This change makes the compaction telemetry concurrency test reliably validate two serialized updates without changing the production 100 ms contention policy. The updated test coverage is ready to merge.

Suggested reviewers: stephenschoettler

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the test-only change: deflaking atomic compaction telemetry contention. Confidence: 99%.
Description check ✅ Passed The description accurately explains the contention failure, the test-only 5-second SQLite wait, preserved production behavior, and verification results. Confidence: 99%.
Linked Issues check ✅ Passed The change satisfies issue #328 by making the regression deterministic, preserving the production 100 ms policy, retaining simultaneous cross-connection atomicity coverage, and avoiding runtime or RC2…
Out of Scope Changes check ✅ Passed The pull request changes only the targeted regression test and does not alter production telemetry behavior or introduce unrelated scope. Confidence: 99%.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/328-deflake-compaction-telemetry

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Tosko4 Tosko4 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evaos-code-review-bot review exact head f16cd94d5c4bf026da799fb1c3c8721de4b510b2 against base 2e17bbc89f05f0edd01aa9e459915be231e76181. This is the test-only SQLite contention deflake; there are no review threads and ordinary exact-head CI is green.

@Tosko4

Tosko4 commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

@evaos-code-review-bot please review exact head f16cd94d5c4bf026da799fb1c3c8721de4b510b2 against current base 2e17bbc89f05f0edd01aa9e459915be231e76181. Ordinary exact-head CI is green and there are zero unresolved review threads.

@Tosko4

Tosko4 commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator Author

@100yenadmin please review exact head f16cd94 against current base 2e17bbc. Ordinary exact-head CI is green and there are zero unresolved review threads.

@100yenadmin
100yenadmin merged commit c98cb6a into main Sep 4, 2026
15 checks passed
@100yenadmin
100yenadmin deleted the test/328-deflake-compaction-telemetry branch September 4, 2026 18:58
@100yenadmin

Copy link
Copy Markdown
Member

Merge receipt — landed as c98cb6a2 (merge commit) via the two-lane exact-head receipt gate. Acceptance lane claude-fable-orchestrator 97 (CI green at the exact head, maintainer verification, 0 unresolved threads; see the review comments above). Adversarial lane opus-fast-worker 96/0 — the first independent review plus a second independent confirm reviewer who reproduced its strongest refutations and added one of its own (details in the session-notes review logs referenced by the receipt digest). Receipt head = reviewed head + the update-branch merge commit only; PR diff unchanged.

100yenadmin pushed a commit that referenced this pull request Sep 5, 2026
…LOG header scope

Review findings (evaos P3 + cross-model r1): the summary said three product
fixes where #407 is test-only; #412 also recorded the #155 refactor row
(ledger entry only) so the notes no longer claim no new ledger row; the
CHANGELOG header now scopes the curated-notes claim to tags from v0.21.0-rc1
onward, which is where the notes directory actually starts.
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.

test: deflake atomic compaction telemetry check under fail-fast contention

2 participants