fix(processing): honor a tool's recommended output extension over the… - #1901
Conversation
… table default excel_to_table's output param is data_kind "table", so leaving the output path blank made the WASM runner default it to .csv. Its writer is the generic vector-format dispatch (same as GeoParquet/GPKG tools), which has no CSV driver, so the tool failed its own default with "unsupported output path" -- readable input (21542 rows x 10 columns from a legacy .xls), unusable default output. Same failure shape as opengeos#1074. The param's own description already names the extension that works ("GeoParquet .parquet recommended"); outputTextFormatHint now honors an explicit "<ext> recommended" in the description before falling back to the generic csv/html/json/table heuristics. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe processing client now recognizes an explicit recommended output extension before applying other format heuristics. Tests verify that the recommendation overrides the table default, explicit paths remain authoritative, and decimal values are ignored. ChangesOutput extension hints
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized change makes the tool honor its recommended output extension when no output path is provided. No actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. 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 |
There was a problem hiding this comment.
Pull request overview
This PR fixes a Whitebox WASM “default output path” failure for table-producing tools (notably excel_to_table) by preferring the tool author’s explicitly recommended output extension when the user leaves the output path blank, instead of blindly defaulting data_kind: "table" outputs to .csv.
Changes:
- Updated
outputTextFormatHintto detect and honor a".<ext> recommended"hint in an output parameter’s description before applying existing CSV/HTML/JSON/table heuristics. - Added a regression test asserting that a recommended extension (e.g.
.parquet) overrides the table default while still letting an explicit user-chosen path win.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/wasm-tool-manifests.test.ts | Adds coverage ensuring “.parquet recommended” in a table output’s description overrides the .csv default when the output path is blank. |
| packages/processing/src/wasm-client.ts | Implements recommended-extension parsing in outputTextFormatHint, which feeds the WASM runner’s and dialog’s shared output extension logic. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
/claude-review |
🔍 Cloudflare PR preview
|
Code reviewBugs
Security
Performance
Quality
CLAUDE.md
|
🔍 GitHub Pages PR preview
Note GitHub Pages built this preview successfully, but its serving edge returned HTTP 403 when checked. The links may still be propagating. |
- Require the recommended-extension capture in `outputTextFormatHint` to
start with a letter (`/\.([a-z][a-z0-9]*)\s+recommended/i`), so a decimal
in a parameter's prose ("a tolerance of 0.5 recommended") can no longer be
read as an extension and short-circuit the csv/html/json/table heuristics.
- Add a regression test covering that case.
… table default
excel_to_table's output param is data_kind "table", so leaving the output path blank made the WASM runner default it to .csv. Its writer is the generic vector-format dispatch (same as GeoParquet/GPKG tools), which has no CSV driver, so the tool failed its own default with "unsupported output path" -- readable input (21542 rows x 10 columns from a legacy .xls), unusable default output. Same failure shape as #1074.
The param's own description already names the extension that works ("GeoParquet .parquet recommended"); outputTextFormatHint now honors an explicit " recommended" in the description before falling back to the generic csv/html/json/table heuristics.
Summary by CodeRabbit
New Features
Bug Fixes