Skip to content

P0 epic: Close the Threads verification boundary with real Coven daemon E2E #31

Description

@BunsDev

Outcome

Make coven-threads safe to treat as a stable public authority protocol by proving its critical invariants through the real Coven daemon boundary—not only through in-process Rust tests.

The required path is:

current coven-threads change
  -> pinned real coven daemon
  -> supported request boundary
  -> current Threads crate proven active
  -> ephemeral filesystem / coven.sqlite3 / pending state
  -> scheduler, replay, restart
  -> optional Cave live-daemon acceptance

Normative implementation contract: docs/testing/e2e-contract.md, merged in #34 (db0049be8c75db77efb5b79c6f72184e0e116449).

Why this is P0

The repository has a strong library/conformance estate, but a green library PR does not establish transport, lifecycle, dependency wiring, persisted audit/staging state, delayed scheduling, and restart recovery. Current daemon integration pins Threads at c3bd46b; the older release v0.4.3 pins c102844. Explicit current-checkout override proof and real-daemon journeys now exist, but the required reviewed pin and full acceptance remain open.

Phase-5 sign-off remains blocked by four findings whose original defects now have draft repairs, not completed acceptance:

  • threads-okc — identity-predicate mutation/replay enforcement;
  • threads-980 — complete typed terminal evidence for opened windows;
  • threads-dgg — protected proposal-route prohibition;
  • threads-zav — retired-Ward live schedulability and recovery.

Canonical boundaries

  • Familiar Contract owns identity semantics.
  • Threads owns protected mutation verdicts, approval/replay semantics, and the ward_audit schema contract.
  • Coven owns authentication, request adoption, persistence, staging, scheduling, apply, recovery, and every side effect.
  • Psyche consumes authority-bound snapshots; it does not create verdicts.
  • Cave renders and forwards daemon truth; it is never approval authority.

No work item may create a second audit store or a second canonical writer.

Work graph

