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
While reviewing PR #625 (accelerator enum alignment), Codex surfaced two additional enum drifts that follow the same pattern but are structurally different enough to warrant their own PR. The new "enum update" rule added in #625 (.claude/CLAUDE.md line 559) prescribes the audit approach for both.
More substantively: the RecipeCriteria schema at api/aicr/v1/server.yaml:1222 has no platform property at all. This needs a new schema block written (not just an enum extension) — use the service / accelerator properties in the same schema as templates.
Doc pages that enumerate platforms need updating too (docs/README.md glossary and any contributor docs that list platform values).
api/aicr/v1/server.yaml:1028,1167 advertise INTERNAL_ERROR — the actual wire value is INTERNAL (the server serializes string(code) directly, confirmed by running the binary: {"code":"INVALID_REQUEST",...}). Any API client that matches on INTERNAL_ERROR never sees those errors.
docs/user/api-reference.md:565,567 list NO_MATCHING_RULE and INTERNAL_ERROR. Neither exists in pkg/errors — NO_MATCHING_RULE appears to be entirely invented; INTERNAL_ERROR is the same typo as above.
Grep every INTERNAL_ERROR in docs/ and api/aicr/v1/server.yaml and reconcile with pkg/errors/errors.go.
Risk consideration: this is a wire-value correction. External clients that coded handlers against the documented (wrong) names never actually matched; the fix reveals accurate behavior but may surface latent handler bugs in caller code. Worth a visible call-out in the PR description so API consumers notice.
RecipeCriteria schema in server.yaml has a platform property (string, enum, default any) consistent with the other CriteriaXxx properties in the same schema.
Every error-code string advertised in server.yaml and in docs/user/api-reference.md matches a constant in pkg/errors/errors.go.
New "enum update" rule bullet (.claude/CLAUDE.md:559) is used as the audit driver, and any additional audit targets discovered during this work are added to the bullet.
Context
While reviewing PR #625 (accelerator enum alignment), Codex surfaced two additional enum drifts that follow the same pattern but are structurally different enough to warrant their own PR. The new "enum update" rule added in #625 (.claude/CLAUDE.md line 559) prescribes the audit approach for both.
Scope
1. Platform enum drift + missing RecipeCriteria property
Code source of truth:
pkg/recipe/criteria.go:210definesCriteriaPlatformTypewith valueskubeflow,dynamo,nim.Drift:
api/aicr/v1/server.yamlplatformenum still lists onlykubeflow/any— missingdynamoandnim. At least two enum blocks to update, same pattern as the accelerator fix in fix(docs/api): fix, clean up docs and add doc update audit rule #625.RecipeCriteriaschema atapi/aicr/v1/server.yaml:1222has noplatformproperty at all. This needs a new schema block written (not just an enum extension) — use theservice/acceleratorproperties in the same schema as templates.docs/README.mdglossary and any contributor docs that list platform values).2. Error-code drift
Code source of truth:
pkg/errors/errors.go:21definesErrCode*constants (INTERNAL,NOT_FOUND,UNAUTHORIZED,TIMEOUT,SERVICE_UNAVAILABLE,INVALID_REQUEST).Drift:
api/aicr/v1/server.yaml:1028,1167advertiseINTERNAL_ERROR— the actual wire value isINTERNAL(the server serializesstring(code)directly, confirmed by running the binary:{"code":"INVALID_REQUEST",...}). Any API client that matches onINTERNAL_ERRORnever sees those errors.docs/user/api-reference.md:565,567listNO_MATCHING_RULEandINTERNAL_ERROR. Neither exists inpkg/errors—NO_MATCHING_RULEappears to be entirely invented;INTERNAL_ERRORis the same typo as above.INTERNAL_ERRORindocs/andapi/aicr/v1/server.yamland reconcile withpkg/errors/errors.go.Risk consideration: this is a wire-value correction. External clients that coded handlers against the documented (wrong) names never actually matched; the fix reveals accurate behavior but may surface latent handler bugs in caller code. Worth a visible call-out in the PR description so API consumers notice.
Acceptance criteria
api/aicr/v1/server.yamlplatformenum matchesCriteriaPlatformTypeexactly.RecipeCriteriaschema inserver.yamlhas aplatformproperty (string, enum, defaultany) consistent with the otherCriteriaXxxproperties in the same schema.server.yamland indocs/user/api-reference.mdmatches a constant inpkg/errors/errors.go..claude/CLAUDE.md:559) is used as the audit driver, and any additional audit targets discovered during this work are added to the bullet.make qualifypasses.Why not folded into #625
platformneeds a new OpenAPI schema property, not just enum extension — different shape of change.Related