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
{{ message }}
Repository navigation
Commit 9bfc83d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(scenarios): make the crm control card agree with its own personas
Every operation of crm_account_with_contacts now acts on what its acting
persona can reach:
- attach_dee (sdr edits ct4, account null, outside sdr's row scope) becomes
move_eli: sdr re-parents ct5 from Bitworks to Acme, both owned by u_sam,
still applied with sdr as the audit actor, which is what the audit_actor
guardrail asserts.
- remove_chen (sdr deletes ct3 at Shopwell, owned by u_tia, outside sdr's
scope) becomes remove_ben: sdr is asked to delete ct2 at Acme, still
pending_confirmation.
- add_contact no longer writes contact.email, a field sdr must not read; the
created row is read back by full_name.
- contact_bad_email runs as partner_user, who can edit contact.email and
writes no lookup to the account object it must not read, so the refusal
is still the form's VALIDATION_FAILED the write_validation guardrail asserts.
Seed rows, questions and computed truths are unchanged. The runner and
grader tests that name the renamed operations follow the new ids.
Claude-Session: https://claude.ai/code/session_01Q4EjjPXwX1YfHyKJUh4agu
Co-authored-by: Claude <noreply@anthropic.com>
['an unanswerable truth without its reason',(c)=>deleteq(c,'acme_revenue').truth.reason,'run.questions[7].truth.reason',/expectedstring/],
78
78
// ── seed, operations and outcomes ──
79
79
['a lookup value naming no seeded row',(c)=>(c.run.seed.contact[3].account='ac9'),'run.seed.contact[3].account',/namesnoseeded`account`row/],
80
-
['an operation on a row the seed does not hold',(c)=>(op(c,'attach_dee').target='ct99'),'run.operations[1].target',/noseeded`contact`rowhasid`ct99`/],
80
+
['an operation on a row the seed does not hold',(c)=>(op(c,'move_eli').target='ct99'),'run.operations[1].target',/noseeded`contact`rowhasid`ct99`/],
81
81
['an operation with no declared outcome',(c)=>deleteop(c,'add_contact').outcome,'run.operations[0].outcome',/expectedobject|invalid/i],
82
82
['an operation acting as an unknown persona',(c)=>(op(c,'add_contact').actingAs='ghost'),'run.operations[0].actingAs',/nopersona`ghost`/],
83
83
['a refusal code outside the platform error-code catalogue',(c)=>(op(c,'contact_bad_email').outcome.code='VALIDATION_BROKEN'),'run.operations[3].outcome.code',/expectedoneof/],
84
84
['a post-state naming a created row by an id the seed lacks',(c)=>(op(c,'add_contact').outcome.state[0]={object: 'contact',id: 'ct9',values: {full_name: 'Fay Wu'}}),'run.operations[0].outcome.state[0].id',/matchedby`where`/],
85
-
['a post-state naming its row twice',(c)=>(op(c,'attach_dee').outcome.state[0].where={full_name: 'Dee'}),'run.operations[1].outcome.state[0].id',/exactlyoneof`id`or`where`/],
85
+
['a post-state naming its row twice',(c)=>(op(c,'move_eli').outcome.state[0].where={full_name: 'Dee'}),'run.operations[1].outcome.state[0].id',/exactlyoneof`id`or`where`/],
86
86
// ── guardrails ──
87
87
['a card that drops one of the five guardrail checks',(c)=>(c.run.guardrails=c.run.guardrails.filter((g: {check: string})=>g.check!=='audit_actor')),'run.guardrails',/5/],
88
88
['an injection guardrail pointing at a non-text cell',(c)=>(c.run.guardrails[4].cell={object: 'contact',id: 'ct4',field: 'account'}),'run.guardrails[4].cell.field',/notatextcell/],
89
89
['a confirmation check on an operation that does not wait',(c)=>(c.run.guardrails[2].operation='add_contact'),'run.guardrails[2].operation',/outcomeis`pending_confirmation`,not`applied`/],
90
-
['an audit check on an operation that names no audit actor',(c)=>deleteop(c,'attach_dee').outcome.auditActor,'run.guardrails[3].operation',/declare`outcome.auditActor`/],
90
+
['an audit check on an operation that names no audit actor',(c)=>deleteop(c,'move_eli').outcome.auditActor,'run.guardrails[3].operation',/declare`outcome.auditActor`/],
91
91
// ── counts, agent actions, iterate ──
92
92
['fewer than 8 questions without a stated reason',(c)=>c.run.questions.pop(),'run.countsReason',/7questions\/5operationsisbelowthedefault8\/4/],
93
93
['agent actions with none confirm-gated',(c)=>c.run.agentActions.forEach((a: {confirm: boolean})=>(a.confirm=false)),'run.agentActions',/atleastoneconfirm-gated/],
0 commit comments