Repository navigation
feat(demo): let daemon demo import wait for readiness (#2196) - #2210
Conversation
|
Warning Review limit reached
More reviews will be available in 51 minutes and 15 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds ChangesBlocking demo import with overlays and verify leak-check toggle
Sequence DiagramsequenceDiagram
participant User
participant ImportCmd as import_command
participant Daemon as daemon ingest
participant PollLoop as _wait_for_demo_archive_ready
participant Verifier as verify_demo_archive
participant OverlaySeed as seed_demo_user_overlays
User->>ImportCmd: polylogue import --demo --wait --timeout 30 --with-overlays
ImportCmd->>Daemon: schedule demo import
Daemon-->>ImportCmd: Scheduled
ImportCmd->>PollLoop: start polling (timeout=30s)
loop every _DEMO_WAIT_POLL_INTERVAL_S
PollLoop->>Verifier: verify_demo_archive(check_source_path_leaks=False)
Verifier-->>PollLoop: ok / not yet
end
PollLoop-->>ImportCmd: archive ready
ImportCmd->>OverlaySeed: seed_demo_user_overlays()
ImportCmd->>Verifier: verify_demo_archive(require_overlays=True)
Verifier-->>ImportCmd: ok
ImportCmd-->>User: Demo archive verified overlays=yes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc63354ad7
ℹ️ 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".
| result = verify_demo_archive( | ||
| archive_root(), | ||
| require_overlays=require_overlays, | ||
| check_source_path_leaks=False, | ||
| ) |
There was a problem hiding this comment.
Avoid exact-archive verification for import wait
When polylogue import --demo --wait is run in an archive that already contains any non-demo sessions, this call polls verify_demo_archive(), whose checks require the entire archive to contain exactly the three demo sessions and 19 messages. The daemon can successfully ingest the demo source, but the wait path will still time out because unrelated existing sessions remain present; either the wait check needs to verify demo readiness as a subset, or the command should reject non-empty archives before scheduling.
Useful? React with 👍 / 👎.
Summary
Adds a truthful
polylogue import --demo --waitpath that schedules the deterministic demo fixture through the running daemon, blocks until the daemon-built archive passes semantic demo readiness checks, and optionally seeds deterministic user overlays after the target sessions exist.Problem
polylogue import --demopreviously proved only daemon scheduling. The README/demo transcript then had to tell users to wait manually before search/read/analyze commands were meaningful, while the semantic verifier lived on the in-processpolylogue demo seedpath. That left the realistic daemon demo path weaker than the direct seed path.Solution
--wait,--timeout, and--with-overlaystopolylogue importfor the demo path.polylogue demo verifystricter about raw source path leak posture.docs/generate.mdto document the daemon-backed ready-now command.Verification
nix develop --command devtools test tests/unit/cli/test_import.py -q-> 16 passed.nix develop --command devtools test tests/unit/cli/test_import.py tests/unit/demo/test_demo_seed_verify.py tests/integration/test_demo_daemon_convergence.py -q-> 20 passed.nix develop --command devtools render all --check-> sync OK.nix develop --command devtools verify --quick-> exit 0.nix develop --command devtools verify --seed-testmon --skip-slow-> 11633 passed, exit 0, peak pytest tree RSS 3369.6 MiB.Closes #2196 for the daemon demo wait/overlay slice; the broader showcase/visual cleanup remains in the issue.
Summary by CodeRabbit
New Features
--wait,--timeout, and--with-overlaysCLI options to demo import for blocking verification and deterministic overlay attachment.Documentation
Tests