Skip to content

threads-uqx.6: daemon integration — classification, delayed-apply scheduler, deadline revalidation, audit in coven.sqlite3 #11

Description

@BunsDev

Bead: threads-uqx.6
Phase: 5 — Approval semantics over the Phase-2 Ward
Spec: specs/PHASE-5-APPROVAL-SEMANTICS.md §1, §4, §6 decisions 1/2/6/8
Depends on: #8 (uqx.3 types), #9 (uqx.4 predicates), #10 (uqx.5 regions), #5 (ward_audit / ApplyAudit)

Scope

Wire the Phase-5 types into the daemon. This is the implementation bead for classification, delayed-apply flow, deadline revalidation, and audit appends. Cave contract amendment is downstream (threads-uqx.7).

Deliverables

  • ProposalClassification assigned at proposal intake (channel, regions, tier floor, ApprovalPath)
  • Delayed-apply scheduler: proposal → pending state; deadline fires revalidation; outcome is approved | vetoed | expired | rejected
  • Revalidation at deadline proves evidence_replay_hash matches (WARD-C7: evidence must survive the time gap)
  • Append-only audit rows in coven.sqlite3 for proposal_submitted, proposal_window_opened, proposal_approved / vetoed / expired / rejected — each close event carries explicit reason field
  • Daemon load-time reject if label-variant mapping drifts (no corresponding display label → reject, not warn)
  • Gate-4 fail-closed preserved: every path ends in live daemon re-materialization before apply

Constraints

  • Daemon contract first. Cave ProposalView extension starts as [DESIGNED, NOT SHIPPED] until this bead has release evidence (decision 6).
  • No provisional apply. Pending state is visible; daemon applies only after window closes with no veto. Rollback is not in scope (decision 2).
  • min_visible on VetoWindow must be enforced: deadline cannot close before the pending proposal was visible for at least that duration.
  • All audit appended here must interop with the ApplyAudit schema from issue ward_audit: add an apply-audit event type so the coven daemon can persist Gate-4 apply records #5.

Does not include

  • Cave contract amendment (threads-uqx.7)
  • Nova sign-off (threads-uqx.9) — that bead reviews this one's output

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions