Skip to content

Commit 5c31edd

Browse files
os-steveclaude
andcommitted
fix(skills): make automation eval fixtures 5, 7, 8 agree with their own assertions
Three ideal answers in flows-triggers-approvals.json contradicted the assertions that grade them, so a correct answer graded wrong: - eval 5 spelled the negated error-label string inside the ideal answer; it now says it in words (a bare error label routes nothing). - eval 7 never spelled the `type: 'position'` approver it requires and spelled the negated positions check; it now names `approvers: [{ type: 'position', value: 'finance_manager' }]` and says the negation in words. - eval 8 never spelled the `type: 'screen'` flow kind it requires. No fixture added, net 0 lines in skills/. The token ratchet row for the file moves to the new measurement (2724 -> 2734) after paying down 32 bytes of prose in evals 5 and 7. Claude-Session: https://claude.ai/code/session_01ADHkmT8qQiLPD3BRTdVxGH Co-authored-by: Claude <noreply@anthropic.com>
1 parent 7c34e5d commit 5c31edd

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎scripts/check-skills-token-ratchet.mjs‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,16 @@ export const CEILINGS = new Map([
829829
// = 2724; headroom was 3 bytes, 0 tokens, so the ceiling moves +297, pinned
830830
// AT the measurement. Same maintainer ruling as the SKILL.md row above
831831
// (2026-10-27, tap A verbatim and untranslated): 「A:先削重复,余额按实测提高」.
832-
['skills/objectstack-automation/evals/flows-triggers-approvals.json', 2724],
832+
// 10893 -> 10934 (#26515): no new fixture — three ideal answers rewritten
833+
// to agree with their own assertions (eval 5 spelled the negated error-label
834+
// string, eval 7 lacked the `type: 'position'` approver and spelled the
835+
// negated positions check, eval 8 lacked `type: 'screen'`). Paid down first:
836+
// evals 5 and 7 shortened by 25 and 7 bytes; the `approvers` line eval 7
837+
// owed costs more than that. +41 bytes -> ceil(10934 / 4) = 2734; headroom
838+
// was 3 bytes, 0 tokens, so the ceiling moves +10, pinned AT the
839+
// measurement. Same maintainer ruling as the SKILL.md row above (2026-10-27,
840+
// tap A verbatim and untranslated): 「A:先削重复,余额按实测提高」.
841+
['skills/objectstack-automation/evals/flows-triggers-approvals.json', 2734],
833842
// 894 -> 1095 (#26179): one regression case for the field permission `when`
834843
// (the contract prompt: lock the legal terms for finance from approval on,
835844
// legal keeps the edit) — expected: `when` on the finance set's entries with

‎skills/objectstack-automation/evals/flows-triggers-approvals.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
{
4545
"id": 5,
4646
"prompt": "Add a step that calls our `pricing.recalc` function to compute the discount and saves it on the quote, then posts the quote to our tax service over HTTP; if the tax call fails, route to a handler node instead of failing the run.",
47-
"expected_output": "Emits a `script` node with `config.function: 'pricing.recalc'` (registered via `defineStack({ functions })`), `inputs`, and `outputVariable: 'recalc'`; the function is a pure compute step, so a following `update_record` persists it with `fields: { discount: { dialect: 'cel', source: 'recalc.discount' } }`. The `http` node sets `timeoutMs`. Failure routing is a `type: 'fault'` edge — a `label: 'error'` alone routes nothing.",
47+
"expected_output": "Emits a `script` node with `config.function: 'pricing.recalc'` (registered via `defineStack({ functions })`), `inputs`, and `outputVariable: 'recalc'`; a pure compute step, so a following `update_record` persists it with `fields: { discount: { dialect: 'cel', source: 'recalc.discount' } }`. The `http` node sets `timeoutMs`. Failure routing is a `type: 'fault'` edge; a bare error label routes nothing.",
4848
"files": [],
4949
"assertions": {
5050
"must_contain": ["function:", "outputVariable", "type: 'fault'", "timeoutMs", "update_record", "dialect: 'cel'"],
@@ -64,7 +64,7 @@
6464
{
6565
"id": 7,
6666
"prompt": "An expense approval only holders of the `expense.approve_request` capability may start; route to the `finance_manager` position, and the submitter must never approve their own expense.",
67-
"expected_output": "Flow-level `requiredPermissions: ['expense.approve_request']` (checked at every door that starts the flow, not a `current_user.positions` check inside it); the `approval` node sets `excludeSubmitter: true`, and its `onEmptyApprovers` is anything but `auto_approve`, which is refused beside it.",
67+
"expected_output": "Flow-level `requiredPermissions: ['expense.approve_request']`, checked at every door that starts the flow (never a run-user positions check inside it); the `approval` node names `approvers: [{ type: 'position', value: 'finance_manager' }]`, sets `excludeSubmitter: true`, and its `onEmptyApprovers` is anything but `auto_approve`, refused beside it.",
6868
"files": [],
6969
"assertions": {
7070
"must_contain": ["requiredPermissions", "excludeSubmitter: true", "type: 'position'"],
@@ -74,7 +74,7 @@
7474
{
7575
"id": 8,
7676
"prompt": "A screen flow: the user uploads the signed contract PDF on the last step, then the flow creates the `contract` record with the file in its `signed_copy` field.",
77-
"expected_output": "A `screen` field `{ name: 'signed_copy', type: 'file', required: true }`; the screen resumes with the uploaded `sys_file` id bound to `signed_copy`, and a `create_record` after the last screen writes `fields: { signed_copy: { dialect: 'cel', source: 'signed_copy' } }`, which claims the file for the record.",
77+
"expected_output": "A `type: 'screen'` flow whose last `screen` carries `{ name: 'signed_copy', type: 'file', required: true }` and resumes with the uploaded `sys_file` id bound to `signed_copy`; a `create_record` after it writes `fields: { signed_copy: { dialect: 'cel', source: 'signed_copy' } }`, which claims the file for the record.",
7878
"files": [],
7979
"assertions": {
8080
"must_contain": ["type: 'screen'", "type: 'file'", "create_record", "signed_copy"],

0 commit comments

Comments
 (0)