Skip to content

refactor(cli): move overlay roots under user-state (#1842) - #2145

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/user-state-overlay-roots
Jun 19, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/user-state-overlay-roots

Conversation

@Sinity

@Sinity Sinity commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

Move the user-overlay command families off the root polylogue surface and under the existing polylogue user-state owner. This removes root blackboard and feedback, keeps their behavior available as polylogue user-state blackboard ... and polylogue user-state feedback ..., renames the implementation modules away from root-command names, refreshes generated help/docs/baselines, and deletes the stale CLI audit document that contradicted the reopened #1842 scope.

Problem

#1842 was reopened because the public CLI still taught a flat command zoo after several earlier absorption slices landed. After #2144, user tags are assertion-backed and the next coherent overlay step is to make reader-user-state own the remaining blackboard/feedback surfaces instead of leaving them as root command families. The stale docs/cli-audit.md also preserved old conclusions such as root feedback/blackboard and old query verbs, making it more misleading than useful.

Solution

  • Register user-state as a lazy Click group and attach blackboard and feedback beneath it, without hidden root aliases or compatibility shims.
  • Rename polylogue/cli/commands/blackboard.py and feedback.py to user_state_blackboard.py and user_state_feedback.py, and update examples/docstrings to the new command path.
  • Update archive route metadata, behavior tests, JSON command smoke coverage, completion tests, snapshots, generated help baselines, CLI reference, topology projection, and agent/docs surfaces.
  • Delete docs/cli-audit.md; the live reopened issue Polylogue: final hard-pruned CLI surface #1842 is now the durable command-floor spec.
  • Add per-exercise progress output to devtools lab scenario verify-baselines so the 96-command showcase help lane is observable instead of appearing hung.

Verification

  • devtools test tests/unit/cli/test_blackboard.py tests/unit/cli/test_json_output.py tests/unit/cli/test_click_app.py::TestCliMetadata::test_retained_command_owners_are_registered tests/unit/cli/test_completion_matrix.py tests/unit/cli/test_status.py::test_archive_cli_route_catalog_reports_user_tier_surfaces tests/unit/cli/test_status.py::TestNoArchiveStatus::test_direct_status_json_reads_archive_file_set_from_archive_tiers tests/unit/cli/test_help_snapshots.py tests/unit/cli/test_terminal_snapshots.py tests/unit/cli/test_plain_cli_snapshots.py tests/unit/showcase/test_exercise_catalog.py::TestExercisesByGroup::test_all_command_paths_have_generated_help_exercises tests/unit/showcase/test_exercise_catalog.py::TestExercisesByGroup::test_inventory_includes_nested_command_paths -> 189 passed
  • devtools lab scenario verify-baselines --update -> Ran 96 exercises, updated baselines
  • devtools lab scenario verify-baselines -> Ran 96 exercises, All baselines match.
  • devtools render all --check -> sync OK
  • devtools verify --quick -> exit_code: 0
  • devtools verify -> refused because this fresh worktree has no seeded testmon DB: pytest-testmon is not seeded; run devtools verify --seed-testmon ...

Ref #1842

Problem: #1842 still exposed blackboard and feedback as root command families even though they are durable reader-user-state overlays. The old CLI audit document also preserved stale command-floor conclusions that contradicted the reopened issue body.

What changed: remove blackboard and feedback from root registration, register them under the real user-state Click group, rename their implementation modules away from root-command names, update route metadata, docs, help baselines, and focused CLI tests, and delete the stale CLI audit. The showcase baseline runner now prints per-exercise progress so long generated-help runs are observable instead of looking hung.

Verification: devtools test tests/unit/cli/test_blackboard.py tests/unit/cli/test_json_output.py tests/unit/cli/test_click_app.py::TestCliMetadata::test_retained_command_owners_are_registered tests/unit/cli/test_completion_matrix.py tests/unit/cli/test_status.py::test_archive_cli_route_catalog_reports_user_tier_surfaces tests/unit/cli/test_status.py::TestNoArchiveStatus::test_direct_status_json_reads_archive_file_set_from_archive_tiers tests/unit/cli/test_help_snapshots.py tests/unit/cli/test_terminal_snapshots.py tests/unit/cli/test_plain_cli_snapshots.py tests/unit/showcase/test_exercise_catalog.py::TestExercisesByGroup::test_all_command_paths_have_generated_help_exercises tests/unit/showcase/test_exercise_catalog.py::TestExercisesByGroup::test_inventory_includes_nested_command_paths -> 189 passed; devtools lab scenario verify-baselines -> 96 exercises, all baselines match; devtools render all --check -> sync OK; devtools verify --quick -> exit_code 0.

Ref #1842
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Sinity, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 18 minutes and 20 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ff68808d-6b6e-4abe-b063-20ff0196237d

📥 Commits

Reviewing files that changed from the base of the PR and between 07c48c0 and 0f68304.

📒 Files selected for processing (50)
  • AGENTS.md
  • devtools/lab_scenario.py
  • docs/cli-audit.md
  • docs/cli-reference.md
  • docs/internals.md
  • docs/plans/topology-target.yaml
  • docs/test-quality-workflows.md
  • polylogue/cli/click_command_registration.py
  • polylogue/cli/commands/status.py
  • polylogue/cli/commands/user_state.py
  • polylogue/cli/commands/user_state_blackboard.py
  • polylogue/cli/commands/user_state_feedback.py
  • tests/baselines/showcase/help-feedback-record.txt
  • tests/baselines/showcase/help-main.txt
  • tests/baselines/showcase/help-user-state-annotations-delete.txt
  • tests/baselines/showcase/help-user-state-annotations-list.txt
  • tests/baselines/showcase/help-user-state-annotations-save.txt
  • tests/baselines/showcase/help-user-state-annotations.txt
  • tests/baselines/showcase/help-user-state-blackboard-list.txt
  • tests/baselines/showcase/help-user-state-blackboard-post.txt
  • tests/baselines/showcase/help-user-state-blackboard.txt
  • tests/baselines/showcase/help-user-state-feedback-clear.txt
  • tests/baselines/showcase/help-user-state-feedback-list.txt
  • tests/baselines/showcase/help-user-state-feedback-record.txt
  • tests/baselines/showcase/help-user-state-feedback.txt
  • tests/baselines/showcase/help-user-state-marks-add.txt
  • tests/baselines/showcase/help-user-state-marks-list.txt
  • tests/baselines/showcase/help-user-state-marks-remove.txt
  • tests/baselines/showcase/help-user-state-marks.txt
  • tests/baselines/showcase/help-user-state-recall-packs-delete.txt
  • tests/baselines/showcase/help-user-state-recall-packs-list.txt
  • tests/baselines/showcase/help-user-state-recall-packs-save.txt
  • tests/baselines/showcase/help-user-state-recall-packs.txt
  • tests/baselines/showcase/help-user-state-saved-views-delete.txt
  • tests/baselines/showcase/help-user-state-saved-views-list.txt
  • tests/baselines/showcase/help-user-state-saved-views-save.txt
  • tests/baselines/showcase/help-user-state-saved-views.txt
  • tests/baselines/showcase/help-user-state-workspaces-delete.txt
  • tests/baselines/showcase/help-user-state-workspaces-list.txt
  • tests/baselines/showcase/help-user-state-workspaces-save.txt
  • tests/baselines/showcase/help-user-state-workspaces.txt
  • tests/baselines/showcase/help-user-state.txt
  • tests/unit/cli/__snapshots__/test_help_snapshots.ambr
  • tests/unit/cli/__snapshots__/test_plain_cli_snapshots.ambr
  • tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
  • tests/unit/cli/test_blackboard.py
  • tests/unit/cli/test_click_app.py
  • tests/unit/cli/test_completion_matrix.py
  • tests/unit/cli/test_json_output.py
  • tests/unit/cli/test_status.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/user-state-overlay-roots

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

github-actions Bot pushed a commit that referenced this pull request Jun 19, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0f68304975

ℹ️ 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".

Comment thread polylogue/cli/commands/user_state.py Resolved
@Sinity
Sinity merged commit e95f819 into master Jun 19, 2026
14 checks passed
@Sinity
Sinity deleted the feature/refactor/user-state-overlay-roots branch June 19, 2026 03:42
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

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.

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.

1 participant