Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughIntroduces a Phase‑2 Editing CLI: new CLI module and dispatcher wiring, formal ADR/spec/docs describing commands (patch, make, ops, validate), comprehensive tests, and task/tracking updates. No public API surface changes beyond CLI wrappers. Changes
Sequence Diagram(s)sequenceDiagram
participant User as "User (shell)"
participant CLI as "exstruct CLI\n(src/exstruct/cli/edit.py)"
participant EditLib as "exstruct.edit\n(patch/make)"
participant Validator as "exstruct.mcp.validate_input"
participant FS as "Filesystem / Workbook"
User->>CLI: run `exstruct patch|make|ops|validate` + args
CLI->>CLI: parse args, load --ops JSON (file/stdin)
CLI->>EditLib: call patch_workbook / make_workbook / ops helpers
EditLib->>FS: read/write workbook files
EditLib-->>CLI: return PatchResult / ops list / schema
CLI->>Validator: (validate command) validate_input(file)
Validator-->>CLI: validation result (is_readable, warnings, errors)
CLI->>User: write JSON to stdout, write errors to stderr, exit code
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds the Phase 2 “editing CLI” surface to exstruct while preserving the legacy extraction entrypoint via first-token dispatch, and updates specs/ADRs/public docs plus regression tests to codify the new contract.
Changes:
- Introduce editing subcommands (
patch,make,ops list/describe,validate) implemented insrc/exstruct/cli/edit.pywith JSON-first output + exit-code rules. - Add first-token dispatch in
src/exstruct/cli/main.pyso legacyexstruct INPUT.xlsx ...continues to use the extraction parser. - Add CLI regression tests and update ADR/spec/public docs/README parity for the Phase 2 boundary.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cli/test_edit_cli.py | New end-to-end-ish in-process tests covering edit subcommands + dispatch boundary. |
| tasks/todo.md | Project log entry for Phase 2 CLI work and verification commands. |
| tasks/feature_spec.md | Captures Phase 2 goal/contract/boundaries and permanent references. |
| src/exstruct/cli/main.py | Adds first-token dispatch to route edit subcommands to the new edit parser; updates help epilog. |
| src/exstruct/cli/edit.py | Implements the editing subcommand parser, JSON I/O helpers, and wrappers over exstruct.edit + validate helper. |
| docs/cli.md | Documents the dual extraction-vs-editing CLI surface and edit command flags. |
| docs/api.md | Notes the matching operational CLI for the editing API. |
| dev-docs/specs/editing-cli.md | New internal spec defining the Phase 2 editing CLI contract. |
| dev-docs/specs/editing-api.md | Notes Phase 2 CLI wrapper exists and links to the CLI spec. |
| dev-docs/architecture/overview.md | Adds cli/edit.py and describes the dispatch layering. |
| dev-docs/adr/index.yaml | Registers ADR-0007 in the ADR index. |
| dev-docs/adr/decision-map.md | Adds ADR-0007 to the decision map domains. |
| dev-docs/adr/README.md | Adds ADR-0007 to the ADR README table. |
| dev-docs/adr/ADR-0007-editing-cli-as-public-operational-interface.md | New ADR recording the policy/compatibility decision for the editing CLI. |
| README.md | Adds Quick Start section for the editing CLI. |
| README.ja.md | Adds Japanese Quick Start parity for the editing CLI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Summary
patch,make,ops list,ops describe,validate) from the existingexstructconsole script.exstruct INPUT.xlsx ...unchanged via first-token dispatch insrc/exstruct/cli/main.py.Acceptance Criteria (Issue #99 Phase 2)
exstruct.patch/make/ops/validatefollow the JSON-first output and exit-code contract.Validation
uv run pytest tests/cli/test_edit_cli.py tests/cli/test_cli.py tests/cli/test_cli_alpha_col.py tests/edit/test_api.py tests/mcp/test_validate_input.py -quv run task precommit-rundocs/cli.md,docs/api.md,README.md,README.ja.md,dev-docs/).Summary by CodeRabbit
New Features
Documentation
Tests