Skip to content

runtime(queue): publish terminal work queue without overwriting planner intent #1305

Closed

Description

@EffortlessSteven

Problem

work_queue.json is emitted while sensors and proof tasks are still planner-time intent. Later successful, failed, timed-out, skipped, missing, and receipt-backed terminal facts do not update that artifact. Treating it as execution truth leaves successful sensors planned, omits executed impact proof, and makes queue reconciliation contradictory.

Contract

Publish two explicitly different surfaces without rewriting planner intent:

work_queue_plan.json
work_events_plan.ndjson
  immutable byte-identical planner intent

work_queue_terminal.json
work_events_terminal.ndjson
  deterministic terminal projection after final sensor/proof receipts

The terminal projection must preserve legacy planner artifacts, validate versioned schemas, retain plan and terminal status separately, join receipts only through explicit identity, reject ambiguous or malformed identity, represent unplanned execution exactly once, bind to the immutable plan digest, and publish fail-closed.

Publication boundary

work_queue_terminal.json is the commit marker. Before replacing proof receipts, any prior marker must be invalidated. A new projection stages both terminal files, publishes terminal events first, and publishes the queue marker last. Validation or filesystem failure must remove partial or stale terminal output.

Acceptance

  • Regression coverage for all sensor terminal classes, proof joins, impact receipts, unexecuted and multiple-receipt proof, malformed/duplicate/ambiguous identity, deterministic replay, and publication failures.
  • Legacy planner artifacts remain byte-identical.
  • Exact-head workspace fmt/check/Clippy/test/docs/policy/verifier pass.
  • Retained packet inspection proves terminal artifacts bind final receipts.
  • Independent review is complete.

Non-goals

No scheduler activation, fuzzy deduplication, Required-consumer authority migration, proof-portfolio or fill-ledger repair, gate-enforcement change, or claim that #957 is complete.

Implementation owner

PR #1306.

Activity

  1. added
    bug
    on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcodex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions