Skip to content

test: stabilize ingestion interrupt timing - #307

Merged
Sinity merged 1 commit into
masterfrom
feature/test/stabilize-ingestion-interrupts
Apr 21, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/test/stabilize-ingestion-interrupts

Conversation

@Sinity

@Sinity Sinity commented Apr 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Replace fixed sleep timing in the interrupted-ingestion integration test with a wait for persisted message rows.
  • Reuse a small helper to finish or kill interrupted subprocesses consistently.

Problem

  • Python 3.12 CI exposed a timing race in tests/integration/test_ingestion_interrupts.py: the test sent SIGINT after a fixed delay and then assumed the SQLite database had already been created.
  • Slow startup or scheduler contention can make that assertion fail before the pipeline has reached persistence, even though the production code is unrelated.

Solution

  • Poll the isolated SQLite database until the messages table contains persisted rows before sending SIGINT.
  • Preserve the corruption/resume contract while removing the startup-speed assumption.

Verification

  • ruff check tests/integration/test_ingestion_interrupts.py
  • mypy tests/integration/test_ingestion_interrupts.py
  • pytest -q tests/integration/test_ingestion_interrupts.py
  • git push hook: devtools verify --quick

Ref #300.

@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 6 minutes and 6 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 6 minutes and 6 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8a800627-ab67-4395-b64c-690a5d05cae2

📥 Commits

Reviewing files that changed from the base of the PR and between bb62a7d and 5dacec2.

📒 Files selected for processing (1)
  • tests/integration/test_ingestion_interrupts.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/test/stabilize-ingestion-interrupts

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 and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5dacec2791

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Sinity
Sinity merged commit eb46f2b into master Apr 21, 2026
13 of 15 checks passed
@Sinity
Sinity deleted the feature/test/stabilize-ingestion-interrupts branch April 21, 2026 16:49
Sinity added a commit that referenced this pull request Apr 22, 2026
## Summary
- Replace fixed sleep timing in the interrupted-ingestion integration test with a wait for persisted message rows.
- Reuse a small helper to finish or kill interrupted subprocesses consistently.

## Problem
- Python 3.12 CI exposed a timing race in tests/integration/test_ingestion_interrupts.py: the test sent SIGINT after a fixed delay and then assumed the SQLite database had already been created.
- Slow startup or scheduler contention can make that assertion fail before the pipeline has reached persistence, even though the production code is unrelated.

## Solution
- Poll the isolated SQLite database until the messages table contains persisted rows before sending SIGINT.
- Preserve the corruption/resume contract while removing the startup-speed assumption.

## Verification
- ruff check tests/integration/test_ingestion_interrupts.py
- mypy tests/integration/test_ingestion_interrupts.py
- pytest -q tests/integration/test_ingestion_interrupts.py
- git push hook: devtools verify --quick

Ref #300.
Sinity added a commit that referenced this pull request Apr 22, 2026
Python 3.12 CI exposed a timing race in
`test_ingestion_interrupts.py`: the test sent SIGINT after a fixed
delay and then assumed the SQLite database had already been
created. Slow startup or scheduler contention could make that
assertion fail before the pipeline reached persistence, even though
the production code was unrelated.

Replaces fixed sleep timing with a poll of the isolated SQLite
database until the messages table contains persisted rows before
sending SIGINT. Reuses a small helper to finish or kill interrupted
subprocesses consistently. Preserves the corruption/resume contract
while removing the startup-speed assumption.

Verification: ruff + mypy + pytest over the ingestion-interrupts
test; devtools verify --quick green.

Ref #300
Sinity added a commit that referenced this pull request Apr 22, 2026
Python 3.12 CI exposed a timing race in
`test_ingestion_interrupts.py`: the test sent SIGINT after a fixed
delay and then assumed the SQLite database had already been
created. Slow startup or scheduler contention could make that
assertion fail before the pipeline reached persistence, even though
the production code was unrelated.

Replaces fixed sleep timing with a poll of the isolated SQLite
database until the messages table contains persisted rows before
sending SIGINT. Reuses a small helper to finish or kill interrupted
subprocesses consistently. Preserves the corruption/resume contract
while removing the startup-speed assumption.

Verification: ruff + mypy + pytest over the ingestion-interrupts
test; devtools verify --quick green.

Ref #300
Sinity added a commit that referenced this pull request Apr 22, 2026
Python 3.12 CI exposed a timing race in
`test_ingestion_interrupts.py`: the test sent SIGINT after a fixed
delay and then assumed the SQLite database had already been
created. Slow startup or scheduler contention could make that
assertion fail before the pipeline reached persistence, even though
the production code was unrelated.

Replaces fixed sleep timing with a poll of the isolated SQLite
database until the messages table contains persisted rows before
sending SIGINT. Reuses a small helper to finish or kill interrupted
subprocesses consistently. Preserves the corruption/resume contract
while removing the startup-speed assumption.

Verification: ruff + mypy + pytest over the ingestion-interrupts
test; devtools verify --quick green.

Ref #300
@Sinity

Sinity commented Apr 28, 2026

Copy link
Copy Markdown
Owner Author

🤖 Post-hoc audit note: this PR received bot review feedback verified against current HEAD as part of #544. 1 finding(s) confirmed still present → tracked in #550.

@Sinity
Sinity requested review from Copilot and removed request for Copilot May 1, 2026 00:43
@Sinity
Sinity removed the request for review from Copilot May 1, 2026 02:15
@Sinity

Sinity commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

Only the rows listed above are dispositioned. Held findings remain open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant