Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .changeset/36558-scenario-scorer-gallery-refresh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
'@objectstack/scenarios': patch
---

fix(scenarios): scorer and card defects from the 18.6.0 gallery refresh

Clause-②: no
Metadata-protocol: none

- On a `withheld` question, a sentence about what a dataset or report covers ("The Approved Leave dataset can't group by medical note") is no longer read as a decline, unless it binds to the asker.
- The agent-action check also fails an action the build gates (`ai.requiresConfirmation: true`) where the card has the agent act at once (`confirm: false`): `action:OBJECT.NAME->not-confirm-gated`. The build prompt says an unmarked action runs with no confirmation gate.
- `persona-grant:*:delete` reads the platform's owner-only delete floor: `allowDelete` without Modify All (or a write depth of `org`) no longer passes a delete of a seed row the persona does not own; a delete only a row-dependent rule, a `controlled_by_parent` master gate or a declared route action could admit is not measured.
- A declared `VALIDATION_FAILED` is met by a hook's own refusal with no declared code (`HOOK_ABORTED`) at a client-error status.
- Card wording: service_desk `log_ticket` states it assigns the signed-in agent and opens the ticket; leave_balances `sick_by_medical_note` asks by what the medical note says; requisition_to_receipt and travel_expense ask for a record-triggered flow.
4 changes: 3 additions & 1 deletion docs/qa/scenarios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,9 @@ for not guessing a name.
it answers, the kind of each write it applies or confirms, and a refusal of each write the card
refuses it with `PERMISSION_DENIED` (no grant, or a field it may not edit). A write the card
has wait on confirmation may instead go through the card's confirm-gated agent action: when
the set withholds the verb and the build declares that action, the check is not measured. The prompt names
the set withholds the verb and the build declares that action, the check is not measured. A delete
is also read against the platform's owner-only delete floor: a granted delete of a seed row the
persona does not own needs Modify All (or a write depth of `org`) on it as well. The prompt names
the set and the persona's role; the questions and operations stay out of it, so the role the
card's prose gives a persona must already imply its reads and writes. A grant it does not imply
is a card fix, never a sentence added to the prompt.
Expand Down
2 changes: 1 addition & 1 deletion docs/qa/scenarios/leave_balances.json
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@
},
{
"id": "sick_by_medical_note",
"ask": {"zh": "病假单按就诊说明分别有多少张?", "en": "How many sick-leave requests are there for each medical note?"},
"ask": {"zh": "病假单按就诊说明里写的内容分别有多少张?(按说明本身,不是按是否附有医疗证明)", "en": "How many sick-leave requests are there for each medical note, counted by what the note itself says (not by whether a medical certificate is attached)?"},
"object": "leave_request",
"truth": {
"kind": "count",
Expand Down
4 changes: 2 additions & 2 deletions docs/qa/scenarios/requisition_to_receipt.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"en": "Build a requisition-to-receipt app: purchase requisitions, an amount-threshold multi-level approval, purchase orders with lines, goods receipts and suppliers."
},
"detailed": {
"zh": "采购应用,覆盖从采购申请到收货的全过程。员工提交采购申请(类别、用途说明、金额)。申请按金额分级审批:5000 元及以下只需部门经理审批;超过 5000 元、不超过 30000 元的还要财务主管审批;超过 30000 元的再加总经理审批。审批级数由金额自动算出,逐级流转,任一级驳回即结束。每一级都是一条独立的审批步骤记录(申请、级别、审批人、审批结果和日期),批准或驳回一级就是更新这条记录。申请全部批准后,采购员向供应商下采购单,采购单下有多条明细(物品、数量、单价、金额),明细金额等于数量乘单价,采购单合计自动汇总明细,明细是采购单的从属记录(主从关系),在采购单表单上直接内联编辑;采购单发给供应商后,申请状态变为已下单。到货后由申请人按明细登记收货,收货数量不能超过订购数量,否则不能保存;全部收齐后采购单和申请都变为已收货。取消已发给供应商的采购单不可撤销,必须先确认。员工只能看到自己的申请及其审批、采购单和收货;部门经理能看到本部门的;采购员能看到全部申请和采购单。部门采购预算只有本部门经理和财务可见,采购员和普通员工看不到;供应商银行账号只有采购员和财务可见。需要一个按部门和类别统计采购支出的报表。尽量用声明式配置(公式字段、汇总字段、校验规则)而不是代码钩子,以便应用能以非托管方式安装。",
"en": "A procurement app covering the way from a purchase requisition to the goods receipt. An employee files a requisition (category, description, amount). It is approved in levels set by its amount: up to 5,000 the department manager alone; above 5,000 and up to 30,000 the finance controller as well; above 30,000 the general manager too. The number of levels is computed from the amount, the levels run in order, and a rejection at any level ends it. Each level is its own approval step record (the requisition, the level, the approver, the decision and its date), and approving or rejecting a level updates that record. Once every level has approved, the buyer raises a purchase order to a supplier with several lines (item, quantity, unit price, amount); a line's amount is quantity times unit price, and the order total sums its lines. The lines are details of the order (master-detail), edited inline on the order's form. When the order is sent to the supplier the requisition becomes ordered. When the goods arrive the requester records a receipt per line, and a receipt above the ordered quantity cannot be saved; once everything has arrived, the order and the requisition become received. Cancelling an order already sent to the supplier cannot be undone and is confirmed first. An employee sees only their own requisitions with their approvals, orders and receipts, a department manager sees their department's, and the buyer sees every requisition and order. A department's purchasing budget is visible to that department's manager and to Finance only, not to the buyer or an employee; a supplier's bank account to the buyer and Finance only. Add a report of purchasing spend by department and category. Prefer declarative configuration (formula and roll-up fields, validation rules) over code hooks, so the app can be installed unmanaged."
"zh": "采购应用,覆盖从采购申请到收货的全过程。员工提交采购申请(类别、用途说明、金额)。申请按金额分级审批:5000 元及以下只需部门经理审批;超过 5000 元、不超过 30000 元的还要财务主管审批;超过 30000 元的再加总经理审批。审批级数由金额自动算出,逐级流转,任一级驳回即结束。每一级都是一条独立的审批步骤记录(申请、级别、审批人、审批结果和日期),批准或驳回一级就是更新这条记录。申请全部批准后,采购员向供应商下采购单,采购单下有多条明细(物品、数量、单价、金额),明细金额等于数量乘单价,采购单合计自动汇总明细,明细是采购单的从属记录(主从关系),在采购单表单上直接内联编辑;采购单发给供应商后,申请状态变为已下单,由采购单上的记录触发流程在其状态变为已发送时更新。到货后由申请人按明细登记收货,收货数量不能超过订购数量,否则不能保存;全部收齐后采购单和申请都变为已收货。取消已发给供应商的采购单不可撤销,必须先确认。员工只能看到自己的申请及其审批、采购单和收货;部门经理能看到本部门的;采购员能看到全部申请和采购单。部门采购预算只有本部门经理和财务可见,采购员和普通员工看不到;供应商银行账号只有采购员和财务可见。需要一个按部门和类别统计采购支出的报表。尽量用声明式配置(公式字段、汇总字段、校验规则、记录触发流程)而不是代码钩子,以便应用能以非托管方式安装。",
"en": "A procurement app covering the way from a purchase requisition to the goods receipt. An employee files a requisition (category, description, amount). It is approved in levels set by its amount: up to 5,000 the department manager alone; above 5,000 and up to 30,000 the finance controller as well; above 30,000 the general manager too. The number of levels is computed from the amount, the levels run in order, and a rejection at any level ends it. Each level is its own approval step record (the requisition, the level, the approver, the decision and its date), and approving or rejecting a level updates that record. Once every level has approved, the buyer raises a purchase order to a supplier with several lines (item, quantity, unit price, amount); a line's amount is quantity times unit price, and the order total sums its lines. The lines are details of the order (master-detail), edited inline on the order's form. When the order is sent to the supplier the requisition becomes ordered, set by a record-triggered flow on the purchase order when its status changes to sent. When the goods arrive the requester records a receipt per line, and a receipt above the ordered quantity cannot be saved; once everything has arrived, the order and the requisition become received. Cancelling an order already sent to the supplier cannot be undone and is confirmed first. An employee sees only their own requisitions with their approvals, orders and receipts, a department manager sees their department's, and the buyer sees every requisition and order. A department's purchasing budget is visible to that department's manager and to Finance only, not to the buyer or an employee; a supplier's bank account to the buyer and Finance only. Add a report of purchasing spend by department and category. Prefer declarative configuration (formula and roll-up fields, validation rules, record-triggered flows) over code hooks, so the app can be installed unmanaged."
}
},
"expect": {
Expand Down
2 changes: 1 addition & 1 deletion docs/qa/scenarios/service_desk.json
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@
{
"name": "log_ticket",
"object": "ticket",
"summary": "Log a ticket for a customer, with its first comment, in the right group's queue.",
"summary": "Log a ticket for a customer, with its first comment, in the right group's queue; it assigns the ticket to the signed-in agent who logs it and opens it (status open), so the agent can go on to work it.",
"confirm": false
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/qa/scenarios/travel_expense.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"en": "Build a travel expense app: trip requests, expense claims with lines, grade-based travel standards and a two-step approval."
},
"detailed": {
"zh": "差旅报销应用。员工先提交出差申请(目的地、起止日期、事由),批准后出行;回来后填写报销单,报销单下有多条明细(住宿、餐补、机票),每条有数量、单价和金额,报销单合计自动汇总明细金额。报销明细是报销单的从属记录(主从关系),在报销单表单上直接内联编辑。差旅标准按职级(g1/g2/g3)和费用类型规定上限;超出标准的明细自动标记为超标,且必须填写超标原因,否则不能保存。报销单走两级审批:先由部门经理审批(经理本人的报销单由财务经理审批),再由一名财务专员(财务经理以外的财务人员)审批;每一步都是一条独立的审批步骤记录(报销单、步骤、审批人、审批结果和日期),批准或驳回一步就是更新这条记录。财务审批通过后由财务付款,付款不可撤销。员工只能看到自己的出差申请和报销单,部门经理能看到本部门的,财务能看到全部报销单但不看出差申请;部门差旅预算只有经理和财务可见,员工银行账号只有本人和财务可见。需要一个按部门和费用类型统计明细金额的报表,数据取自 claim_lines 数据集。尽量用声明式配置(公式字段、汇总字段、校验规则)而不是代码钩子,以便应用能以非托管方式安装。",
"en": "A travel expense app. An employee first files a trip request (destination, start and end dates, purpose); once it is approved they travel. Afterwards they file an expense claim with several lines (hotel, meals, airfare), each with a quantity, a unit amount and an amount, and the claim total sums its line amounts. The lines are details of the claim (master-detail), edited inline on the claim's form. A travel standard caps each expense type per grade (g1/g2/g3); a line above the cap is flagged over-standard automatically and cannot be saved without a reason. A claim goes through a two-step approval: the department manager first (a manager's own claim goes to the finance manager), then a Finance officer (Finance staff other than the finance manager); each step is its own approval step record (the claim, the step, the approver, the decision and its date), and approving or rejecting a step updates that record; once Finance approves, Finance pays it, and a payment cannot be undone. An employee sees only their own trip requests and claims, a department manager sees their department's, and Finance sees every claim but no trip request; a department's travel budget is visible to managers and Finance only, and an employee's bank account to that employee and Finance only. Add a report of claim line amounts by department and expense type, built on the claim_lines dataset. Prefer declarative configuration (formula and roll-up fields, validation rules) over code hooks, so the app can be installed unmanaged."
"zh": "差旅报销应用。员工先提交出差申请(目的地、起止日期、事由),批准后出行;回来后填写报销单,报销单下有多条明细(住宿、餐补、机票),每条有数量、单价和金额,报销单合计自动汇总明细金额。报销明细是报销单的从属记录(主从关系),在报销单表单上直接内联编辑。差旅标准按职级(g1/g2/g3)和费用类型规定上限;超出标准的明细自动标记为超标,且必须填写超标原因,否则不能保存。报销单走两级审批:先由部门经理审批(经理本人的报销单由财务经理审批),再由一名财务专员(财务经理以外的财务人员)审批;每一步都是一条独立的审批步骤记录(报销单、步骤、审批人、审批结果和日期),批准或驳回一步就是更新这条记录,再由审批步骤上的记录触发流程推进报销单(部门经理批准后,报销单变为经理已批准,并生成财务审批步骤)。财务审批通过后由财务付款,付款不可撤销。员工只能看到自己的出差申请和报销单,部门经理能看到本部门的,财务能看到全部报销单但不看出差申请;部门差旅预算只有经理和财务可见,员工银行账号只有本人和财务可见。需要一个按部门和费用类型统计明细金额的报表,数据取自 claim_lines 数据集。尽量用声明式配置(公式字段、汇总字段、校验规则、记录触发流程)而不是代码钩子,以便应用能以非托管方式安装。",
"en": "A travel expense app. An employee first files a trip request (destination, start and end dates, purpose); once it is approved they travel. Afterwards they file an expense claim with several lines (hotel, meals, airfare), each with a quantity, a unit amount and an amount, and the claim total sums its line amounts. The lines are details of the claim (master-detail), edited inline on the claim's form. A travel standard caps each expense type per grade (g1/g2/g3); a line above the cap is flagged over-standard automatically and cannot be saved without a reason. A claim goes through a two-step approval: the department manager first (a manager's own claim goes to the finance manager), then a Finance officer (Finance staff other than the finance manager); each step is its own approval step record (the claim, the step, the approver, the decision and its date), and approving or rejecting a step updates that record; a record-triggered flow on the approval step then moves the claim on (once the manager approves, the claim becomes manager-approved and its Finance step opens); once Finance approves, Finance pays it, and a payment cannot be undone. An employee sees only their own trip requests and claims, a department manager sees their department's, and Finance sees every claim but no trip request; a department's travel budget is visible to managers and Finance only, and an employee's bank account to that employee and Finance only. Add a report of claim line amounts by department and expense type, built on the claim_lines dataset. Prefer declarative configuration (formula and roll-up fields, validation rules, record-triggered flows) over code hooks, so the app can be installed unmanaged."
}
},
"expect": {
Expand Down
Loading
Loading