Verified against the pinned vendor/adcp-sdk
(@adcp/sdk@14.0.0-beta.12, AdCP 3.2.0-beta.6). SDK issue, not a protocol
one — the spec already models this correctly.
Title
Business rejections answer 'failed': 'rejected' is unwritable and the Postgres CHECK forbids it
Body
Three layers of the SDK disagree about whether rejected exists.
decisioning/runtime/task-registry.ts:45, :63 — rejected is a documented
terminal status carrying a result artifact.
task-registry.ts:247, postgres-task-registry.ts:322 — the only terminal
writers are complete() and fail(), and fail() hardcodes failed.
Nothing writes rejected.
postgres-task-registry.ts:174 — CHECK allows only
submitted, working, completed, failed (4 of the spec's 9), so an adopter
willing to write the record directly still cannot.
enums/task-status.json — failed is "an error during execution",
rejected is a structured decline, "not a transport failure".
Net effect: an adopter declining a well-formed request from a handoffToTask
function answers failed on the wire, which is the wrong spec status. Buyers
cannot tell an execution error from a business decision.
Adopter context
We are a sales-guaranteed seller whose media buy waits on a human converting
an offer into a booking, which is the case submitted is defined for
("long-running execution (hours to days)"). When that offer is archived or
expires, the correct terminal answer is rejected — and we cannot emit it.
Our workaround is a custom TaskRegistry via opts.taskRegistry
(from-platform.ts:2525) that resolves status on read, which works because
get_task_status reads only through taskRegistry.getTask()
(create-adcp-server.ts:7464). It means we cannot use the shipped
createPostgresTaskRegistry, and list_tasks has to be wrapped too or it
serves stale rows.
Related
task-registry.ts:31 and postgres-task-registry.ts:171 point adopters at a
taskRegistry.transition() API "(v6.1)" for exactly these states. ## 6.1.0
is at CHANGELOG.md:10497 and the package is at 14.0.0-beta.12; transition
appears nowhere in src/ outside those two comments. Happy to file that
separately if you'd rather keep this issue single-concern.
Ask
- Widen the Postgres CHECK to the full nine-state enum, with the migration.
- Add a way to end a task as
rejected — a reject() sibling of fail(), or
fail() honouring a business-decline marker on AdcpError.
Verified against the pinned
vendor/adcp-sdk(
@adcp/sdk@14.0.0-beta.12, AdCP3.2.0-beta.6). SDK issue, not a protocolone — the spec already models this correctly.
Title
Business rejections answer 'failed': 'rejected' is unwritable and the Postgres CHECK forbids itBody
Three layers of the SDK disagree about whether
rejectedexists.decisioning/runtime/task-registry.ts:45,:63—rejectedis a documentedterminal status carrying a result artifact.
task-registry.ts:247,postgres-task-registry.ts:322— the only terminalwriters are
complete()andfail(), andfail()hardcodesfailed.Nothing writes
rejected.postgres-task-registry.ts:174— CHECK allows onlysubmitted, working, completed, failed(4 of the spec's 9), so an adopterwilling to write the record directly still cannot.
enums/task-status.json—failedis "an error during execution",rejectedis a structured decline, "not a transport failure".Net effect: an adopter declining a well-formed request from a
handoffToTaskfunction answers
failedon the wire, which is the wrong spec status. Buyerscannot tell an execution error from a business decision.
Adopter context
We are a
sales-guaranteedseller whose media buy waits on a human convertingan offer into a booking, which is the case
submittedis defined for("long-running execution (hours to days)"). When that offer is archived or
expires, the correct terminal answer is
rejected— and we cannot emit it.Our workaround is a custom
TaskRegistryviaopts.taskRegistry(
from-platform.ts:2525) that resolves status on read, which works becauseget_task_statusreads only throughtaskRegistry.getTask()(
create-adcp-server.ts:7464). It means we cannot use the shippedcreatePostgresTaskRegistry, andlist_taskshas to be wrapped too or itserves stale rows.
Related
task-registry.ts:31andpostgres-task-registry.ts:171point adopters at ataskRegistry.transition()API "(v6.1)" for exactly these states.## 6.1.0is at
CHANGELOG.md:10497and the package is at14.0.0-beta.12;transitionappears nowhere in
src/outside those two comments. Happy to file thatseparately if you'd rather keep this issue single-concern.
Ask
rejected— areject()sibling offail(), orfail()honouring a business-decline marker onAdcpError.