Skip to content

docs: finalize chore_studies_post_arq_spy_fixture (PR #476 merged)#477

Merged
SoundMindsAI merged 1 commit into
mainfrom
docs/finalize-studies-post-arq-spy-fixture
Jun 5, 2026
Merged

docs: finalize chore_studies_post_arq_spy_fixture (PR #476 merged)#477
SoundMindsAI merged 1 commit into
mainfrom
docs/finalize-studies-post-arq-spy-fixture

Conversation

@SoundMindsAI

Copy link
Copy Markdown
Owner

Summary

Finalization for chore_studies_post_arq_spy_fixture (PR #476, squash-merged ed85d84). Docs-only — no code.

No tracking issue for this slug. No phase*_idea.md (single-phase). Alembic head unchanged (0023).

Test plan

  • dashboards + roadmap regenerated (deterministic)
  • state.md under 60 KB gate (26,028 bytes)
  • folder move verified; edits to pipeline_status.md/implementation_plan.md captured (542 insertions, edit-then-git-mv pitfall checked)
  • CI (docs-only paths)

🤖 Generated with Claude Code


Generated by Claude Code

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>
@SoundMindsAI SoundMindsAI merged commit caebffa into main Jun 5, 2026
7 checks passed
@SoundMindsAI SoundMindsAI deleted the docs/finalize-studies-post-arq-spy-fixture branch June 5, 2026 18:42

@gemini-code-assist gemini-code-assist 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.

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.

Comment thread state_history.md

**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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There is an unmatched closing parenthesis ) after NOT autouse in this line. It should be corrected to maintain proper grammar and readability.

Suggested change
**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", …)]`.

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.

2 participants