fix: sync commandless chat trigger schema - #28
Conversation
| repository pull request and verify that the generated draft grounds every claim | ||
| in the selected commit. | ||
|
|
||
| ## create-workflow chat catch-all schema sync — 2026-08-22 |
There was a problem hiding this comment.
🟡 Eval log says "catch-all"; PR says "commandless".
--- a/evals/results.md
+++ b/evals/results.md
@@ -159,7 +159,7 @@ Pending (human): run the scenario in a fresh agent session against a public
repository pull request and verify that the generated draft grounds every claim
in the selected commit.
-## create-workflow chat catch-all schema sync — 2026-08-22
+## create-workflow commandless chat trigger schema sync — 2026-08-22
Method: synchronized the bundled v1 trigger definitions and authoring guidance
with source commit `748107cc025bfaab890a4e37161c8e29a64c3c20`, then ran the
🤖 Fix with your agent
Fix this code review finding (aictrl-dev/skills PR #28, evals/results.md:162):
Problem: Eval log says "catch-all"; PR says "commandless"
Detail: The new eval section is titled "create-workflow chat catch-all schema sync", but the schema descriptions, authoring-guide.md, and the PR title all call this feature "commandless". The term "catch-all" is also semantically misleading: commandless mode is the opposite of catch-all — it fires only for chats in a required non-empty allowlist.
Suggested fix: Rename the heading to "create-workflow commandless chat trigger schema sync — 2026-08-22" so the log entry uses the same terminology as the schema and authoring guide it claims to validate.
Suggested patch:
--- a/evals/results.md
+++ b/evals/results.md
@@ -159,7 +159,7 @@ Pending (human): run the scenario in a fresh agent session against a public
repository pull request and verify that the generated draft grounds every claim
in the selected commit.
-## create-workflow chat catch-all schema sync — 2026-08-22
+## create-workflow commandless chat trigger schema sync — 2026-08-22
Method: synchronized the bundled v1 trigger definitions and authoring guidance
with source commit `748107cc025bfaab890a4e37161c8e29a64c3c20`, then ran the
Implement the fix on the PR head branch and add a regression test that fails before the fix and passes after.
Why this matters
The new eval section is titled "create-workflow chat catch-all schema sync", but the schema descriptions, authoring-guide.md, and the PR title all call this feature "commandless". The term "catch-all" is also semantically misleading: commandless mode is the opposite of catch-all — it fires only for chats in a required non-empty allowlist.
Pending (human): run the scenario in a fresh agent session against a public
repository pull request and verify that the generated draft grounds every claim
in the selected commit.
## create-workflow chat catch-all schema sync — 2026-08-22
Method: synchronized the bundled v1 trigger definitions and authoring guidance
with source commit `748107cc025bfaab890a4e37161c8e29a64c3c20`, then ran the
| "description": "Slash command that fires this trigger when it is the first whitespace-delimited token of a chat message (e.g. `/run-review`). Same grammar as the comment trigger; matched exactly and case-sensitively." | ||
| "description": "Optional slash command that fires this trigger when it is the first whitespace-delimited token of a chat message (e.g. `/run-review`). Omit it to match ordinary non-command messages; a commandless trigger must declare at least one chats entry. Same grammar as the comment trigger; matched exactly and case-sensitively." | ||
| }, | ||
| "chats": { |
There was a problem hiding this comment.
🟡 Empty chats allowlist passes when command present.
🤖 Fix with your agent
Fix this code review finding (aictrl-dev/skills PR #28, skills/create-workflow/reference/v1/workflow.schema.json:236-241):
Problem: Empty chats allowlist passes when command present
Detail: The new allOf/then branch enforces minItems:1 on chats only for commandless triggers; a command trigger with chats: [] still validates. An empty allowlist semantically means the trigger can match no chat (docs say "omit it to fire for any chat", not "set it empty"), yielding a silently dead trigger that passes schema validation. The gap predates this PR (chats never had minItems), but this PR adds the minItems machinery and leaves the empty-array case unconstrained in the command branch. Note: the bundle mirrors the upstream source schema (aictrl-dev/aictrl/schemas/workflow/v1), so the durable fix belongs upstream, then re-synced here.
Suggested fix: If the empty-allowlist semantics are unintended, add "minItems": 1 to the base chats property (next to maxItems: 100) in the source schema aictrl-dev/aictrl/schemas/workflow/v1/workflow.schema.json, so chats: [] is rejected in both branches (the then-branch then only needs required: ["chats"]), and re-sync the bundle. If empty-means-any is intended, document it in the chats description instead.
Implement the fix on the PR head branch and add a regression test that fails before the fix and passes after.
Why this matters
The new allOf/then branch enforces minItems:1 on chats only for commandless triggers; a command trigger with chats: [] still validates. An empty allowlist semantically means the trigger can match no chat (docs say "omit it to fire for any chat", not "set it empty"), yielding a silently dead trigger that passes schema validation. The gap predates this PR (chats never had minItems), but this PR adds the minItems machinery and leaves the empty-array case unconstrained in the command branch. Note: the bundle mirrors the upstream source schema (aictrl-dev/aictrl/schemas/workflow/v1), so the durable fix belongs upstream, then re-synced here.
"chats": {
"type": "array",
"description": "Optional allowlist of chat/channel ids this trigger fires for. Ints (Telegram) or strings (Slack/Discord) are stored as text. Command triggers may omit it to fire for any chat; commandless triggers require at least one entry. Max 100 entries.",
"items": { "type": ["string", "integer"] },
"maxItems": 100
},
Code reviewVerdict: Looks good — only minor / nit comments below. · 🔴 0 · 🟠 0 · 🟡 2 · ⚪ 0 · 0/2 resolved
🤖 Fix all 2 open findings with your agent📋 Out-of-diff findings (2)
Reviewed 5 files · 0 inline · view all 2 findings ↗ aictrl · AI code review for fast-moving teams · aictrl.dev |
Please re-review exact head |
Code reviewVerdict: Looks good — only minor / nit comments below. · 🔴 0 · 🟠 0 · 🟡 2 · ⚪ 0 · 0/2 resolved
🤖 Fix all 2 open findings with your agent📋 Out-of-diff findings (2)
Reviewed 5 files · 0 inline · view all 2 findings ↗ aictrl · AI code review for fast-moving teams · aictrl.dev |
This is the second and final bounded remediation head: |
Refs aictrl-dev/aictrl#3763
Unblocks aictrl-dev/aictrl#4820
Problem
The bundled workflow schema predates commandless chat triggers. The upcoming
aictrl release therefore fails its workflow-schema bundle drift check.
Behavior
chatsallowlist.Scope
748107cc025bfaab890a4e37161c8e29a64c3c20after description annotations are removed.Rollout and risks
Merge this public bundle before advancing the matching baseline in aictrl.
The aictrl baseline update is already prepared and verified locally.
Verification
322cc471d1e0a5d9380bd368638710d3e2f694466f9548a719a067f52a038a6e.npm test— 27 tests passed.npm run validate— 14 public skills and the public plugin validated.git diff --checkpassed.