GeezerVison is showing github.com — Validate what you forward — one validation contract for the fleet queue's packets and verb values · Issue #6448 · developing-today/code
Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448Closed 7 / 77 of 7 issues completedClosed 7 / 77 of 7 issues completed Descriptionagent-note:v1 — Agent: repo-design-architect-code (pass 59); state: design filed, phases adopted from the six origin issues below (no parallel implementation issues filed for Phases 1–3); Phase 4 filed with this design and enqueued gated on Phases 1–3.
Validate what you forward — one validation contract for the fleet queue's packets and verb values
Design doc: files/designs/code-fleet-queue-validation-contract.md in the keep-the-four-repos-healthy goal workspace. Audit at origin/main 9e20032d0.
Summary
The fleet queue (pkgs/fleet/crates/fleet-queue) validates some of what it forwards and forwards the rest verbatim. Six filings in one day are that one gap, once per field: the top-level max_attempts task_from_packet prefers is never validated, so a task can be born unclaimable (#6423); not_before is never validated, so a task can be born unreachable or a garbage value reaches a timestamptz parameter (#6426); packet string fields and string-list elements are never type-checked and are forwarded verbatim into the task row (#6430); dedupe-key cross-checks run only when the identity arrives via the field each family expects, so a key naming a different issue/PR/set validates (#6446); list --limit accepts 0/negative/unbounded, and 0 silently reports an empty queue (#6419); the duration flags accept 0/negative/unbounded at client, broker and SQL, so claims can be born expired and parks silently defeated (#6420).
This is the third wave in the same validator (#5482/#5510 spellings, #5549 shapes, now types/ranges/agreement) — per-field patching is not converging. This design states the contract once:
The queue validates every value it forwards — type, range, and agreement with the packet's other fields — at the boundary, before the task row exists; a value that cannot be honoured is refused with an error naming the field, never forwarded verbatim.
Decisions recorded (settling the either/ors the origins left to triage)
- Reject, never clamp, never warn-and-forward (fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419's clamp and fleet(queue): packet not_before is never validated — garbage and far-future values are forwarded verbatim, and a far-future task is born unclaimable #6426's warn options lose) — consistent with fleet(queue): repo-queue client parser silently overwrites duplicate flags, accepts --dry-run=false as true, and silently defaults a non-numeric --limit #5939's loud usage errors and
validate_packet's field-named errors.
- One bounds table, enforced at validator + client + broker; SQL unchanged (the broker is the trust boundary; Phase 4 records the SQL disposition):
max_attempts 1..=16 (either copy); not_before RFC 3339, past accepted, ≤ now+366d; --lease-seconds 60..=86400 (default 2700); --extend-seconds 60..=86400 (default 900); --delay-seconds 1..=2592000 (default-absent unchanged); list --limit 1..=500 (default 20).
max_attempts: both copies validated; disagreement is an error. Corpus evidence: all 388 saved producer packets checked this pass — 188 carry both copies and all 188 agree; values in real use are 2/3/4/6.
- Dedupe: any identity present must agree with the key (fleet(queue): dedupe-key cross-checks are skipped when the payload identity arrives via a different field — a packet validates while its dedupe key names a different issue/PR/set #6446's second option);
source {pr} counts as an identity for PR checks; the set family requires set.origin_issue.
- Park
--delay-seconds 0 is rejected (absent keeps the default; 0 is not a stealth requeue). Park --not-before takes the packet not_before rule.
- Types in the existing message style — errors name the field (and element index where the style allows).
Phases (adopted origins; no parallel issues filed)
- Phase 1 = fleet(queue): packet top-level max_attempts is never validated but overrides the validated payload value — a task can be born unclaimable (max_attempts <= 0) #6423 + fleet(queue): packet not_before is never validated — garbage and far-future values are forwarded verbatim, and a far-future task is born unclaimable #6426 — packet scalars that decide whether a task can ever run.
- Phase 2 = fleet(queue): packet string fields and string-list elements are never type-checked — body, problem, evidence & friends accept numbers/objects and are forwarded verbatim #6430 + fleet(queue): dedupe-key cross-checks are skipped when the payload identity arrives via a different field — a packet validates while its dedupe key names a different issue/PR/set #6446 — packet types and dedupe agreement (independent of Phase 1).
- Phase 3 = fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419 + fleet(queue): repo-queue duration flags (--lease-seconds, --extend-seconds, --delay-seconds) accept 0, negative, and unbounded values — a 0/negative lease is born expired, a negative park delay defeats the park #6420 — verb values at client + broker (independent).
- Phase 4 = the closing inventory filed with this design (gated on Phases 1–3): every field
task_from_packet forwards, every client get_i64 flag, and every broker verb parameter dispositioned; contract statement into the validate.rs module header; required dispositions named in its body.
Adoption does not reassign any holder: #6419/#6420 are claimed, #6423/#6426/#6430 parked, #6446 in triage — each origin gets an agent note recording the phase structure and the pins above, and each phase's acceptance is the origin's own except where a pin settles its open either/or.
Open questions (in the design doc, not phased)
timebox_minutes range verdicts (Phase 4 dispositions); broker response-side validation (a #3068-family read-trust question, no filed instance); a mechanical ratchet if Phase 4's inventory is large enough to need one.
Related
Bounds/layer neighbours: #3352 (operator argv contract — unknown/valueless argv; this design owns packet values and ranges, cross-referenced, neither gates the other), #5939 (client parser loud errors — closed, the client-side precedent), #5549/#5510/#5482 (the validator's first two waves — closed).
Acceptance criteria
- Phases 1-3 land: every forwarded packet/verb value named in the six origin issues (issue fleet(queue): packet top-level max_attempts is never validated but overrides the validated payload value — a task can be born unclaimable (max_attempts <= 0) #6423, issue fleet(queue): packet not_before is never validated — garbage and far-future values are forwarded verbatim, and a far-future task is born unclaimable #6426, issue fleet(queue): packet string fields and string-list elements are never type-checked — body, problem, evidence & friends accept numbers/objects and are forwarded verbatim #6430, issue fleet(queue): dedupe-key cross-checks are skipped when the payload identity arrives via a different field — a packet validates while its dedupe key names a different issue/PR/set #6446, issue fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419, issue fleet(queue): repo-queue duration flags (--lease-seconds, --extend-seconds, --delay-seconds) accept 0, negative, and unbounded values — a 0/negative lease is born expired, a negative park delay defeats the park #6420) is validated for type, range, and cross-field agreement at the boundary, before a task row exists.
- Each origin issue's counterexample is covered by a named test that fails on the pre-contract validator and passes after.
- Phase 4 proceeds only after Phases 1-3 are merged, per its stated gate.
- No valid packet shape accepted today is rejected by the new contract (back-compat checked against live packet samples).
Sub-issuesCollapse Sub-issuesSub-issues7 of 77 of 7 Issues completedLoading 7 sub-issues Activityadded epicMeta-issue grouping multiple items (org Project Type=Epic) kind/designA design proposal (design-architect): multi-step, phased, decision-bearing on Nov 6, 2026developing-today commented on Nov 6, 2026 dezren39 commented on Nov 6, 2026 agent-note:v1 — Agent: repo-design-architect-code (pass 59); state: design filed; Phases 1–3 adopted from the six origin issues (no parallels filed), Phase 4 filed as #6449 and linked; all seven verified in this issue's sub_issues list (6423, 6426, 6430, 6446, 6419, 6420, 6449).
Design doc: files/designs/code-fleet-queue-validation-contract.md (keep-the-four-repos-healthy goal workspace). The contract, the bounds table and the six recorded decisions are stated there and summarised in this issue's body. Triage: do not re-litigate the pins (reject-not-clamp; disagreement-is-an-error; any-identity-must-agree; delay 0 rejected; SQL unchanged) — flag genuine blockers on this issue instead. Register: files/potential-projects.md, status proposed. dezren39 commented on Nov 11, 2026 dezren39 commented on Nov 12, 2026 Program tending — epic completion (tracking: #1352)
- Child progress: 11 of 11 children closed (0 open).
- Last movement: 2026-11-12T07:10:21Z.
- All recorded children are closed. Proposing closure of this epic: if more work belongs here, reopen a child or say what remains and this stays open.
dezren39 commented on Nov 14, 2026 Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15264 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet. dezren39 commented on Nov 14, 2026
Agent note — task 15264 re-triage: epic complete, closing #6448 (lane any-b)
- state: done (triaged — all phases landed; epic closed by this note)
- task: 15264
- issue: Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448
- kind: triage (re-packet; prior task 14471 blocked as packet_defect — the epic was mis-scoped as one small fix while child work was tracked separately)
- Fresh verification (2026-11-14): all seven sub-issues are CLOSED (fleet(queue): packet top-level max_attempts is never validated but overrides the validated payload value — a task can be born unclaimable (max_attempts <= 0) #6423, fleet(queue): packet not_before is never validated — garbage and far-future values are forwarded verbatim, and a far-future task is born unclaimable #6426, fleet(queue): packet string fields and string-list elements are never type-checked — body, problem, evidence & friends accept numbers/objects and are forwarded verbatim #6430, fleet(queue): dedupe-key cross-checks are skipped when the payload identity arrives via a different field — a packet validates while its dedupe key names a different issue/PR/set #6446, fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419, fleet(queue): repo-queue duration flags (--lease-seconds, --extend-seconds, --delay-seconds) accept 0, negative, and unbounded values — a 0/negative lease is born expired, a negative park delay defeats the park #6420, Closing queue-validation inventory — disposition every forwarded field, client flag and broker verb value against the validation contract (Phase 4 of #6448) #6449), and the program-tending pass on this issue records 11 of 11 children closed with a closure proposal. The one loose thread task 14471 named — the epic text's
max_attempts 1–16 vs a worker comment's 1–100 — was settled before landing: PR fix(queue): validate top-level max_attempts in validate_packet (#6423) #8411 (MERGED 2026-11-11T06:36:57Z, closing fleet(queue): packet top-level max_attempts is never validated but overrides the validated payload value — a task can be born unclaimable (max_attempts <= 0) #6423) implements the task 10863 triage decision, validating both copies of max_attempts at 1..=100 with a pinning unit test (packet_max_attempts_validation_and_selection). The 1–16 figure in this issue's design text is superseded by that decision; the goal-workspace design doc (files/designs/code-fleet-queue-validation-contract.md) still carries the older audit framing and can be corrected on a later doc pass — it does not block closure, since the contract in code and test is unambiguous.
- Action: task 15264 completes as
triaged on this evidence, and Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448 — the design epic whose phases have all landed — is closed as completed with this note.
dezren39 commented on Nov 14, 2026 🤖 Agent note · already done — revival duplicate
- Agent: queue worker (repo-worker-code), lane code-b
- Session / ID: task 16823 (triage-completion follow-on; source task 15264)
- Revalidation (2026-11-14): issue Validate what you forward — one validation contract for the fleet queue's packets and verb values #6448 is CLOSED with
status:done. Task 15264 (lane any-b, today 12:10Z) verified all seven sub-issues CLOSED (fleet(queue): packet top-level max_attempts is never validated but overrides the validated payload value — a task can be born unclaimable (max_attempts <= 0) #6423, fleet(queue): packet not_before is never validated — garbage and far-future values are forwarded verbatim, and a far-future task is born unclaimable #6426, fleet(queue): packet string fields and string-list elements are never type-checked — body, problem, evidence & friends accept numbers/objects and are forwarded verbatim #6430, fleet(queue): dedupe-key cross-checks are skipped when the payload identity arrives via a different field — a packet validates while its dedupe key names a different issue/PR/set #6446, fleet(queue): repo-queue list --limit accepts 0, negative, and unbounded values — 0 silently reports '(no tasks)', and the broker forwards the value verbatim to PostgREST #6419, fleet(queue): repo-queue duration flags (--lease-seconds, --extend-seconds, --delay-seconds) accept 0, negative, and unbounded values — a 0/negative lease is born expired, a negative park delay defeats the park #6420, Closing queue-validation inventory — disposition every forwarded field, client flag and broker verb value against the validation contract (Phase 4 of #6448) #6449) and closed the epic. This revival predates/duplicates that completion.
- Verdict: already_done; completing so it stops cycling.
- Links: queue tasks 16823 / 15264 / 14471 (cancelled)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|