feat(issue-lifecycle): add platform type to IssueType Zod schema #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/issue-lifecycle-platform-type"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
"platform"to theIssueTypeZod enum inextensions/models/_lib/schemas.tsso the issue-lifecycle model accepts the new admin-only platform issue type at runtimeextensions/models/issue_lifecycle.tsTest plan
Adversarial Review
Scope: Only two non-generated files were changed:
issue-lifecycle/extensions/models/_lib/schemas.ts(line 93)issue-lifecycle/extensions/models/issue_lifecycle.ts(line 559)All other changed files are under
model/and are auto-generated — skipped per project rules.Analysis
The PR adds
"platform"to theIssueTypeZod enum and the corresponding TypeScript union literal in thetriagetool'sexecutesignature.Tracing the data flow of the
typefield:schemas.ts:93):IssueTypeenum now includes"platform"— any triage call withtype: "platform"will pass validation.schemas.ts:127):ClassificationSchema.typereferences the sameIssueType— consistent.issue_lifecycle.ts:586):args.typeis written to theclassificationresource as data — no branching on specific type values.issue_lifecycle.ts:598): Phase goes to"classified"regardless of type — no issue.swamp_club.ts:191-192):updateType()sends the type as a string to the API viapatchIssue()— no local validation beyond the Zod enum.issue_lifecycle.ts:621-635): Type is interpolated into a summary string and included in the payload — no conditional logic.There are no
switchstatements,ifchains, or any other conditional branching onIssueTypevalues in the codebase. The type flows through as opaque data. Adding a new enum value is safe.Checked for omissions:
swamp_club.ts:126castsissue.type ?? "feature"asIssueType— this is in unchanged code and works correctly; issues already typed as"platform"on the server will now be accepted by the Zod schema rather than failing validation at runtime. This is actually a fix for what would have been a latent runtime error if the server ever returnedtype: "platform".Verdict
PASS — Minimal, consistent change. The new
"platform"enum value is properly propagated to both the Zod schema and the TypeScript type annotation. No downstream logic depends on exhaustive matching of issue types, so no missing cases are introduced.Code Review
Blocking Issues
PR will revert recent model regeneration (needs rebase) — This PR was branched before
a8676ee9("chore: regenerate models from upstream schemas #24") landed on main. Merging as-is would:model/aws/resiliencehubv2/service (policy, service, system models + manifest) that was added in #24model/aws/bedrockagentcore/extensions/models/payment_connector.tsbedrockagentcore,connectcampaignsv2,elasticache,rtbfabric,sagemaker, and multiple GCP services back to pre-#24 versionsgateway.tsandgateway_target.ts(e.g., re-addingAUTHENTICATE_ONLYtoAuthorizerType, removingProtocolType)The fix is to rebase this branch onto the current
mainbefore merging. The only intended diff should be the two lines changed inissue-lifecycle/.Model files have schema changes without codegen/ changes — Per CLAUDE.md: "Never hand-edit files under
model/. Fix the codegen pipeline incodegen/<provider>/and regenerate instead." The review criteria state that model files changing beyond version/upgrade entries without correspondingcodegen/changes is a blocking issue. Nocodegen/files are modified in this PR, yet 57 model files have substantive schema changes. (This is a consequence of issue #1 — the rebase will eliminate these diff hunks entirely once the PR is brought up to date with main.)IssueType schema change is missing a model version bump and upgrade entry —
issue_lifecycle.tskeepsversion: "2026.05.21.1"unchanged despite the schema now accepting a new"platform"value. CLAUDE.md states CI auto-publishes whenmanifest.yamlchanges with a newer version. Without bumping the model version (and correspondingly updatingissue-lifecycle/manifest.yaml), the change will not be published to the registry and deployed instances will continue to rejecttype: "platform"at runtime. A new version (e.g.,"2026.06.03.1") and a corresponding upgrade entry in theupgradesarray are needed.Suggestions
IssueTypeas a manual union — Theexecuteparameter atissue_lifecycle.ts:559spells outtype: "bug" | "feature" | "platform" | "security"manually. This PR demonstrates the maintenance burden: bothschemas.tsandissue_lifecycle.tshad to be updated. Changing the annotation to useIssueType(orz.infer<typeof IssueType>) would make future additions automatic and eliminate the risk of them drifting apart.