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
18 changes: 12 additions & 6 deletions docs/qa/platform-checklist/areas/api-backend.json
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@
"title": "A disabled packaged action is refused 409 ACTION_DISABLED at BOTH dispatch doors — after the capability gate (a 403 is never an oracle for the switch), before the param contract and the record load, durable across restart",
"since": "v17",
"status": "active",
"revision": 6,
"revision": 7,
"priority": "P0",
"surface": "api",
"personas": [
Expand All @@ -1617,14 +1617,14 @@
"fixtures": {
"app": "showcase",
"requires": [
"showcase_mark_done on showcase_task (ui/actions/index.ts — script action, registered body, NO declared params, no requiredPermissions): the clean 409 probe",
"showcase_mark_done on showcase_task (ui/actions/index.ts — a declared record write: operation 'update' with patch { done: true, progress: 100 } and no body, which the action route performs as the caller; NO declared params, no requiredPermissions): the clean 409 probe",
"showcase_action_param_gallery on showcase_field_zoo (ui/actions/index.ts — script action with a required param p_text): the param-ordering discriminator — the ONLY stock action whose param contract can produce a contrasting 400, because enforceActionParams (action-execution.ts) returns null outright for an action with no declared params",
"showcase_zoo_perm_missing on showcase_field_zoo (predicate-matrix.action.ts — requiredPermissions: ['showcase.restricted_ops'], granted to nobody): the 403-oracle probe",
"showcase_portfolio_snapshot (ui/actions/index.ts — object-less/global, and the ONLY stock action with ai.exposed: true): the live MCP-door probe; its activation flip spells the object segment `global` (/actions/_activation/global/showcase_portfolio_snapshot)"
],
"knownGaps": [
"The MCP door cannot be driven live with showcase_mark_done: the bridge's AI-exposure gate (actionAiExposureError, fail-closed on ai.exposed !== true) sits AHEAD of the activation consult, so a non-exposed action answers the exposure refusal regardless of its switch. showcase_portfolio_snapshot is the only stock ai.exposed action. The MCP transport IS drivable live on a stock boot: the boot banner prints `MCP: http://localhost:<port>/api/v1/mcp`, and QA run #21056 drove POST /api/v1/mcp tools/call run_action against showcase_portfolio_snapshot (disabled → isError carrying code ACTION_DISABLED, status 409; re-enabled → ok). Score the MCP clause live. Where the endpoint is not mounted, record acceptance[4] blocked(environment), with the unit pin cited beside it: action-activation-dispatch.test.ts 'door 2' calls invokeBusinessAction in-process over a stubbed engine and metadata service, with no MCP transport and no HTTP, so it is evidence of that layer only, never the clause's pass (RUNNER rule 6, a pin scores only the layer it drives).",
"The record-load half of the ordering proof has NO contrasting refusal: the REST door's record load is best-effort (try/catch in domains/actions.ts — a missing record passes an empty record for new-record actions), so a nonexistent recordId never 404s on its own, enabled or disabled. The record leg is proven by code order plus the absence of any read/side effect, never by expecting a 404 from the enabled control."
"The record-load half of the ordering proof is scored from the DISABLED traces: code order plus the absence of any read/side effect. An enabled control on the same nonexistent recordId answers 404 RECORD_NOT_FOUND, because every door refuses a subject the caller-scope load did not deliver (refuseDeniedSubjectLoad, packages/runtime/src/action-execution.ts — the script/body door, the flow door and the declarative branch Mark Done now takes all call it; measured on a dogfood boot of #25468: enabled 404, disabled 409, same id). That 404 corroborates the order but is not the leg's evidence. The load itself is still caught (loadActionSubjectRecord), so a new-record or object-less action, which attempts no load, never 404s."
]
},
"steps": [
Expand All @@ -1639,7 +1639,7 @@
],
"acceptance": [
{
"clause": "the REST door refuses a disabled packaged action 409 ACTION_DISABLED and dispatches NOTHING: status 409, code ACTION_DISABLED (registered in the ADR-0112 ledger, error-code-ledger.zod.ts), message = the engine's own describeDisabledAction sentence naming the ledger — and no side effect lands (the mark_done body's done/progress write never ran)",
"clause": "the REST door refuses a disabled packaged action 409 ACTION_DISABLED and dispatches NOTHING: status 409, code ACTION_DISABLED (registered in the ADR-0112 ledger, error-code-ledger.zod.ts), message = the engine's own describeDisabledAction sentence naming the ledger — and no side effect lands (mark_done's declared done/progress write never ran)",
"oracle": "api",
"verify": "step-3 trace: 409 + code ACTION_DISABLED + the disabled-action sentence; follow-up reads show no task mutated",
"evidence": "the trace + the control re-reads"
Expand All @@ -1651,9 +1651,9 @@
"evidence": "both traces side by side"
},
{
"clause": "the consult also precedes the record load, proven by absence not by a contrasting refusal: the 409 arrives with a nonexistent recordId in play and no record read occurs — the enabled control CANNOT 404 on the bad id because the load is best-effort by design (domains/actions.ts catches and passes an empty record), so do not score this leg by expecting one",
"clause": "the consult also precedes the record load, proven by absence: the 409 arrives with a nonexistent recordId in play and no record read occurs. The enabled control on the same id answers 404 RECORD_NOT_FOUND (the caller-scope load's refusal, fixtures.knownGaps[1]), which corroborates the order but does not score this leg",
"oracle": "api",
"verify": "the step-3/4 disabled traces are 409 with the bogus recordId present; the run record notes the enabled-control caveat rather than a fabricated 404 expectation",
"verify": "the step-3/4 disabled traces are 409 with the bogus recordId present; an enabled-control 404, when captured, is recorded beside them as corroboration, never as the verdict",
"evidence": "traces + run-record note"
},
{
Expand Down Expand Up @@ -1748,6 +1748,12 @@
"date": "2026-10-20",
"change": "steps[0] respelled: 'boot showcase isolated on ' → 'boot the showcase on its own port and DB, on '. Round 12's out-of-scope finding (landing record 6287983829 on wave anchor #24579): the phrase 'showcase isolated' named the dogfood §0 own-port boot, and a runner read it as the `isolated` tenancy posture (OS_TENANCY_POSTURE=isolated). The new spelling names that boot by what it is, in RUNNER.md's own words for it (the trap table's counter: own port/DB, skill §0), and names no posture. Read at base e4d604efd3. No clause changed",
"ref": "#25003"
},
{
"revision": 7,
"date": "2026-10-23",
"change": "fixtures.requires[0] and acceptance[0] respelled for #25468: showcase_mark_done is no longer a script action with a registered body; it declares its write (operation 'update', patch { done: true, progress: 100 }), which the action route performs as the caller. Its type stays 'script', the schema default, and it still declares no params and no requiredPermissions, so it is still the clean 409 probe: the activation consult runs ahead of the declarative branch in packages/runtime/src/domains/actions.ts (read at base aa2dbab7b; measured on a dogfood boot of the change: disabled with a nonexistent recordId answers 409 ACTION_DISABLED). The same boot answered the ENABLED control on that id 404 RECORD_NOT_FOUND, which falsified fixtures.knownGaps[1] and acceptance[2]'s 'the enabled control CANNOT 404': every door now consumes the caller-scope load's verdict through refuseDeniedSubjectLoad (action-execution.ts), the script/body door included, so the text was already stale for a script body and stays false for the declared write. Both are respelled; acceptance[2] still scores from the disabled traces alone, and the enabled 404 is corroboration only. acceptance[2]'s clause text changed, its verdict basis did not",
"ref": "#25468"
}
]
},
Expand Down
16 changes: 11 additions & 5 deletions docs/qa/platform-checklist/areas/records-forms.json
Original file line number Diff line number Diff line change
Expand Up @@ -5053,7 +5053,7 @@
"title": "A script action whose server-side hook refuses the write with a user-facing sentence answers a 4xx, the console shows exactly one error toast carrying that sentence, and the record is left unchanged",
"since": "v17.5",
"status": "active",
"revision": 2,
"revision": 3,
"priority": "P2",
"surface": "browser",
"personas": [
Expand All @@ -5062,7 +5062,7 @@
"fixtures": {
"app": "showcase",
"requires": [
"the refusal pair on showcase_task: the hook showcase_guard_task_reopen (examples/app-showcase/src/data/hooks/index.ts — beforeUpdate, condition previous.done == true && record.done != true, sandboxed body throws new Error(TASK_REOPEN_REFUSAL), onError:'abort') and the script action showcase_reopen_task (examples/app-showcase/src/ui/actions/index.ts — body writes { id, done: false } through ctx.api, execution perRecord, visible 'has(record.done) && record.done == true', locations list_item only — the Task Detail page is kind:'full' and renders no record_header bar)",
"the refusal pair on showcase_task: the hook showcase_guard_task_reopen (examples/app-showcase/src/data/hooks/index.ts — beforeUpdate, condition previous.done == true && record.done != true, sandboxed body throws new Error(TASK_REOPEN_REFUSAL), onError:'abort') and the action showcase_reopen_task (examples/app-showcase/src/ui/actions/index.ts — a declared record write: operation 'update' with patch { done: false } and no body, which the action route performs as the caller, execution perRecord, visible 'has(record.done) && record.done == true', locations list_item only — the Task Detail page is kind:'full' and renders no record_header bar)",
"the refusal sentence, verbatim: 'A finished task cannot be reopened. Create a follow-up task instead.' (TASK_REOPEN_REFUSAL in the hooks file — re-read it there before the run, never from this line)",
"a seeded FINISHED task (done: true) — 'Audit current IA' or 'App wireframes' (examples/app-showcase/src/data/seed/index.ts) — which is the only kind of record the action is offered on",
"a console built at this repo's .objectui-sha (pnpm objectui:build), served by the same boot the run drives",
Expand Down Expand Up @@ -5123,10 +5123,10 @@
],
"source": [
"examples/app-showcase/src/data/hooks/index.ts#GuardTaskReopenHook (the refusing beforeUpdate hook; the sentence is TASK_REOPEN_REFUSAL in the same file)",
"examples/app-showcase/src/ui/actions/index.ts#ReopenTaskAction (the script action whose ctx.api write the hook refuses)",
"examples/app-showcase/src/ui/actions/index.ts#ReopenTaskAction (the action whose declared write, performed by the action route as the caller, the hook refuses)",
"examples/app-showcase/test/task-reopen-hook-refusal.test.ts (pins the fixture: the hook refuses with the sentence and leaves the row unchanged on the real engine, and the action writes the refused shape)",
"packages/runtime/src/sandbox/quickjs-runner.ts#sandboxRefusalMessage (a nested sandboxed hook refusal keeps its business message across the action VM hop, so the action route answers 4xx — #17265 / PR #17679)",
"packages/runtime/src/sandbox/nested-hook-refusal-is-a-rejection.test.ts (the wire half: 400 VALIDATION_ERROR with the sentence, unit-level)",
"packages/runtime/src/domains/actions.ts (the declarative-update branch runs inside the route's one catch, which serves a data-plane refusal with its own status and code: the hook's refusal arrives as 400 VALIDATION_ERROR carrying the sentence, the answer /data gives the same write since #11588)",
"packages/qa/dogfood/test/showcase-record-write-actions.dogfood.test.ts (the wire half over real HTTP on the stock showcase: a caller who may edit the task gets a 4xx carrying the sentence and the task stays finished; a caller who may not edit it is refused 403 before the hook is reached)",
"objectui packages/app-shell/src/utils/__tests__/consoleServerAction.errorToast.test.ts (objectui#9252 — the console failure chain characterized end to end with the transport stubbed)",
"objectui packages/app-shell/src/chrome/ConsoleToaster.tsx (sonner Toaster: richColors, duration 4000, toast nodes carry data-sonner-toast and data-type)",
"objectui#9151 (the zero-toast symptom this item re-observes on a current build); #21596 (this item)"
Expand All @@ -5143,6 +5143,12 @@
"date": "2026-10-20",
"change": "steps[0] respelled: 'boot the showcase isolated (RUNNER canonical boot line: own port, own file DB, --seed-admin)' → 'boot the showcase with RUNNER's canonical checklist boot (own port, own file DB, --seed-admin)'. Round 12's out-of-scope finding (landing record 6287983829 on wave anchor #24579): the phrase 'showcase isolated' named the dogfood §0 own-port boot, and a runner read it as the `isolated` tenancy posture (OS_TENANCY_POSTURE=isolated). The new spelling names that boot by what it is, in RUNNER.md's own words for it (the trap table's counter: own port/DB, skill §0), and names no posture. Read at base e4d604efd3. No clause changed",
"ref": "#25003"
},
{
"revision": 3,
"date": "2026-10-23",
"change": "fixtures.requires[0] and source respelled for #25468: showcase_reopen_task no longer writes from a script body through ctx.api (an elevated write); it declares its write (operation 'update', patch { done: false }), which the action route performs as the caller, so the hook now refuses the caller's own update and the nested action-VM hop is gone from this path. Its type stays 'script', the schema default. The answer is unchanged: measured on a dogfood boot of the change, the seeded admin's Reopen on a finished task answers 400 VALIDATION_ERROR whose error.message is TASK_REOPEN_REFUSAL, and the console dispatches an operation 'update' action through the same registered script handler (objectui ActionRunner.executeUpdateOperation at the .objectui-sha pin 6fb31dc), so the toast chain knownGaps[0] cites is the one this item observes. The two source rows for the nested action-VM hop (quickjs-runner.ts#sandboxRefusalMessage and the unit pin nested-hook-refusal-is-a-rejection.test.ts) no longer describe this path and leave source; the route's catch in domains/actions.ts and the dogfood pin showcase-record-write-actions.dogfood.test.ts replace them. No clause changed",
"ref": "#25468"
}
]
},
Expand Down
13 changes: 7 additions & 6 deletions examples/app-showcase/src/data/hooks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,13 @@ export const TASK_REOPEN_REFUSAL =
*
* `throw new Error('<sentence>')` from a sandboxed body is the business-refusal
* shape: the write is aborted (`onError: 'abort'`) and the sentence travels to
* the caller as a 4xx — on `/data`, and through a script action's `ctx.api`
* write on `/actions` too (`packages/runtime/src/sandbox/
* nested-hook-refusal-is-a-rejection.test.ts`). `showcase_reopen_task`
* (`src/ui/actions/index.ts`) is the script action that reaches it, and the
* platform checklist item `records-forms.script-action-hook-refusal-toast`
* drives that action in the console.
* the caller as a 4xx — on `/data`, and on `/actions` too, whether the write is
* an action's declared `operation: 'update'` or a script action's `ctx.api`
* write (`packages/runtime/src/sandbox/nested-hook-refusal-is-a-rejection.test.ts`).
* `showcase_reopen_task` (`src/ui/actions/index.ts`) is the action whose
* declared write reaches it, and the platform checklist item
* `records-forms.script-action-hook-refusal-toast` drives that action in the
* console.
*
* The condition is the two-root transition form (same lesson as
* {@link AuditTaskCompletionHook}): only the write that flips `done` from true
Expand Down
Loading
Loading