Repository navigation
feat(cli): schedule approved demo fixture import (#1843) - #1935
Conversation
Problem: #1843 needs a runnable polylogue import --demo path that uses approved synthetic fixtures without bypassing the import command's daemon-acceptance truthfulness contract.\n\nWhat changed: add a --demo source selector that materializes build_demo_corpus_specs() into a deterministic demo source directory, stages it into the archive inbox, and submits the staged path to the same /api/ingest scheduling path as ordinary imports. PATH and --demo are mutually exclusive, and bare import now fails with an explicit source-selector error.\n\nVerification:\n- devtools test tests/unit/cli/test_import.py tests/unit/scenarios/test_corpus.py: 30 passed\n- devtools verify --quick: exit_code 0\n\nRef #1843
|
Warning Review limit reached
More reviews will be available in 6 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 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. 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 (3)
✨ 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 |
Problem: adding import --demo made the import help exercise drift in CI because PATH is now optional and the new option appears in help output.\n\nWhat changed: update the committed help-import showcase baseline to match the new command surface.\n\nVerification:\n- devtools lab-scenario verify-baselines: All baselines match\n- devtools verify --quick: exit_code 0\n\nRef #1843
## Summary Updates the public docs after `polylogue import --demo` landed. README and `docs/generate.md` now point users at the demo import command, while keeping `devtools lab-scenario` framed as repository verification tooling. The release-readiness and import-demo floor notes now distinguish the landed scheduling surface from the remaining end-to-end demo archive evidence. ## Problem After #1935, the command existed but docs still described devtools lab scenarios as the demo path and the release gate still said `import --demo` was not landed. That made the release gate stale immediately after the demo import slice merged. ## Solution Document `polylogue import --demo` as the user-facing demo source import path, keep the synthetic generator details in `docs/generate.md`, and update gate/planning docs to leave only the actual remaining #1843 work: end-to-end demo archive convergence and README-ready commands against the generated archive. ## Verification - `devtools verify-doc-commands` -> 98 doc files scanned, no stale commands - `devtools render-all --check` -> OK - `devtools verify --quick` -> exit_code 0 at `2026-06-15T20:05:05Z` - push hook: HEAD already verified (`a50ed0da`) Ref #1843 Ref #1827
## Summary Complete #1843's README-ready demo transcript by adding the missing `analyze` example alongside the existing demo import, status, stats, search, and read commands. ## Problem The #1843 acceptance criteria require the demo archive to support search/read/analyze examples. The current README and `docs/generate.md` transcript showed search and read after daemon convergence, but not an analyze command. Closing the issue without this would leave a literal AC gap. ## Solution Add `polylogue find "pytest" then analyze --facets` to both the README quick transcript and the detailed generate/demo page. Update the async import caveat so it consistently says search/read/analyze examples become meaningful after daemon convergence. ### AC matrix | AC | Current state | | --- | --- | | A new user can run demo import from a clean checkout. | Satisfied by `polylogue import --demo` in `polylogue/cli/commands/import_command.py`; tested by `tests/unit/cli/test_import.py`; documented in `README.md` and `docs/generate.md`. | | Demo archive supports search/read/analyze examples. | Satisfied here: README/docs now show `polylogue "pytest" list`, `polylogue find "pytest" then read --view messages`, and `polylogue find "pytest" then analyze --facets`. The archive-level `pytest` search/read evidence is pinned by `tests/unit/scenarios/test_demo_archive_convergence.py`; analyze is the registered aggregate verb over the matched result set. | | Fixture world is committed and documented. | Satisfied by `build_demo_corpus_specs()` and docs in `docs/generate.md`; prior PRs #1934, #1935, #1936, #1937, #1940, #1943, #1950, #1953, and #1975 recorded the fixture, live daemon path, convergence proof, and overlay evidence. | | Tests validate demo output without relying on dev machine state. | Satisfied by isolated archive/config roots in the demo import and convergence tests; #1975 additionally proves deterministic user overlays and private-path hygiene. | | No private data / no host-specific absolute paths. | Satisfied by the relative fixture-path tests and convergence assertions in `tests/unit/scenarios/test_corpus.py` and `tests/unit/scenarios/test_demo_archive_convergence.py`. | | Known tags/notes/KV once #1883 lands. | Satisfied by #1975: `seed_demo_user_overlays()` stores the `pytest-triage` tag, mark, blackboard note, saved query, and typed tag/decision assertions in `user.db` after convergence. | ### Explicit decisions `polylogue import --demo` remains asynchronous daemon scheduling. It does not synchronously seed user overlays because the target sessions may not exist yet. Overlay seeding stays as deterministic repository/release evidence after convergence, as documented by #1975. ## Verification - `nix develop --command devtools verify-doc-commands` -> `99 doc files scanned, no stale commands`. - `nix develop --command devtools verify --quick` -> `exit_code 0`. - Pre-push `devtools verify --quick` -> `exit_code 0`. Closes #1843
Summary
Adds
polylogue import --demoas the first runnable demo import surface. The command materializes the approved #1843 demo corpus specs into deterministic local source files, stages that source directory into the daemon inbox, and still requires/api/ingestacceptance before reporting success.Problem
#1843 needs a new-user demo path that does not depend on private exports. The existing import command was truthful for explicit paths but had no approved fixture selector, so a demo flow would either require devtools-only setup or bypass the daemon scheduling contract.
Solution
import --demonow usesbuild_demo_corpus_specs()plusSyntheticCorpus.write_specs_artifacts()to generate the fixture world under the active archive root, then stages the generated directory intoarchive_root()/inboxand submits that staged path to the same daemon endpoint as ordinary imports.PATHand--demoare mutually exclusive, and barepolylogue importnow fails with a clear source-selector error.Issue slice:
#1843 slice 2: add
polylogue import --demoscheduling over the approved fixture-world specs.Files inspected:
polylogue/cli/commands/import_command.py,tests/unit/cli/test_import.py,polylogue/scenarios/corpus.py,polylogue/schemas/synthetic/core.py,polylogue/schemas/synthetic/build_batch.py,polylogue/showcase/workspace.py,devtools/pipeline_probe/staging.py, #1843, #1815.Files changed:
polylogue/cli/commands/import_command.py,tests/unit/cli/test_import.py.Old surface removed or retained:
Retained
polylogue import PATHbehavior and daemon truthfulness. Added--demo; noingestalias or direct archive write path added.Contracts/tests added:
Tests cover
--demohelp visibility, fixture materialization before daemon request, staged inbox request body, daemon acceptance still required, bare import rejection, andPATH/--demomutual exclusion.Generated artifacts updated:
None;
devtools verify --quickreported no render drift.Verification commands and results:
devtools test tests/unit/cli/test_import.py tests/unit/scenarios/test_corpus.py-> 30 passeddevtools verify --quick-> exit_code 0 at2026-06-15T19:54:48Z3c8738fe)Known caveats / SPEC_MISMATCH:
No SPEC_MISMATCH. This schedules demo import through the daemon; it does not run a daemon convergence cycle or assert normalized archive rows in this slice.
Follow-up intentionally not included:
End-to-end demo archive convergence, README-ready demo commands against the generated archive, parser regression matrix, and known tags/notes/KV overlays remain separate #1843/#1883 slices.
Ref #1843