Skip to content

refactor(sdk,mcp,cli): enforce report filter and label color validation at SDK boundary#291

Merged
adriannoes merged 2 commits into
feat/card-phase-erg/6-docs-and-skillsfrom
feat/card-phase-erg/7-sdk-boundary-validation
Jun 11, 2026
Merged

refactor(sdk,mcp,cli): enforce report filter and label color validation at SDK boundary#291
adriannoes merged 2 commits into
feat/card-phase-erg/6-docs-and-skillsfrom
feat/card-phase-erg/7-sdk-boundary-validation

Conversation

@adriannoes

@adriannoes adriannoes commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

PR 7 of the card-phase stack, stacked on #285.

The diff exceeds the usual 10-file guideline because it is one structural move (one decision point replacing twelve guards, with relocated test coverage); it nets less code at the surfaces.

Comment thread packages/cli/src/pipefy_cli/commands/report_pipe.py Outdated
Comment thread packages/cli/tests/test_label_webhook_commands.py Outdated
Comment thread CHANGELOG.md Outdated
Comment thread docs/mcp/tools/reports.md Outdated
@adriannoes adriannoes force-pushed the feat/card-phase-erg/6-docs-and-skills branch from 6f9248b to febf922 Compare June 11, 2026 20:14
adriannoes and others added 2 commits June 11, 2026 17:26
…on at SDK boundary

Report ReportCardsFilter preflight and label color normalization were
decisions wired at twelve effect sites (six MCP report tools, six CLI
commands). Move them into the SDK funnel they all forward through:
ReportService create/update/export methods normalize the filter and
raise ValueError with the planner message, and PipeConfigService
create_label/update_label normalize the hex color. One decision point
replaces twelve leaf guards; MCP returns the same error envelope via an
explicit ValueError catch and the CLI maps ValueError to exit code 2
(typer.BadParameter for report commands), so messages and exit codes
are unchanged.

Also renames validate_report_cards_filter -> report_cards_filter_error
to match its str|None return (error message or None).

Co-authored-by: Gabriel Custodio <gbrlcustodio@users.noreply.github.com>
Restore CLI preflight at option-parse time using SDK planners so invalid
input fails before get_authenticated_client. Extract prepare_report_cards_filter
for shared use; rename stale tests; amend CHANGELOG and reports docs per review.
@adriannoes adriannoes force-pushed the feat/card-phase-erg/7-sdk-boundary-validation branch from c9fbca0 to f731b2f Compare June 11, 2026 20:28
@adriannoes adriannoes merged commit fabb4f1 into feat/card-phase-erg/6-docs-and-skills Jun 11, 2026
1 check passed
adriannoes added a commit that referenced this pull request Jun 11, 2026
feat: card-phase ergonomics stack (SDK, MCP, CLI, docs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants