fix(posthog): align tool params with subBlock canonical to fix missing-field error#4455
fix(posthog): align tool params with subBlock canonical to fix missing-field error#4455waleedlatif1 merged 1 commit intostagingfrom
Conversation
…g-field error Tool params were named `personalApiKey` but the subBlock resolves to canonical `apiKey`, so canonical-group resolution wrote the value to params.apiKey while the validator looked up params.personalApiKey and reported it missing. Renames `personalApiKey` -> `apiKey` in get_person, query, list_persons, delete_person, and types.ts. Also tightens check-block-registry.ts so a subBlock with canonicalParamId no longer satisfies a tool param lookup by its raw id (the raw id is deleted during extraction).
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview This renames the PostHog tool param/key from Updates Reviewed by Cursor Bugbot for commit f08cde0. Configure here. |
Greptile SummaryThis PR fixes a missing-field validation error in PostHog tools caused by a mismatch between the subBlock's
Confidence Score: 5/5Safe to merge — the fix is complete, the rename is consistent across all affected tools, and the hardened registry check prevents the same class of mismatch from going undetected in the future. All four affected tools and the shared type now agree on No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User as User (UI)
participant SB as SubBlock (id: personalApiKey, canonicalParamId: apiKey)
participant Ser as Serializer / extractParams
participant Tool as PostHog Tool (get_person / query / etc.)
participant PH as PostHog API
User->>SB: enters Personal API Key
SB->>Ser: { id: "personalApiKey", value: "key" }
Note over Ser: canonicalParamId present → write to params["apiKey"]
Ser->>Tool: params = { apiKey: "key", ... }
Note over Tool: Before fix: looked up params.personalApiKey → undefined
Note over Tool: After fix: looks up params.apiKey → key
Tool->>PH: Authorization: Bearer key
PH-->>Tool: 200 OK
Reviews (1): Last reviewed commit: "fix(posthog): align tool params with sub..." | Re-trigger Greptile |
Summary
personalApiKeywhile the subBlock resolves to canonicalapiKey, so canonical-group resolution wrote the value toparams.apiKeywhile the validator looked upparams.personalApiKeyand reported it as missingpersonalApiKey→apiKeyinget_person,query,list_persons,delete_person, andtypes.tscheck-block-registry.tsso a subBlock withcanonicalParamIdno longer satisfies a tool param lookup by its raw id (the raw id is deleted during extraction)personalApiKeyis unchanged, so persisted user workflows are unaffectedType of Change
Testing
Tested manually. Serializer suite + canonical-id audit pass.
Checklist