fix: address PR #62 review feedback for zero-argument CLI demos#63
Conversation
Delete the hand-written output models: pipelex codegen projects each method's concepts into piper/generated/<method>/models.py (stamped, locked by a sibling codegen.lock); the examples keep only the bundle path, pipe code, and the parse() narrower. generate-image now parses into the generated built-in Image model. New make codegen (regen, write-if-changed) + make codegen-check (offline drift check) targets — the pipelex CLI is not a dependency, point the PIPELEX make variable at an install that ships codegen; CI wiring is release-gated on a published pipelex. Adds inputs.template.json scaffolds beside each bundle, offline smoke tests for the generated clients, and docs/codegen.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EaRwjPbPsan4rCeyWirKpp
…p comments Cold-review triage: package each codegen.lock as package data so the offline drift check also works against an installed copy, and cross-reference the three places the method list is enumerated (piper/methods/*, pyproject packages, the Makefile codegen targets). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EaRwjPbPsan4rCeyWirKpp
…+ flattened Image Regenerated with the codegen engine after the native-materialization change: Image now emits width/height integer fields instead of the interim dict-with-imprecision size, and native field descriptions come from the pinned normative definitions (storage-neutral url wording, described Text). Crate fingerprints and stamps updated accordingly; codegen-check green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ight) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… suite for document input handling
- Added `piper.detached` package with CLI commands for starting and managing durable runs. - Implemented commands: `extract-entities`, `summarize-pdf`, `generate-image`, `wait`, `status`, and `result`. - Created shared input handling functions in `piper.inputs` for text and document inputs. - Enhanced error presentation in `piper.errors` to provide mode-specific hints. - Updated tests to cover the new detached mode and ensure symmetry across CLI modes. - Refactored existing tests to align with the new structure and added new unit tests for input handling.
…ples - Updated all demo commands to utilize bundled sample inputs when no arguments are provided, ensuring a working result on the first command execution. - Introduced a `sample` parameter in `read_text_input()` to facilitate this feature. - Enhanced error handling to surface detailed API error messages instead of generic httpx errors, improving user feedback. - Refactored execution modes into self-contained units, removing the previous shared dispatch structure for clarity and maintainability. - Updated documentation to reflect changes in execution modes and sample usage. - Added tests to verify that demos correctly fall back to sample inputs when no user input is provided.
Guards bootstrap against package names that collide with the piper placeholder, and refines sample-input/error handling in the attended CLI mode with corresponding test coverage updates. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA5fmhTMLRLTJgVmCsW6da
Greptile SummaryThis PR makes each CLI demo runnable without explicit input and reorganizes execution around mode-specific commands. The main changes are:
Confidence Score: 4/5The installed zero-argument PDF demo needs a fix before merging. Text sample fallbacks and mode-specific lifecycle paths are consistent. Installed wheels do not contain the PDF at the path used by all three piper/inputs.py and pyproject.toml
What T-Rex did
Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
piper/inputs.py:33
**Installed PDF Sample Is Missing**
The default path leaves the `piper` package and relies on the repository-level `samples` directory, which is not included in the wheel package data. After a normal installation, running `piper blocking summarize-pdf` without an argument—and likewise the attended or detached variant—fails with `No such file` instead of using the advertised sample.
Reviews (1): Last reviewed commit: "fix: address PR #62 review feedback for ..." | Re-trigger Greptile |
# Conflicts: # CHANGELOG.md # CLAUDE.md # README.md # docs/cli-architecture.md # docs/codegen.md # piper/attended/cli.py # piper/errors.py # piper/inputs.py # tests/e2e/test_extract_entities.py # tests/unit/test_errors.py # tests/unit/test_inputs.py
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 02c7a44f15
ℹ️ 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".
The bootstrap script's rewrite set never included the Makefile, so the codegen targets kept pointing at piper/generated and piper/methods after a rename, breaking make codegen / make codegen-check on bootstrapped projects. Same gap for the docs under docs/, which went stale. Both are now in the rewrite set (the generic context-aware token pass handles their path/command forms), SKILL.md lists them, and a non-dry-run test asserts the rewritten paths. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AA5fmhTMLRLTJgVmCsW6da
Summary
piperplaceholder (e.g.piper_tools), which would otherwise corrupt the pyproject transformTest plan
make agent-checkmake agent-test🤖 Generated with Claude Code
https://claude.ai/code/session_01AA5fmhTMLRLTJgVmCsW6da