Skip to content

refactor: move schema maintenance commands to devtools - #354

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/schema-command-surfaces
Apr 22, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/schema-command-surfaces

Conversation

@Sinity

@Sinity Sinity commented Apr 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Keep polylogue schema focused on package inspection: list, compare, and explain.
  • Move provider schema maintenance to devtools via schema-generate, schema-promote, and schema-audit.
  • Regenerate CLI/devtools/quality/verification docs and showcase baselines for the narrowed product surface.

Problem

Schema commands mixed user-facing package inspection with provider package generation, evidence-cluster promotion, and committed-package audit gates. That made package-maintenance operations look like normal archive usage and kept the surface taxonomy from #331/#337 blurry.

Solution

  • Added devtools entrypoints over the existing schema operator workflow: devtools/schema_generate.py, devtools/schema_promote.py, and devtools/schema_audit.py.
  • Removed generate, promote, and audit from polylogue/cli/commands/schema.py without aliases.
  • Registered the moved commands in devtools/command_catalog.py and the verification-lab surface.
  • Removed the product showcase json-schema-audit contract and deleted the obsolete schema-maintenance help baselines.
  • Updated schema operator integration coverage so promotion and audit exercise the devtools entrypoints.

Verification

  • pytest -q tests/unit/devtools/test_schema_lab_commands.py tests/unit/devtools/test_devtools_main.py tests/unit/devtools/test_command_catalog.py tests/unit/cli/test_cli_error_boundaries.py::TestSchemaErrorBoundaries tests/unit/showcase/test_exercise_catalog.py
  • pytest -q tests/integration/test_schema_operator_workflow.py
  • devtools render-all
  • devtools verify-showcase --update
  • pytest -q tests/unit/devtools/test_schema_lab_commands.py tests/unit/devtools/test_devtools_main.py tests/unit/devtools/test_command_catalog.py tests/unit/cli/test_cli_error_boundaries.py::TestSchemaErrorBoundaries tests/unit/cli/test_terminal_snapshots.py tests/unit/showcase/test_exercise_catalog.py
  • devtools verify-showcase
  • devtools render-all --check
  • devtools verify
  • pre-push devtools verify --quick

Closes #338

@coderabbitai

coderabbitai Bot commented Apr 22, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 30 minutes and 12 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 30 minutes and 12 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f94bbce3-bd77-4e33-9e24-009adc6bf6e3

📥 Commits

Reviewing files that changed from the base of the PR and between 854b392 and e66b6f5.

📒 Files selected for processing (21)
  • devtools/command_catalog.py
  • devtools/schema_audit.py
  • devtools/schema_generate.py
  • devtools/schema_promote.py
  • docs/cli-reference.md
  • docs/devtools.md
  • docs/test-quality-workflows.md
  • docs/verification-catalog.md
  • polylogue/cli/commands/schema.py
  • polylogue/schemas/schema_inference.py
  • polylogue/showcase/generators.py
  • tests/baselines/showcase/help-main.txt
  • tests/baselines/showcase/help-schema-audit.txt
  • tests/baselines/showcase/help-schema-generate.txt
  • tests/baselines/showcase/help-schema-promote.txt
  • tests/baselines/showcase/help-schema.txt
  • tests/integration/test_schema_operator_workflow.py
  • tests/unit/cli/__snapshots__/test_terminal_snapshots.ambr
  • tests/unit/cli/test_cli_error_boundaries.py
  • tests/unit/devtools/test_devtools_main.py
  • tests/unit/devtools/test_schema_lab_commands.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/schema-command-surfaces

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.

@Sinity
Sinity merged commit 9d1400c into master Apr 22, 2026
12 checks passed
@Sinity
Sinity deleted the feature/refactor/schema-command-surfaces branch April 22, 2026 08:13

@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: e66b6f5b7b

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

default=None,
help="Privacy preset level. Defaults to standard.",
)
parser.add_argument("--privacy-config", type=Path, default=None, help="Path to TOML privacy config overrides.")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate --privacy-config path before running generation

The argparse migration dropped the old click.Path(exists=True) check, so a typoed --privacy-config path is now accepted and generation proceeds with fallback defaults instead of failing fast. In this command path, build_schema_privacy_config(...) only uses the parent directory, so users can think they loaded a specific override file while actually running with unintended privacy settings. Please restore explicit path validation here so incorrect config paths fail deterministically.

Useful? React with 👍 / 👎.

Sinity added a commit that referenced this pull request Apr 22, 2026
## Summary
- Keep `polylogue schema` focused on package inspection: `list`, `compare`, and `explain`.
- Move provider schema maintenance to devtools via `schema-generate`, `schema-promote`, and `schema-audit`.
- Regenerate CLI/devtools/quality/verification docs and showcase baselines for the narrowed product surface.

## Problem
Schema commands mixed user-facing package inspection with provider package generation, evidence-cluster promotion, and committed-package audit gates. That made package-maintenance operations look like normal archive usage and kept the surface taxonomy from #331/#337 blurry.

## Solution
- Added devtools entrypoints over the existing schema operator workflow: `devtools/schema_generate.py`, `devtools/schema_promote.py`, and `devtools/schema_audit.py`.
- Removed `generate`, `promote`, and `audit` from `polylogue/cli/commands/schema.py` without aliases.
- Registered the moved commands in `devtools/command_catalog.py` and the verification-lab surface.
- Removed the product showcase `json-schema-audit` contract and deleted the obsolete schema-maintenance help baselines.
- Updated schema operator integration coverage so promotion and audit exercise the devtools entrypoints.