P0 — foundation and daemon proof

  • Merge the repository-readiness/CI foundation PR (chore: establish Threads E2E readiness and authority governance #34, db0049be8c75db77efb5b79c6f72184e0e116449): machine-readable R4 manifest, deterministic bootstrap/checks, Nextest/JUnit, informational coverage, compatibility pin, CODEOWNERS, evidence template, E2E contract.
  • Land a downstream coven-cli --test threads_e2e process fixture against a reviewed full Coven SHA.
  • Prove the Cargo override uses the current Threads checkout before tests run (daemon d4653f14, Threads 2d21254, metadata checked; this is not the required stable-pin gate).
  • Land permit/reject/drift smoke journeys.
  • Close threads-okc, threads-980, threads-dgg, and threads-zav with red -> production fix -> green daemon evidence.

P1 — resilience, human acceptance, and enforcement

P2 — ratchet and ecosystem conformance

  • Stress critical tests and retain flake trend data.
  • Exercise Channel::Deliberate once daemon reachability lands.
  • Publish compatibility status and immutable downstream canary evidence.
  • Add independent verifier vectors for public protocol claims.

Required journeys

  1. bounded authorized write;
  2. unsigned/unbound protected write;
  3. out-of-band drift and non-executed proposal;
  4. identity-invariant mutation and replay;
  5. protected SOUL.md proposal-route prohibition;
  6. complete veto-window terminal matrix;
  7. retired-Ward schedulability and recovery;
  8. committed-evidence drift across restart.

Evidence required per blocker

  • failing black-box case against pre-fix behavior;
  • production fix in the canonical owner;
  • passing black-box case after the fix;
  • lower-level regression test;
  • named CI check and sanitized failure bundle;
  • migration and rollback notes when persistence changes.

Assignment lanes

  • Sage: contract, compatibility ledger, conformance/evidence mapping.
  • Cody: Rust regressions and deterministic seams.
  • Nova integration lane: daemon process fixture and boundary implementation.
  • Echo: predicate/audit/replay invariant review.
  • Charm: Cave live-daemon acceptance.
  • BunsDev: authenticated GitHub accountability, merge policy, and human freeze.

Agents must not simulate Nova's independent review or Val's freeze.

Exit criteria

  • 8/8 journeys pass through the real daemon boundary.
  • 4/4 named Phase-5 blockers have red-to-green E2E proof.
  • Required tests use a full-SHA Coven pin and prove the local Threads override is active.
  • First-attempt E2E pass rate is at least 99.5% over 30 days; retry-success still fails CI.
  • Duplicate/missing terminal close records remain zero.
  • No correctness journey uses real wall-clock sleeps.
  • main is protected by the required authority checks.
  • Human sign-off remains independently attributable.

Evidence reconciliation (2026-09-10, acceptance continuation)

Foundation #34, immutable Actions #38, and secret scanning #41 are landed. The checked implementation/override items distinguish work that exists from reviewed runtime landing and full acceptance. The shared daemon draft is not missing implementation, but it is not a reviewed required-pin gate.

Work Current evidence Next obligation
Shared real-daemon harness Draft OpenCoven/coven#931 at d4653f14; 15 local default-parallel daemon journeys with proven current Threads 2d21254. Latest hosted run 34466364843 passes Windows workspace/clock units but fails four daemon startups (11/15) Repair/diagnose Windows lifecycle, retain exact-head evidence, then reviewed integration and required-pin gate
Identity predicates Component OpenCoven/coven#969 / OpenCoven/coven#885; integrated intake/replay and final-binding repairs in OpenCoven/coven#931 Retain final snapshot/commit evidence through exact-head acceptance and reviewed landing
Terminal closes Component OpenCoven/coven#932 / OpenCoven/coven#886; OpenCoven/coven#931 exercises all five terminal families and supersession/restart idempotency Retain complete typed closes through remaining commit-boundary failure cases and reviewed integration
Protected routes Draft OpenCoven/coven#933 at 3d2c06d067584cd4133ea573a0df9c88ac8b13a0, issue OpenCoven/coven#887; current-Threads daemon refusal/audit cases are green in OpenCoven/coven#931 Land and independently accept route/recovery matrix without widening proposal authority
Retired corpus Draft OpenCoven/coven#972 at e139023f6175a41d4a3c99cb6c2b28ca1d812875 and clock draft OpenCoven/coven#968; real migration, supported intake, minimum visibility, deadline, restart, and unsupported input exercised in OpenCoven/coven#931 Land prerequisites and satisfy cross-platform/full-contract acceptance
Windows daemon parity OpenCoven/coven#978 merged into the shared draft. Head fd610f6 passed 15 native journeys, including final-commit drift, at synthetic merge 6daed594 using committed Threads c3bd46b; later d4653f14 has startup failures Resolve the later startup failures; previous green and local override proof are not transferable
Final validated-snapshot binding OpenCoven/coven#979 merged into the shared draft; its final-commit drift case is wired and executed. Bounded independent authority review found no significant introduced correctness issues Reviewed integration and full acceptance; automated review is not Nova/Val approval
Runtime authority Upstream OpenCoven/coven#953 consumer projection and OpenCoven/coven#975 receipt reads are merged; trusted adapter owner remains OpenCoven/coven#857 Consume canonical trusted binding, never infer authority from the projection or client strings
Immutable CI actions Merged #38 at af013612c699b0adff918da3fd2bb7d0964cf0b3, issue #37; full hosted run 34411042660 passed with per-step Rust parity checks Action pinning landed; keep branch protection, scanning, coverage, and daemon acceptance separate
Secret/privacy hygiene #41 deployed secret scanning; actual PR CI 34465028325 and main CI 34465519559 pass. #40 is now a separate privacy job/documentation delta Resolve the frozen source-reference conflict without an unauthorized exemption or spec edit

Supported publication, deterministic scheduling, and the eight-case restart loop are implemented in the shared draft, not absent prerequisites. At d4653f14, 41 selected adoption/identity/commit cases and 15 current-checkout daemon journeys pass locally. Test-only cancellation diagnostics and store-ready concurrency fixtures landed separately through OpenCoven/coven#993 and OpenCoven/coven#996. The latest Windows failures are production-startup timeouts whose setup artifacts lost available diagnostics; evidence retention is being repaired before a runtime fix is claimed. These results do not certify signed authorization, changed runtime bindings, every commit interleaving, Cave acceptance, or the reviewed required pin.

Sections 6-7 require relevant authority changes between validation and commit to fail closed and bind the same validated snapshot. This is not an added requirement for globally simultaneous multi-file visibility; J1 separately requires atomic intended-file changes.

#27 was closed without merge on 2026-09-06 because null close evidence would weaken the invariant. Its retained branch is not a fix to merge. The stale completion of threads-76z has been reopened for explicit prevention/repair work.

The 2026-09-10 GitHub query reports main.protected=false and no repository rulesets. Action pins and secret scanning landed in #38/#41. Required-check policy, privacy enforcement (threads-t6t), coverage ratchets, and OS/Cave acceptance remain outstanding. These are not satisfied by CODEOWNERS, secret scanning, or informational coverage jobs.

Coven release v0.4.3 resolves to 8baa9c9b722a3a9553c6ed39b7e1ba2296ced95a and pins Threads to c102844; the older claim that no released source contains Threads is obsolete. Release ancestry does not establish complete enforcement or current-checkout compatibility.

Coordination: execution epic threads-8pz and acceptance task threads-8pz.5 remain active. #42 reconciles the explanatory delivery ledger after #36. Already-implemented daemon slices are blocked on reviewed acceptance rather than offered as duplicate ready work. Further engineering approval does not close Nova's independent review or Val's freeze, authorize the required pin, or certify deployed binaries.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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