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
Out-of-scope observation from implementing #6227, recorded per PD #10. Unassigned, not queued — filed for triage grading. Duplicate search: no open issue matches SkillTriggerCondition or triggerConditions operator value shape.
Fact
SkillTriggerConditionSchema (packages/spec/src/ai/skill.zod.ts:20-29) has the same operator/value decoupling #6227 fixes on ViewFilterRuleSchema:
{ field: 'userRole', operator: 'in', value: 'admin' } — a set operator with a scalar — parses today, exactly like the #6227 shape did.
Why this is an OBSERVATION and not the same defect
Measured in the consumer rather than assumed. SkillRegistry.evaluateCondition (cloud repo, packages/service-ai/src/skill-registry.ts:171-181) normalizes the scalar itself:
case 'in': {
constlist=Array.isArray(expected) ? expected : [expected];returnlist.includes(fieldValueasstring);}
So there is no two-stage failure here — nothing 400s or 500s, and the scalar evaluates to the predicate an author would expect. This is the key difference from #6227, whose runtime half genuinely refuses the shape (assertListComparandShapes, 400 INVALID_FILTER). Nothing a user hits today, hence finding and no pm:queue.
Why it is still worth recording
It is a consumer-side lenient coercion standing in for a contract the producer surface never declared — the Array.isArray(x) ? x : [x] shape the repo's contract-first rule treats as the wrong side of the fix. The cost is not a broken query but a second dialect: triggerConditions accepts two spellings of one predicate, and only one of them is what an author reading the schema would write. For a surface whose authors are increasingly AI-generated, "declared = enforced" is the property that keeps generated metadata honest.
Note the two surfaces are genuinely independent — triggerConditions is evaluated by the cloud agent runtime (skill.zod.ts:212: "evaluated by the cloud agent runtime only"), NOT lowered through AST_OPERATOR_MAP into an objectql filter — so #6227's fix does not reach it and no shared helper covers both today.
B. Leave the schema, delete nothing, and record the coercion as deliberate in the consumer's docblock.
C. Leave as-is (current state): the tolerance is undocumented and invisible from the schema.
No recommendation pre-empted — the "real business need" axis (who actually authors triggerConditions, and whether any of them write the scalar form) is not measurable from this repo, and that measurement should drive the call.
Out-of-scope observation from implementing #6227, recorded per PD #10. Unassigned, not queued — filed for triage grading. Duplicate search: no open issue matches
SkillTriggerConditionortriggerConditions operator value shape.Fact
SkillTriggerConditionSchema(packages/spec/src/ai/skill.zod.ts:20-29) has the same operator/value decoupling #6227 fixes onViewFilterRuleSchema:{ field: 'userRole', operator: 'in', value: 'admin' }— a set operator with a scalar — parses today, exactly like the #6227 shape did.Why this is an OBSERVATION and not the same defect
Measured in the consumer rather than assumed.
SkillRegistry.evaluateCondition(cloud repo,packages/service-ai/src/skill-registry.ts:171-181) normalizes the scalar itself:So there is no two-stage failure here — nothing 400s or 500s, and the scalar evaluates to the predicate an author would expect. This is the key difference from #6227, whose runtime half genuinely refuses the shape (
assertListComparandShapes, 400INVALID_FILTER). Nothing a user hits today, hencefindingand nopm:queue.Why it is still worth recording
It is a consumer-side lenient coercion standing in for a contract the producer surface never declared — the
Array.isArray(x) ? x : [x]shape the repo's contract-first rule treats as the wrong side of the fix. The cost is not a broken query but a second dialect:triggerConditionsaccepts two spellings of one predicate, and only one of them is what an author reading the schema would write. For a surface whose authors are increasingly AI-generated, "declared = enforced" is the property that keeps generated metadata honest.Note the two surfaces are genuinely independent —
triggerConditionsis evaluated by the cloud agent runtime (skill.zod.ts:212: "evaluated by the cloud agent runtime only"), NOT lowered throughAST_OPERATOR_MAPinto an objectql filter — so #6227's fix does not reach it and no shared helper covers both today.Options, if graded live
valueby operator, mirroring [finding][spec] ViewFilterRuleSchema.value 不按算子约束形状 —— 集合算子配标量在发布期通过,直到运行时才拿到 400 #6227 (in/not_inrequire an array), and drop the consumer's coercion. Contract-first; costs a breaking-ish tightening on a surface with unmeasured external authorship.No recommendation pre-empted — the "real business need" axis (who actually authors
triggerConditions, and whether any of them write the scalar form) is not measurable from this repo, and that measurement should drive the call.Refs: #6227, PR for #6227, #5869.
Generated by Claude Code