Skip to content

[Py SDK] Implement plugin-output + mapping-definition validation #744

Closed

Description

@SnowboardTechie

Summary

Implement the validation strategy defined in ADR-0022, Decisions #7 and #9: definePlugin() wraps the final toCommon / fromCommon with runtime schema validation (.parse() / model_validate()) and produces a TransformResult<T> of { result, errors } unconditionally; mapping definitions are validated at buildTransforms() call time. Transformation errors extend a single PluginError base with structured context.

Acceptance criteria

  • Implement ADR-0022 Decisions Publish static site to GitHub pages #6–9
  • Review-driven refinements not captured in the ADR text:
    • buildTransforms() treats declared customFields as valid target paths during field-path resolution (per @jcrichlake, #753 thread)
    • PluginError does not carry an index field; batch position attribution is caller-side via .map / list comprehension (per @jcrichlake, #753 thread)
    • PluginError.sourceValue excluded from default string / repr output — strengthens Decision ADR - Website hosting #9's adopter-redaction stance into a defensive SDK default
  • Unit tests cover each refinement above plus the ADR-specified behaviors
  • Per-call handler scoping documented with an example
  • Figure out if safe_transform(transform, inputs) with matching semantics actually needs exported or not, if so, export it

Related

Activity

  1. added 2 commits that reference this issue on Apr 21, 2026
  2. changed the title [-][SDK] Implement adapter-output + mapping-definition validation[/-] [+][SDK] Implement plugin-output + mapping-definition validation[/+] on Apr 22, 2026
  3. 3 remaining items

  4. changed the title [-][SDK] Implement plugin-output + mapping-definition validation[/-] [+][Py SDK] Implement plugin-output + mapping-definition validation[/+] on May 14, 2026
  5. added 4 commits that reference this issue on May 20, 2026
  6. moved this from Todo to In Progress in Simpler Grants Product & Deliveryon May 22, 2026
  7. jcrichlake commented on May 29, 2026

    @jcrichlake
    Collaborator

    Safe-transforms was a hold over from a now defunct design and is not needed. The other areas have been addressed.

  8. added 2 commits that reference this issue on Jun 2, 2026
  9. added a commit that references this issue on Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

py-sdkRelated to Python SDKpythonIssue or PR related to Python toolingsdkIssue or PR related to our SDKs

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions