You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Py SDK] Port transformWithMapping to @common-grants/sdk; add handler-registry API #745
Port website/src/lib/transformation.ts into lib/ts-sdk/src/extensions/transformation.ts, update the website to import from @common-grants/sdk, and expose buildTransforms() with a per-call handlers? argument as the public API in both SDKs — matching ADR-0022 Decision #8 (handlers registered per call, not globally). The Python equivalent (common_grants_sdk/utils/transformation.py) is already in the SDK but needs its public API formalized.
FYI: ADR 0022 Decision #8 in #753 was updated with one handler-registry guardrail worth noting before implementation starts.
Handler-name lookup on the per-call handlers registry should use own-property access (Object.hasOwn in TypeScript, explicit dict in checks in Python) rather than naive handlers[name]. The reason: mergeExtensions() reconstitutes mapping JSON that can originate from untrusted extension packages, and a plain lookup could resolve inherited prototype or class-dict members like __proto__, constructor, or toString and execute them as handlers.
No ADR changes needed here, just flagging so the lookup path gets the right shape on the first pass.
I think some wires got crossed on this story, I don't think we want to move the websites transformation code into the SDK. The flow should be website to SDK in terms of data models etc. I think the transformation code in the website could perhaps be used a base for the typescript portion.
That being said I think the first 2 AC can be removed
changed the title [-][SDK] Port transformWithMapping to @common-grants/sdk; add handler-registry API[/-][+][Py SDK] Port transformWithMapping to @common-grants/sdk; add handler-registry API[/+]on May 14, 2026
Activity
docs(adr): #657 complete adapter contract sections in ADR 0022
docs(adr): #657 fold Q5-Q8 into Decision list; drop Additional section
docs(adr): #657 add Q5-Q8 decisions to ADR-0022 plugin framework
docs(adr): #657 add Q5-Q8 decisions to ADR-0022 plugin framework
SnowboardTechie commentedon Apr 23, 2026
FYI: ADR 0022 Decision #8 in #753 was updated with one handler-registry guardrail worth noting before implementation starts.
Handler-name lookup on the per-call
handlersregistry should use own-property access (Object.hasOwnin TypeScript, explicit dictinchecks in Python) rather than naivehandlers[name]. The reason:mergeExtensions()reconstitutes mapping JSON that can originate from untrusted extension packages, and a plain lookup could resolve inherited prototype or class-dict members like__proto__,constructor, ortoStringand execute them as handlers.No ADR changes needed here, just flagging so the lookup path gets the right shape on the first pass.
review: trim implementation detail from ADR Q5-Q8
docs(adr): collapse safeTransform into TransformResult<T>
docs(adr): #657 Q5-Q8 sub-decisions for ADR 0022 (#753)
jcrichlake commentedon May 13, 2026
I think some wires got crossed on this story, I don't think we want to move the websites transformation code into the SDK. The flow should be website to SDK in terms of data models etc. I think the transformation code in the website could perhaps be used a base for the typescript portion.
That being said I think the first 2 AC can be removed
[-][SDK] Port transformWithMapping to @common-grants/sdk; add handler-registry API[/-][+][Py SDK] Port transformWithMapping to @common-grants/sdk; add handler-registry API[/+]