# test671 — Hub task runtime evidence

Date: 2026-08-10 (Asia/Shanghai)

## Provenance

- Base: `51bdb84a417c9a2a1fd8f07f871e307e50da80a5`
- Tested source: `8528c23c7db674ed129f6b6c153fd694d38ddc94`
- Docker tag: `anet-test671:dev` (fixed/reused tag)
- Docker image ID: `sha256:deaca0c9dafa9f0a4829ff148642224a66aae916b8f66ece25da5017cdedccb8`
- Embedded image environment: `TEST671_SOURCE_COMMIT=8528c23c7db674ed129f6b6c153fd694d38ddc94`

An earlier image used a manually expanded, nonexistent SHA and is invalid evidence. It was discarded and the fixed tag was rebuilt from the exact value returned by `git rev-parse HEAD`; only the image and results above count.

## Scope

This layer covers the Hub half of issue #520 only:

- additive `runtime_submitted_at` and `consumed_at` task fields;
- node-token-only, exact-task-ID runtime evidence tools;
- atomic all-or-nothing batch ownership checks;
- caller session identity, task ownership preflight, and evidence stamps in one SQLite transaction;
- task-lifetime monotonic evidence preserved through retry/reassignment;
- explicit `inbox.task_id` linkage across MCP, REST, scheduler, retry, and reassignment delivery paths;
- a denominator gate that enumerates all five production task-inbox INSERT paths and rejects any path without `task_id`;
- logical-task ACK for new consumers plus exact `inbox.id` compatibility for old consumers;
- immutable node ownership with a canonical-alias fallback only for legacy/direct tasks whose `to_node_id` is NULL;
- REST/tool projections and bilingual lifecycle documentation;
- SQLite-backed mutation and behavior gates.

Agent runtime wiring is deliberately excluded from this candidate layer while the overlapping image-delivery change is being coordinated. Nothing was merged, deployed, published, or written to production.

## Normal path

Command:

```sh
sg docker -c 'docker run --rm -v /tmp/test671-8528c2-E0UJKl:/artifacts anet-test671:dev'
```

Result:

- `server/src/task-consumption.test.ts`: 11 tests passed, 80 assertions passed;
- `server/src/task-auth-origin-http.test.ts`: 2 tests passed, 8 assertions passed;
- production Hub bundle built successfully;
- RFC and Chinese/English field-boundary documentation checks passed;
- suite summary: `RESULT pass=14 fail=0`.

The behavior tests establish that connection, enqueue, delivery, ACK, and the legacy `sessions.task` preview leave both evidence fields NULL; runtime submission marks only `runtime_submitted_at`; authoritative consumption marks both fields; duplicate reports are idempotent; foreign/missing mixed batches write nothing; user tokens cannot report evidence; legacy/direct NULL-node tasks remain usable only through their authenticated canonical alias; and MCP, REST, scheduler, retry, and reassignment deliveries expose the original logical task ID. Retry/reassignment preserve task-lifetime evidence while fresh transport rows continue to ACK and report against that logical task.

## Witnessed-red mutations

Each mutation changed the tested implementation and made the behavior suite fail before the unmodified source returned green.

| Mutation | Artifact SHA256 |
| --- | --- |
| Remove immutable node ownership enforcement | `85605a634ed5b92b0220dcef6911b88225537e71ea7e2f102a4986cff7513e3f` |
| Remove legacy/direct canonical-alias ownership | `ff07aaaef2125333c61543512a726f20f4e70e9c540e889886a519fccf153b15` |
| Collapse runtime submission into consumption | `e2597162abd36e0b2232e3cb7967cbe4901f000fda2e3db8646cf41720a37d3e` |
| Stop consumption from implying submission | `5c82cc27b3d4b973019fbc1c85ac6c3a6317b003a786f85b198a7a51be16a0ff` |
| Unlink a redelivery inbox row from its logical task | `2c027ea6ec125f9cff7905f2b9bae76b2df82c08220e2b556cc5e9f6fe726926` |
| Remove logical-task ACK support | `1b52e92cef816ef95891e0a5f2bdb8d93dce11d29e58e867543b0d51c25510eb` |
| Clear task-lifetime evidence on retry | `84ba895d7793a282ef40b44d53ca1d302e8eb1e7ce022df7e1808c8c0c287ee6` |
| Unlink scheduler delivery from its logical task | `3feb8189e62a98bc3140632a54b6c70825223a2ea6de20db3502996c2864b8f0` |
| Unlink REST initial delivery from its logical task | `11267c8d574572416efab69ff40c98b90f342ebaf95df69210ad2bc9e02d11ff` |

Artifacts are the corresponding `.log` files under `/tmp/test671-8528c2-E0UJKl`.

## Result

PASS for the Hub-only task runtime evidence layer at source `8528c23c7db674ed129f6b6c153fd694d38ddc94`. Agent-node reporting remains a separate pending layer and this report does not claim end-to-end runtime consumption is complete.
