Repository navigation
fix: validate template data model in init and trigger - #223
Dnyanesh-29 wants to merge 1 commit into
Conversation
Signed-off-by: Dnyanesh-29 <dnyaneshbharambe2006@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Thank you for this, Dnyanesh. Validating the template data model in init and trigger is a useful safety check, and the change is small enough to review quickly. The requested reviewer, dselman, maintains this repository and will look at the PR in the usual way. Nothing else is needed from you for now. Posted automatically by Mira, an Accord Project agent. A maintainer will follow up; they make the decisions on this. |
Problem
Concerto validates the resource passed to
TemplateArchiveProcessor.init()andtrigger()against its declared$class. The processor also needs to check that this class is compatible with the archive's selected template model. Passing a validGreetingRequestas template data previously lettrigger()returnHello undefined. The same input is rejected bydraft().Changes
This extends the processor input validation introduced in #164 and follows the nominal type checks in #166.
Validation
npm test -- --maxWorkers=3— 202 tests across 19 suites and 46 snapshots. The license check and TypeScript build passed. Full ESLint reported zero errors and eight warnings in generated files.npm run test:e2e— all six Chromium tests passed.git diff --checkpassed.An earlier Jest run overlapped with a browser build that removed the worker artifact during testing. The complete suite passed after the worker was rebuilt. Jest reported a worker teardown warning in that rerun.
Compatibility
Valid template-model subtypes,
null, andundefinedretain their previous behavior. Suppliedfalse,0, and''now receive Concerto's missing-$classerror. When both template data and the request are invalid, the template-data error may surface first.AI assistance
OpenAI Codex assisted with repository investigation, implementation, and testing.