docs: finalize chore_studies_post_arq_spy_fixture (PR #476 merged)#477
Conversation
Move the feature folder → implemented_features/2026_06_05_studies_post_ arq_spy_fixture/ and close out the lifecycle after PR #476 squash-merged (ed85d84). - pipeline_status.md: Implementation → Complete + Release: mvp2 marker. - implementation_plan.md: Status → Complete (PR #476). - state.md: prepend the merge one-liner (drop the 6th → older-entries line), flip Current branch / In flight / Queued to the 3-chore queue with #1 shipped, #2 next. - state_history.md: full reasoning entry (fixture + 13 assertions + Gemini asyncio-marker adjudication). - Regenerated dashboards + website/docs/roadmap.md (folder move reclassifies the chore as shipped). No tracking issue for this slug. No phase*_idea.md (single-phase). Alembic head unchanged (0023). Signed-off-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates various project dashboards, roadmaps, and state documentation files to mark the chore_studies_post_arq_spy_fixture task as completed and shipped. The changes adjust progress metrics, update the dependency graphs, and add detailed historical context for the newly implemented arq_pool_spy integration fixture. Feedback on the changes includes a correction for an unmatched parenthesis and formatting in the state_history.md file.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| **What shipped.** The studies-POST integration tests asserted "no studies row inserted" on rejection but couldn't prove the handler also didn't *enqueue* `start_study`, and the success tests couldn't prove the spy (not the real Redis pool) received the enqueue. This adds an opt-in `arq_pool_spy` fixture that closes both gaps. **Test-infra only — zero production diff, no migration** (Alembic head stays `0023`). 2 stories / 1 epic. First of a 3-chore afternoon queue. | ||
|
|
||
| **The fixture (Story 1.1, `integration/conftest.py`).** `SpyArqPool.enqueue_job` records each call as a flattened `(name, *args)` tuple (so the handler's `enqueue_job("start_study", study_id)` records `("start_study", study_id)`) and returns a truthy sentinel mirroring `ArqRedis.enqueue_job`'s "returns a Job on accept" contract. `install_arq_pool_spy(app)` is a contextmanager that captures the prior `app.state.arq_pool` via a `_UNSET` sentinel and restores it exactly on exit — `delattr` when the attr was originally unset (the Redis-down boot case), reassign otherwise. The `arq_pool_spy` pytest-asyncio fixture depends on `async_client` so it installs **after** the lifespan built (or skipped) the real pool — the install-after-lifespan ordering is the load-bearing detail (a success-path recorded call proves the spy, not the real pool, got the enqueue). NOT autouse, so tests that don't request it are unaffected. 5 unit tests (`test_arq_pool_spy.py`) lock the recording shape + truthy return + coroutine contract with no DB. |
There was a problem hiding this comment.
There is an unmatched closing parenthesis ) after NOT autouse in this line. It should be corrected to maintain proper grammar and readability.
| **The fixture (Story 1.1, `integration/conftest.py`).** `SpyArqPool.enqueue_job` records each call as a flattened `(name, *args)` tuple (so the handler's `enqueue_job("start_study", study_id)` records `("start_study", study_id)`) and returns a truthy sentinel mirroring `ArqRedis.enqueue_job`'s "returns a Job on accept" contract. `install_arq_pool_spy(app)` is a contextmanager that captures the prior `app.state.arq_pool` via a `_UNSET` sentinel and restores it exactly on exit — `delattr` when the attr was originally unset (the Redis-down boot case), reassign otherwise. The `arq_pool_spy` pytest-asyncio fixture depends on `async_client` so it installs **after** the lifespan built (or skipped) the real pool — the install-after-lifespan ordering is the load-bearing detail (a success-path recorded call proves the spy, not the real pool, got the enqueue). NOT autouse, so tests that don't request it are unaffected. 5 unit tests (`test_arq_pool_spy.py`) lock the recording shape + truthy return + coroutine contract with no DB. | |
| **The fixture (Story 1.1, `integration/conftest.py`).** `SpyArqPool.enqueue_job` records each call as a flattened `(name, *args)` tuple (so the handler's `enqueue_job("start_study", study_id)` records `("start_study", study_id)`) and returns a truthy sentinel mirroring `ArqRedis.enqueue_job`'s "returns a Job on accept" contract. `install_arq_pool_spy(app)` is a contextmanager that captures the prior `app.state.arq_pool` via a `_UNSET` sentinel and restores it exactly on exit — `delattr` when the attr was originally unset (the Redis-down boot case), reassign otherwise. The `arq_pool_spy` pytest-asyncio fixture depends on `async_client` for install-after-lifespan ordering (NOT autouse) in `integration/conftest.py` + 5 unit tests; (1.2) wired the fixture into 13 studies-POST tests — 10 rejection paths assert `spy.calls == []`, 3 success paths assert `spy.calls == [("start_study", <id>)]` (proves the spy not the real pool received the enqueue → confirms install ordering) — plus 2 AC-3 restore tests each forcing their own precondition so both restore branches run deterministically every CI run regardless of whether Redis was up at boot, and restore the original boot state in `finally` so the real pool isn't stranded from lifespan shutdown's `aclose()`. Counts verified: 13 params, 10 `== []`, 3 `== [("start_study", …)]`. |
Summary
Finalization for
chore_studies_post_arq_spy_fixture(PR #476, squash-mergeded85d84). Docs-only — no code.implemented_features/2026_06_05_studies_post_arq_spy_fixture/(flat, date-prefixed).pipeline_status.md: Implementation → Complete +**Release:** mvp2.implementation_plan.md: Status → Complete (PR test(studies): arq_pool_spy fixture for POST /api/v1/studies enqueue assertions #476).state.md: prepend the merge one-liner (drop the 6th → older-entries line); flip Current branch / In flight to the 3-chore afternoon queue (docs: reorganize into numbered IA, add pipeline skills and feature templates #1 shipped, docs: MVP1 architecture + 12 feature specs + GPT-5.5 review fixes #2chore_demo_seeding_integration_tests_rewritenext).state_history.md: full reasoning entry.website/docs/roadmap.md.No tracking issue for this slug. No
phase*_idea.md(single-phase). Alembic head unchanged (0023).Test plan
pipeline_status.md/implementation_plan.mdcaptured (542 insertions, edit-then-git-mv pitfall checked)🤖 Generated with Claude Code
Generated by Claude Code