Skip to content

refactor(cli): derive origin completion descriptions from OriginSpec - #3252

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/origin-completion-from-spec
Jul 21, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/origin-completion-from-spec

Conversation

@Sinity

@Sinity Sinity commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Deletes the last hand-maintained per-origin description inventory (cli/shell_completion_values.py:_ORIGIN_DESCRIPTIONS, 8 of 11 origins, no parity check) by declaring a required display_description on OriginSpec and deriving the CLI completion dict from ORIGIN_SPECS.

Problem

PR #3250's audit flagged this as the one remaining stale parallel origin inventory: shell completion for --origin silently omitted beads-issue, grok-export, and unknown-export, and nothing would catch future drift.

Solution

  • OriginSpec.display_description (required field, declared once per origin in sources/origin_specs.py).
  • _ORIGIN_DESCRIPTIONS becomes a derivation over ORIGIN_SPECS — parity by construction.
  • Regression test pins the derived inventory to the exact Origin enum and non-empty text; blanking a description or dropping a spec fails it.

Verification

  • devtools test tests/unit/sources/test_origin_specs.py tests/unit/cli/test_command_aux_runtime.py → 27 passed.
  • devtools verify --quick → exit 0.

Ref polylogue-2qx.1.2 (residual from #3250).

🤖 Generated with Claude Code

https://claude.ai/code/session_01QUsH3Rhq6oAZpYPWcsZqnZ

Problem: cli/shell_completion_values.py kept a hand-maintained
_ORIGIN_DESCRIPTIONS inventory covering 8 of 11 origins (missing
beads-issue, grok-export, unknown-export) with no parity check —
flagged as a residual in PR #3250.

What changed: OriginSpec gains a required display_description field
(declared once per origin in origin_specs.py); the CLI completion dict
is now a derivation over ORIGIN_SPECS, and a regression test pins the
derived inventory to the full Origin enum.

Ref polylogue-2qx.1.2

Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QUsH3Rhq6oAZpYPWcsZqnZ
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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 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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4b436f6c-e1bc-4cee-b15d-9e143fcaa895

📥 Commits

Reviewing files that changed from the base of the PR and between 671d743 and 010a645.

📒 Files selected for processing (3)
  • polylogue/cli/shell_completion_values.py
  • polylogue/sources/origin_specs.py
  • tests/unit/sources/test_origin_specs.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/origin-completion-from-spec

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.

@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: 010a645343

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

@Sinity
Sinity merged commit 263c9a2 into master Jul 21, 2026
3 checks passed
@Sinity
Sinity deleted the feature/refactor/origin-completion-from-spec branch July 21, 2026 19:15
Sinity added a commit that referenced this pull request Jul 21, 2026
@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.

  • 61.F142 / P2: fixed-already at the checked revision: polylogue/cli/click_option_groups.py:23 now validates against the public OriginSpec token projection. The descriptions used by completion apply the same spec.public_filter condition at polylogue/sources/origin_specs.py:3807, excluding non-public evidence-only origins from the offered vocabulary.

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