Repository navigation
feat(cli): converge first-run onboarding onto one verified guided path - #3175
Conversation
|
Warning Review limit reached
Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?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 reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. 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, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (21)
✨ 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: 3098d57196
ℹ️ 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".
| archive_root = archive_file_set_root_for_paths(archive_root_path=config.archive_root, db_anchor=config.db_path) | ||
| if not (archive_root / "index.db").exists(): | ||
| click.echo(ctx.get_help()) | ||
| click.echo(render_guided_path()) |
There was a problem hiding this comment.
Do not treat a missing index as a missing archive
If a real archive has source.db but temporarily lacks the rebuildable index.db—for example immediately after polylogue ops reset --index—this now presents the first-run path as though no archive exists. Following its demo seed step ingests synthetic sessions into the same durable source tier, contaminating the operator's real corpus. Check the durable archive tiers/configuration before offering demo seeding, and direct existing archives toward index rebuild/status guidance instead.
Useful? React with 👍 / 👎.
|
Merging with coordinator (Fable) review standing in: CodeRabbit rate-limited without reviewing. Reviewed: onboarding convergence design (single source of truth in cli/onboarding.py, real-command anti-vacuity test parsing all 5 guided steps through the actual CLI), init existed-before fix, snapshot regens. Process note recorded: lane used git stash for its baseline check despite the standing ban (shared refs/stash hazard) — no residue found, flagged for lane-prompt tightening. Ref polylogue-jnj.8. |
…sts" Problem: `polylogue init` computed the "already exists" branch's `target.exists()` check *after* already writing the starter config, so a brand-new, successful first write always fell into the "already exists — re-run with --force" message instead of "wrote starter config". Existing tests only checked file content, not the printed message, so the bug went unnoticed. This directly undermines first-run comprehension: a cold reader following `polylogue init` sees a message telling them nothing happened and to pass --force, when the config was in fact written correctly. What changed: capture `existed_before = target.exists()` once, before the write, and use that value for both the JSON payload and the plain-text branch. Also point the "Next steps" hint at the demo-first walkthrough (`polylogue demo seed`, `polylogued run`, `polylogue find ... then read`) instead of the old `polylogue ops status` / bare-quoted-query wording. Verification: devtools test tests/unit/cli/test_init.py (10 passed).
Ref polylogue-jnj.8 Problem: bare `polylogue`, `polylogue tutorial`, `polylogue manual` (nonexistent), and the reader launcher (`polylogue dashboard`) were four disconnected human entry points. On an absent archive, bare `polylogue` dumped the full generic --help tree instead of teaching a sequence; the strict-command-floor error hint pointed nowhere beyond `--help`; there was no `polylogue manual` at all (only the agent-facing `polylogue agent manual`, and the undiscoverable `--help-markdown` flag); and the dashboard reported "degraded" readiness without saying what to do about it. What changed: - `polylogue/cli/onboarding.py` is the new single source of truth for the five-step guided path (inspect archive root, init, seed the demo, one `find`+`read`, enable real ingestion via `polylogued run`). Every command is a real, exact invocation. - Bare `polylogue` on an absent archive now prints this guided path instead of `ctx.get_help()`. A configured archive keeps its existing compact recent-sessions summary plus a `polylogue manual` pointer. - `polylogue tutorial` prints the same guided-path block up front when nothing is set up at all (no config, no archive), then continues into its existing per-stage real-source checklist unchanged. - The strict-command-floor `UsageError` hint (#1842) now also points at `polylogue manual` and `polylogue tutorial`. - New `polylogue manual` command: a discoverable, human-typeable route onto the exact same generated `render_help_markdown()` content `--help-markdown` already produces (one generator, one name a cold reader would actually try), with explicit version/source identity. - `polylogue dashboard` (the reader launcher) now teaches the daemon prerequisite and a no-TUI CLI fallback when readiness is degraded, instead of only printing "degraded". - Regenerated `docs/cli-reference.md`, `docs/topology-status.md`, and `docs/plans/topology-target.yaml` for the new module/command and updated root help text; updated the two syrupy snapshot files pinning root `--help` output. Verification: - devtools test tests/unit/cli/test_onboarding_guided_path.py tests/unit/cli/test_manual_command.py tests/unit/cli/test_bare_triage.py tests/unit/cli/test_tutorial.py tests/unit/cli/test_dashboard_command.py tests/unit/cli/test_click_app.py tests/unit/cli/test_help_snapshots.py tests/unit/cli/test_terminal_snapshots.py tests/unit/cli/test_diagnose_and_error_discipline.py tests/unit/cli/test_theme_aliases_help_markdown.py tests/unit/cli/test_demo_command.py -> 176 passed, 1 pre-existing failure (test_dashboard_default_prints_evidence_before_launching_tui fails on bare master too, ConfigError('RuntimeServices has no config projection'), confirmed via git stash before this change; unrelated to this diff). - devtools verify --quick -> exit 0 (format, lint, mypy --strict, render all --check all green). - devtools render all --check -> exit 0, no "out of sync" lines. - Not run: full devtools verify --all (shared host was concurrently running several other heavy agent test suites; the touched-surface + testmon seed-equivalent focused run above is the evidence gate for this PR, per repo policy that a full run is a harness/dependency-change or final-diagnostic gate, not a per-PR requirement). Co-Authored-By: Claude <[email protected]>
3098d57 to
f67c839
Compare
… deliveries Ref polylogue-41ow, polylogue-fd2s, polylogue-9gh1, polylogue-2o3d Problem: two files staged at /realm/tmp/gpt-pro-intake-0719/ (judgment-*.md/.diff, config-*.md/.diff) were flagged as fresh wave-2 deliveries needing triage, targeting snapshot 536a53e (#3046). Master has since moved ~180 commits including 33 merges. Solution: verified pairing first (judgment-* files cross-reference polylogue-41ow/37t.12/mrxt and match mission ann-04; config-* files cross-reference polylogue-fd2s/9gh1 and match mission misc-01). SHA-256 of every file was then found byte-identical to the already-recorded results/ann-04/r01 and results/misc-01/r01 packages -- these are not new deliveries, they are exact re-submissions of packages already triaged 2026-07-18. Per results/README.md custody policy ("Duplicated browser downloads with identical SHA-256 values are deliberately not copied twice", precedent: lin-01/r01), this revision does NOT mint a second package-revision identity (r02) or duplicate the raw/extracted artifact bytes. Instead the 2026-07-20 reassessment is recorded as a dated `reassessments` entry inside each existing r01 receipt.json, alongside an updated top-level `state` where the evidence changed: - ann-04/r01: state needs_rebase_review -> superseded. bd polylogue-41ow (closed, PR #3101+#3110) independently fixed the writer-slot TOCTOU race; bd polylogue-2o3d (closed, PR #3138) independently ported the delivery's entire additive scope (evidence previews, queue health, judge consolidation, capture idempotency) after its own line-by-line audit found the MCP-surface hunks obsolete (six-tool cutover) and the delivery's transaction mechanism redundant with #3101. Supersession is now total, not partial as originally judged before those PRs landed. - misc-01/r01: state stays superseded, rationale now explicit. PR #3079 (merged 2026-07-18, sourced from an earlier revision of this same packet family) already shipped ResolvedRuntimeConfig/single-resolver/ archive_root-fix/deep-merge. There is no viable rebase target for this patch against the current config API -- #3079 shipped a differently shaped ResolvedRuntimeConfig with no common ancestor, so any further work must be re-derived, not revived from this diff. The genuine residual (uu8r-scope env-bypass migrations, e.g. daemon/backup.py, pipeline/services/archive_ingest.py, still unmigrated on master) is tracked durably as polylogue-uu8r directly, not as a pending state on this package. Re-verified git apply --check against both the stated snapshot (passes cleanly for both) and current origin/master, checked twice: once at the original triage base (e963e87) and again after rebasing onto the latest tip (1c0f4ec, three commits later -- #3175 CLI onboarding convergence plus two beads-filing commits, none touching the affected files). Both patches fail identically both times. Verification: sha256sum on all 8 delivered files cross-checked against existing r01 records (identical); git apply --check as above; bd show on polylogue-41ow/fd2s/9gh1/cxlk/uu8r/2o3d to confirm current close/open state and what each merged PR actually covers; grep -rl ResolvedRuntimeConfig and read of _merge_toml/_deep_merge_table in polylogue/config.py to confirm the architecture is live, not just claimed; devtools verify --quick 16/16 green (pre-push hook). Triage notes appended to polylogue-41ow and polylogue-fd2s via bd update --append-notes, including a correction note for the earlier (superseded) r02 framing. No patch was applied to master; no bead was closed or reopened by this change. Co-Authored-By: Claude <[email protected]>
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Converges the four disconnected human first-run entry points — bare
polylogue,polylogue tutorial,polylogue manual(previously nonexistent), and thepolylogue dashboardreader launcher — onto one shared, state-aware guided path, plus fixes a first-run message bug found while implementing it.Ref polylogue-jnj.8
Problem
polylogueon an absent archive printed the full generic Click--helptree — it does not teach a cold reader a sequence of commands to run.polylogue tutorialonly probed for real chat sources; it never mentioned the private-data-free demo archive, so a reader with no chat history installed yet had nothing to try.polylogue manualcommand at all. The only manual-rendering surface waspolylogue agent manual(agent/MCP-tool-oriented content, owned by a different bead) and the undiscoverable--help-markdownflag.UsageErrorhint (Polylogue: final hard-pruned CLI surface #1842) pointed only atpolylogue --help.polylogue dashboardreportedReadiness: degradedwithout saying what a human should do about it.polylogue init's plain-text branch re-checkedtarget.exists()after already writing the file, so a fresh, successful first write always printed "Config already exists ... re-run with --force" — the success message was unreachable.Solution
polylogue/cli/onboarding.py: single source of truth for the five-step guided path (inspect archive root viapolylogue config paths,polylogue init,polylogue demo seed, onefind+readagainst a stable demo session id,polylogued runto enable real ingestion). Every printed command is the real, exact invocation.polylogue(click_app.py::_show_bare_tty_triage) on an absent archive now renders this guided path instead ofctx.get_help(); a configured archive keeps its existing compact recent-sessions summary plus apolylogue manualpointer.polylogue tutorialprints the same guided-path block up front only when nothing is set up at all (no starter config, no archive), then falls through to its existing per-stage real-source checklist unchanged — no duplicated, divergent copy of the same advice.query_group.py) now also points atpolylogue manualandpolylogue tutorial.polylogue manualcommand (cli/commands/manual.py): a discoverable, human-typeable route onto the exact same generated content--help-markdownalready produces (render_help_markdown) — one generator, two names, version/source identity explicit in the header.--help-markdown's help text now says so instead of describing an unrelated-sounding capability.polylogue dashboardnow teaches the daemon prerequisite (polylogued run) and a no-daemon, no-TUI CLI fallback (polylogue find QUERY then read) whenever readiness is degraded.polylogue init's pre-existing "already exists" message bug (existed_beforecaptured pre-write) and pointed its "Next steps" hint at the demo-first walkthrough.docs/cli-reference.md,docs/topology-status.md,docs/plans/topology-target.yaml, and the two syrupy root-help snapshots for the new module/command and root help text changes.Deliberately out of scope: demo seeding/import internals (owned by a separate lane, consumed as-is), and the agent-facing
polylogue agent manualcontent (owned by polylogue-3gd.2).Verification
devtools test tests/unit/cli/test_onboarding_guided_path.py tests/unit/cli/test_manual_command.py tests/unit/cli/test_bare_triage.py tests/unit/cli/test_tutorial.py tests/unit/cli/test_dashboard_command.py tests/unit/cli/test_click_app.py tests/unit/cli/test_help_snapshots.py tests/unit/cli/test_terminal_snapshots.py tests/unit/cli/test_diagnose_and_error_discipline.py tests/unit/cli/test_theme_aliases_help_markdown.py tests/unit/cli/test_demo_command.py→ 176 passed, 1 pre-existing failure (test_dashboard_default_prints_evidence_before_launching_tui,ConfigError('RuntimeServices has no config projection; resolve at the composition root')) confirmed viagit stashto reproduce identically on unmodifiedmaster— unrelated to this change.test_onboarding_guided_path.py) executes steps 1-4 of the guided path end-to-end against a real fixture archive (config paths,init,demo seed,find id:codex-session:demo-receipts then read), and parses step 5 (polylogued run) through the real daemon Click parser — a renamed/removed subcommand fails the test.devtools verify --quick→ exit 0 (ruff format, ruff check, mypy --strict,render all --check, and the repo's topology/layering/manifest/doc-command/docs-coverage/clock-hygiene/timeout-override/degrade-loudly checks all green); re-confirmed automatically by the pre-push hook.devtools render all --check→ exit 0, noout of synclines.devtools verify --all/--seed-testmon. The shared host was concurrently running several other agents' heavy test suites; per repo policy a full run is a harness/dependency-change or final-pre-PR-diagnostic gate, not a per-PR requirement, and the touched-surface focused run above is the evidence gate for a change scoped to CLI onboarding text/routing.