## Verification
- `pytest -q tests/unit/devtools/test_schema_lab_commands.py tests/unit/devtools/test_devtools_main.py tests/unit/devtools/test_command_catalog.py tests/unit/cli/test_cli_error_boundaries.py::TestSchemaErrorBoundaries tests/unit/showcase/test_exercise_catalog.py`
- `pytest -q tests/integration/test_schema_operator_workflow.py`
- `devtools render-all`
- `devtools verify-showcase --update`
- `pytest -q tests/unit/devtools/test_schema_lab_commands.py tests/unit/devtools/test_devtools_main.py tests/unit/devtools/test_command_catalog.py tests/unit/cli/test_cli_error_boundaries.py::TestSchemaErrorBoundaries tests/unit/cli/test_terminal_snapshots.py tests/unit/showcase/test_exercise_catalog.py`
- `devtools verify-showcase`
- `devtools render-all --check`
- `devtools verify`
- pre-push `devtools verify --quick`

Closes #338
Sinity added a commit that referenced this pull request Apr 22, 2026
Schema commands mixed user-facing package inspection with provider
package generation, evidence-cluster promotion, and
committed-package audit gates. That made package-maintenance
operations look like normal archive usage and kept the surface
taxonomy from #331/#337 blurry.

Keeps `polylogue schema` focused on package inspection: `list`,
`compare`, and `explain`. Moves provider schema maintenance to
devtools via `schema-generate`, `schema-promote`, and
`schema-audit`. Adds devtools entrypoints over the existing schema
operator workflow (`devtools/schema_generate.py`,
`schema_promote.py`, `schema_audit.py`). Removes `generate`,
`promote`, and `audit` from `polylogue/cli/commands/schema.py`
without aliases. Registers the moved commands in
`devtools/command_catalog.py` and the verification-lab surface.
Removes the product showcase `json-schema-audit` contract; deletes
the obsolete schema-maintenance help baselines. Updates schema
operator integration coverage so promotion and audit exercise the
devtools entrypoints. Regenerates CLI / devtools / quality /
verification docs and showcase baselines.

Verification: pytest over schema-lab-commands / devtools-main /
command-catalog / schema-error-boundaries / terminal-snapshots /
exercise-catalog / schema-operator-workflow suites; devtools
render-all --check, verify-showcase, verify and --quick green.

Closes #338
Sinity added a commit that referenced this pull request Apr 22, 2026
Schema commands mixed user-facing package inspection with provider
package generation, evidence-cluster promotion, and
committed-package audit gates. That made package-maintenance
operations look like normal archive usage and kept the surface
taxonomy from #331/#337 blurry.

Keeps `polylogue schema` focused on package inspection: `list`,
`compare`, and `explain`. Moves provider schema maintenance to
devtools via `schema-generate`, `schema-promote`, and
`schema-audit`. Adds devtools entrypoints over the existing schema
operator workflow (`devtools/schema_generate.py`,
`schema_promote.py`, `schema_audit.py`). Removes `generate`,
`promote`, and `audit` from `polylogue/cli/commands/schema.py`
without aliases. Registers the moved commands in
`devtools/command_catalog.py` and the verification-lab surface.
Removes the product showcase `json-schema-audit` contract; deletes
the obsolete schema-maintenance help baselines. Updates schema
operator integration coverage so promotion and audit exercise the
devtools entrypoints. Regenerates CLI / devtools / quality /
verification docs and showcase baselines.

Verification: pytest over schema-lab-commands / devtools-main /
command-catalog / schema-error-boundaries / terminal-snapshots /
exercise-catalog / schema-operator-workflow suites; devtools
render-all --check, verify-showcase, verify and --quick green.

Closes #338
Sinity added a commit that referenced this pull request Apr 22, 2026
Schema commands mixed user-facing package inspection with provider
package generation, evidence-cluster promotion, and
committed-package audit gates. That made package-maintenance
operations look like normal archive usage and kept the surface
taxonomy from #331/#337 blurry.

Keeps `polylogue schema` focused on package inspection: `list`,
`compare`, and `explain`. Moves provider schema maintenance to
devtools via `schema-generate`, `schema-promote`, and
`schema-audit`. Adds devtools entrypoints over the existing schema
operator workflow (`devtools/schema_generate.py`,
`schema_promote.py`, `schema_audit.py`). Removes `generate`,
`promote`, and `audit` from `polylogue/cli/commands/schema.py`
without aliases. Registers the moved commands in
`devtools/command_catalog.py` and the verification-lab surface.
Removes the product showcase `json-schema-audit` contract; deletes
the obsolete schema-maintenance help baselines. Updates schema
operator integration coverage so promotion and audit exercise the
devtools entrypoints. Regenerates CLI / devtools / quality /
verification docs and showcase baselines.

Verification: pytest over schema-lab-commands / devtools-main /
command-catalog / schema-error-boundaries / terminal-snapshots /
exercise-catalog / schema-operator-workflow suites; devtools
render-all --check, verify-showcase, verify and --quick green.

Closes #338
@Sinity

Sinity commented Apr 28, 2026

Copy link
Copy Markdown
Owner Author

🤖 Post-hoc audit note: this PR received bot review feedback verified against current HEAD as part of #544. 1 finding(s) confirmed still present → tracked in #550.

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: split schema commands by product, ops, and lab intent

2 participants