docs: document the long-running (deep-research) cassette re-record recipe#1567
Conversation
…cipe Capture the non-obvious snags from the v0.8 full-lifecycle Deep Research re-record (PR #1566) under docs/development.md "Long-running recordings": record-mode httpx tuning to dodge httpx.PoolTimeout (timeout=60 + ConnectionLimits(keepalive_expiry=10); async_client_factory is not public), @pytest.mark.timeout(3600), the deep start() task_id != poll-reported id NOT_FOUND trap, byte-exact YAML trimming (yaml.safe_dump breaks Windows parsing), and credential-grep beyond the name-anchored scrubber. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@claude review |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new subsection under "VCR Testing (Recorded HTTP)" documents how to record long-running Deep Research operations, covering HTTP client timeout tuning, pytest-timeout extension, correct polling task-id usage, cassette size reduction via text slicing, and credential verification strategies. ChangesVCR Testing Documentation for Long-Running Operations
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Claude finished @teng-lin's task in 1m 32s —— View job Code Review
Overall: LGTM — well-written and captures genuinely non-obvious pitfalls. The new A few minor suggestions: 1. Missing import hint for The httpx bullet shows the full constructor call but doesn't mention the import. A future maintainer following this recipe may not know from httpx import ConnectionLimits
NotebookLMClient(auth, timeout=60.0, limits=ConnectionLimits(keepalive_expiry=10.0))Adding 2. Unquantified "cassette size cap" (
Where is this cap defined? A future maintainer who hits it will want to know the limit (in KB/MB) or at least where to find the enforcement (e.g., a constant in 3. Bare PR reference may not auto-link in doc exports (
None of the above block merge; the content is accurate and the placement is correct. The |
There was a problem hiding this comment.
Code Review
This pull request adds a new section to "docs/development.md" documenting guidelines and lessons learned for handling long-running recordings and multi-minute polling. The feedback suggests updating the spelling of "Re-serialising" to "Re-serializing" to maintain consistency with the rest of the codebase.
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.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/development.md (1)
590-597: ⚡ Quick winVerify the
ConnectionLimitsexample is complete.The live recording harness also sets
max_connections=100andmax_keepalive_connections=20alongsidekeepalive_expiry=10.0. If those values are part of thePoolTimeoutworkaround, the doc example should include them; otherwise readers may copy an incomplete recipe.♻️ Possible doc update
- `NotebookLMClient(auth, timeout=60.0, limits=ConnectionLimits(keepalive_expiry=10.0))`. + `NotebookLMClient( + auth, + timeout=60.0, + limits=ConnectionLimits( + max_connections=100, + max_keepalive_connections=20, + keepalive_expiry=10.0, + ), + )`.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/development.md` around lines 590 - 597, The ConnectionLimits example is incomplete: in the live recording harness the PoolTimeout workaround also sets max_connections and max_keepalive_connections, so update the example for NotebookLMClient to pass ConnectionLimits(keepalive_expiry=10.0, max_connections=100, max_keepalive_connections=20) and keep the generous timeout (timeout=60.0); ensure this change is applied where NotebookLMClient(...) is constructed and preserve the note that async_client_factory is not a public constructor kwarg while using the public timeout= / limits= parameters.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@docs/development.md`:
- Around line 590-597: The ConnectionLimits example is incomplete: in the live
recording harness the PoolTimeout workaround also sets max_connections and
max_keepalive_connections, so update the example for NotebookLMClient to pass
ConnectionLimits(keepalive_expiry=10.0, max_connections=100,
max_keepalive_connections=20) and keep the generous timeout (timeout=60.0);
ensure this change is applied where NotebookLMClient(...) is constructed and
preserve the note that async_client_factory is not a public constructor kwarg
while using the public timeout= / limits= parameters.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Captures the non-obvious snags from the v0.8 full-lifecycle Deep Research re-record (PR #1566) so the next maintainer who re-records a long-running cassette doesn't rediscover them.
Adds a "Long-running recordings (deep research, multi-minute polling)" subsection to
docs/development.md:httpx.PoolTimeoutafter ~15–20 min idle polling → record-modetimeout=60+ConnectionLimits(keepalive_expiry=10.0)(and the note thatasync_client_factoryis not a public constructor kwarg).pytest-timeoutkills the run →@pytest.mark.timeout(3600).start()task_id ≠ the poll-reported id → filtered poll returnsNOT_FOUND; mirrorwait_for_completion(unfiltered first poll, then pin).yaml.safe_dump(which re-wraps long scalars and breaks Windows YAML parsing — CI caught it).Docs-only; no code or test changes.
🤖 Generated with Claude Code
Summary by CodeRabbit