Skip to content

refactor(cli): expose origin-scoped doctor filters (#2806) - #2806

Merged
Sinity merged 1 commit into
masterfrom
feature/fanout/provider-origin
Jul 13, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/fanout/provider-origin

Conversation

@Sinity

@Sinity Sinity commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

Moves ops doctor source filters to the public Origin vocabulary while keeping the provider-named spellings as one-release deprecated aliases. Regenerates the CLI reference and teaches the vocabulary census that explicitly deprecated Click aliases are compatibility, not active contract surface.

Problem

Doctor advertised --schema-provider and --artifact-provider even though user-facing archive filters are origin-based. The needed compatibility aliases would otherwise prevent the provider-vocabulary census from showing the active CLI contract moving toward Origin.

Solution

  • Add repeatable --schema-origin and --artifact-origin flags; canonical validation errors and verbose help now say origin.
  • Keep --schema-provider and --artifact-provider as visible deprecated aliases. Their warnings name the actual legacy flag and merge into the existing workflow filters.
  • Preserve raw-argv command extraction for both names.
  • Exclude only explicit click.option(..., deprecated=...) aliases from the census literal category; its new regression fixture proves non-deprecated provider flags remain visible.

The daemon/http.py scope-key portion of polylogue-9e5.8.4 is intentionally deferred until PR #2793 merges, per the shared-file gate.

Verification

  • Direct CLI behavior: canonical help lists both origin flags; legacy schema filtering warns with --schema-provider; both canonical and legacy invalid invocations report the canonical --schema-origin requires --schemas contract.
  • devtools render cli-reference regenerated docs/cli-reference.md.
  • devtools lab census provider-vocabulary --json: literal sites 15 -> 13; unallowlisted literal candidates 12 -> 10; no doctor compatibility alias remains in the active literal set.
  • devtools verify --quick: completed green once before the isolated census follow-up (15 steps). Subsequent runs passed format/lint and then stalled in host I/O D state during pytest and mypy; the aborted lane-owned pytest basetemps were removed. The mandatory pre-push quick gate subsequently completed and accepted the push.
  • Focused pytest selection was attempted single-process with POLYLOGUE_PYTEST_BASETEMP_ROOT=/realm/tmp/polylogue-pytest but stalled in the same host I/O condition before completion.

Acceptance matrix

  • polylogue-9e5.8.4 CLI flags: satisfied.
  • polylogue-9e5.8.4 HTTP scope key: deferred until PR feat(web): add bounded cockpit aggregate routes #2793 is merged.
  • polylogue-jnj.7 doctor help and validation wording: satisfied in this scope; its wider CLI-help sweep remains open.

Ref polylogue-9e5.8.4.
Ref polylogue-jnj.7.

Problem
Doctor exposed source filters as provider-named options and errors even though
public archive filtering is origin-based. A compatibility alias must not keep
the retirement census measuring it as active contract vocabulary.

What changed
Add --schema-origin and --artifact-origin as the canonical repeatable flags,
retain the older spellings as accurately labelled deprecated aliases, and
merge both paths into the existing workflow filters. Update validation, raw
argv parsing, generated help, and the census to exclude explicitly deprecated
Click aliases from its active literal category.

Compatibility
The provider-named aliases remain accepted for one release and warn with the
actual deprecated flag name.

Ref polylogue-9e5.8.4.
Ref polylogue-jnj.7.

Co-Authored-By: Claude <[email protected]>
@Sinity Sinity changed the title refactor(cli): expose origin-scoped doctor filters refactor(cli): expose origin-scoped doctor filters (#2806) Jul 12, 2026
@coderabbitai

coderabbitai Bot commented Jul 12, 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: 16 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: f22b60d2-9142-4612-a78e-bed768a922f8

📥 Commits

Reviewing files that changed from the base of the PR and between 8ec9955 and 7cc9d66.

📒 Files selected for processing (9)
  • devtools/census_provider_vocabulary.py
  • docs/cli-reference.md
  • polylogue/cli/commands/check.py
  • polylogue/cli/shared/check_options.py
  • polylogue/cli/shared/check_validation.py
  • polylogue/cli/shared/machine_errors.py
  • tests/unit/cli/test_check.py
  • tests/unit/cli/test_check_support_runtime.py
  • tests/unit/devtools/test_census_provider_vocabulary.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fanout/provider-origin

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: 7cc9d662a0

ℹ️ 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 on lines +83 to +84
schema_providers=(*schema_providers, *legacy_schema_providers),
artifact_providers=(*artifact_providers, *legacy_artifact_providers),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Translate --*-origin values before provider workflows

When the new canonical flags are used with actual Origin tokens advertised elsewhere, for example --schema-origin codex-session or --artifact-origin chatgpt-export, these lines forward those strings into the legacy providers fields. The schema path first runs Provider.from_string() and maps origin-shaped strings to unknown-export, while artifact filtering compares _effective_provider() values such as codex/chatgpt to the original origin token, so the command returns zero/unknown rows despite matching data. Normalize canonical origin inputs separately from the deprecated provider aliases, or change the downstream requests to filter by origin.

Useful? React with 👍 / 👎.

@Sinity
Sinity merged commit 899fec7 into master Jul 13, 2026
3 of 16 checks passed
@Sinity
Sinity deleted the feature/fanout/provider-origin branch July 13, 2026 00:15
Sinity added a commit that referenced this pull request Jul 13, 2026
…807,2780,2790,2791,2795,2802,2806,2809

uwk3, jph5 (rigor-contracts #2783), bby.17 (web-cockpit #2793), dmp
(terminal-note #2801), ra3w (basetemp-fix #2807), r4no/bkff/r2kb
(extension-redesign #2780) fully satisfied — closed. nhjs (#2793), peo
(daemon-forensics #2802), 4g3n (#2780), 67ac/212.11 (demo-corpus #2795),
rsad (mcp-ergonomics #2790, real gaps remain per 5-iteration adversarial
cap), 9e5.8.4/jnj.7 (provider-origin #2806), mrxt/37t.12/p5g/rxdo.4
(annotation-judgment #2791), s7ae.8/20d.2 (live-performance-2 #2809)
partially satisfied — noted with disposition, left open.

Also discovered and documented the actual root cause of this session's
recurring bead-revert incidents: bd reimports the live database from
.beads/issues.jsonl on every CLI invocation, so a write not immediately
exported is lost the moment the next bd command runs. Every mutation in
this commit was individually export-verified against that behavior.

Co-Authored-By: Claude <[email protected]>
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