proto: widen error-on-paused for ADR 0013's auto-pause signal (1.3.0)

DAEMON's docs/adr/0013-task-state-machine-ownership.md needs a wire signal
for the difference between a paused task the daemon entered unilaterally
(auth_required, server_file_changed, disk_full) and one that was requested
(user, schedule, queue stop, admission reconcile) -- without it, DAEMON's §3
resume rule ("resume only when the reason matches the event that justifies
resuming") has nothing correctness-preserving to key on, and would have to
guess from timing. CORE has already accepted the ADR; this was the sole
remaining blocker per DAEMON's own status line on it.

No retype, no new field -- error was already TaskError | null on both
event.task.state and TaskSummary, exactly as DAEMON characterized the ask.
Only the *description* of when it is populated widens: previously "failed or
retry_wait", now also "paused, when the daemon entered it on its own
initiative". A deliberate pause still carries error: null. TaskError's own
top-level description gets the same widening, since it previously also said
"failed or retry_wait" and would otherwise contradict the field that embeds
it.

New fixture (event.task.state.auto-paused.json) exercises the case directly:
an auth_required pause with error populated, contrasted in its own
description against download.pause.json's error: null for a requested pause.
The existing event.task.state.json fixture's first assertion was stale
("error is present exactly when failed or retry_wait") and is corrected.

Minor bump, 1.2.0 -> 1.3.0: a description widening on an already-nullable,
already-optional field changes no JSON Schema shape, but it is a real
behavioral commitment change worth a version bump so downstream regenerates
and notices, per the same reasoning ADR 0010 applied to TaskErrorCode.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012fgjnqFCS5h5L7gZTZo3rV
This commit is contained in:
2026-09-10 00:04:35 +04:00
co-authored by Claude Sonnet 5
parent 203d4a662f
commit 6db304a0ae
16 changed files with 179 additions and 40 deletions
+9 -6
View File
@@ -3,14 +3,17 @@
**This directory is the interface between every lane.** Owner: agent **PROTO**.
Nobody else commits here. Everybody else *generates from* here.
> ## Status: **v1.2.0** (frozen at v1.0.0 on 2026-09-09; minor bumps since)
> ## Status: **v1.3.0** (frozen at v1.0.0 on 2026-09-09; minor bumps since)
>
> **v1.0.0** froze 38 methods, 9 events, 26 named types. **v1.1.0** widened `bufferBytes`
> bounds, added `connection.maxTotalBufferBytes` / `connection.maxActiveSegments`, and
> `TaskDetail.effectiveBufferBytes` (`docs/adr/0012-...`). **v1.2.0** (current) adds
> `download.provideAuth` — F2's credential return path for a paused 401/407, UDS-only
> and privileged. See also `docs/adr/0005-...` for the versioning rule and
> `docs/adr/0010-...` for the failure taxonomy and segment ranges.
> bounds and added the segment-budget settings (`docs/adr/0012-...`). **v1.2.0** added
> `download.provideAuth`, F2's credential return path. **v1.3.0** (current) widens when
> `event.task.state.error` / `TaskSummary.error` are populated to also cover a `paused`
> the daemon entered unilaterally (`auth_required`, `server_file_changed`, disk full),
> not just `failed`/`retry_wait` — the wire shape is unchanged (`error` was already
> `TaskError | null`), only the description of when it's set. Landed for DAEMON's
> `docs/adr/0013-task-state-machine-ownership.md`. See also `docs/adr/0005-...` for the
> versioning rule and `docs/adr/0010-...` for the failure taxonomy and segment ranges.
>
> Lane requests are answered in writing: `contracts/proto-answers-m1.md` responds to
> `core/docs/proto-requests-m1.md` point by point.