Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .beads/interactions.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,17 @@
{"id":"int-826011e5ee8ee8d205e7e838693c8fa1","kind":"field_change","created_at":"2026-07-17T14:52:45.121813Z","actor":"Val Alexander","issue_id":"threads-986.17.9","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Phase 4 FREEZE executed 2026-07-17 (Val approval recorded on this bead 2026-07-15; gate:val-phase4-freeze satisfied). Epic AC verified: (1) all four surfaces live+functional behind fixtures adapter (daemon flip filed as threads-v3g) — /weaves rail, thread pane, strand inspector, /proposals approval, merged in coven-cave PR #3223; (2) metaphor-referent binding preserved — Nova sign-off .17.8 closed 2026-07-17 with all three coherence checks PASS, no findings; source-pin suites hold referents in CI; (3) Charm pass complete (.17.7); (4) proposal flow E2E over real staged fixtures (.17.6); contract spec landed on main via PR #1 (a55d99af1). Children .17.1-.17.8 + .17.10 all closed with evidence. goals.md updated."}}
{"id":"int-a0bacc8f5edaee7a580c1a218a43157a","kind":"field_change","created_at":"2026-07-17T14:52:46.121787Z","actor":"Val Alexander","issue_id":"threads-986.17","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"EPIC SUMMARY — Phase 4 Cave UX complete. Built: PHASE-4-CAVE-SURFACES.md contract (PR #1, a55d99af1); read plumbing with dual adapters (fixtures-first default, daemon behind same interface); weave rail with tension rollup (snapped>frayed>unknown>stale>holds); thread pane Holds/Frayed/Snapped with strands + channel bindings; strand inspector with tri-state diff + R7 lineage; proposal approval flow (staged DegradeToProposal, approve/reject daemon-forwarders, fail-closed everywhere) — all merged via coven-cave PR #3223 (645a1894 head, 18 checks green, test:app 740/740). Gates: Charm voice pass .17.7; Nova coherence sign-off .17.8 (PASS, no findings); Val UX-accept .17.10; Val freeze approval .17.9. Rendering rules R1-R11 enforced fail-closed; PatternDescriptor never rendered as enforcement; Gate-4 unknown states render Blocked. Follow-up: threads-v3g (daemon endpoints + adapter flip). Screenshots 01-07 at ~/.openclaw/workspace/sage/goals/phase4-artifacts/."}}
{"id":"int-8181a70aeede0f1b0c58cd5fa4521a68","kind":"field_change","created_at":"2026-07-17T14:53:21.464406Z","actor":"Val Alexander","issue_id":"threads-986","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"PROGRAM EPIC COMPLETE — all four AC met. (1) Phases 0-4 delivered: v0.2 design freeze (.4); Phase 1 crate freeze (.18, coven-threads-core through v0.1.3); Phase 2 daemon integration freeze (.20, coven PR #382 merged f745117 — gate operational on main, + WARD-C6 compaction hook PR #393); Phase 3 portability freeze (.21, + jq4 surfaces map/.af exporter PR #2); Phase 4 Cave UX freeze (.17, coven-cave PR #3223). (2) RFC-0001 §5 conformance mirror 14/14 (.11). (3) Daemon imports validator: tier-0 edits route through validate_fail_closed, pinned v0.1.3. (4) Portability ships with C7 survives-serialization enforced (c7_roundtrip suite; C1-C7 jointly canonical in grimoire §9 per .12). 30 child beads closed with evidence. Remaining non-child follow-up: threads-v3g (daemon endpoints + adapter flip)."}}
{"id":"int-66ac26cbefee070c08321748420bad15","kind":"field_change","created_at":"2026-07-17T19:21:41.010774Z","actor":"Val Alexander","issue_id":"threads-eql","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"MERGED coven PR #409 (a9724b09), all checks green. ward_manifest baselines advance on every committed protected write (store_baseline upsert + advance_surface_baseline post-apply); refusals keep pending files and append proposal-scoped audit rows. Independently live-verified on the PR branch with a hermetic daemon over the real socket: baseline hash advanced after approve; the previously-broken second cycle (drift->stage->restore-to-advanced-baseline->approve) applied 200; refused approve kept file + audited and retry stayed viable. Clarified: tier-0 POST /edits is HeldForCoherence by design — approve is the sole tier-0 commit point."}}
{"id":"int-8c4cb8b33a94f385798ab5be6d435d8d","kind":"field_change","created_at":"2026-07-17T19:21:42.881808Z","actor":"Val Alexander","issue_id":"threads-v3g","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"COMPLETE, both sides merged. Daemon: coven PR #408 (85566ba) GET /api/v1/threads/weaves + POST /api/v1/threads/proposals/{id}/{approve|reject} per spec §3/§3.7, + P1 follow-up PR #409 (a9724b09, threads-eql) making multi-cycle approves work. Cave: coven-cave PR #3362 (3db8547c8) — daemon adapter is the DEFAULT (spec §1 fixtures-first condition lapsed; COVEN_THREADS_ADAPTER=fixtures opts out), daemon semantic refusals surface verbatim (proposal-refused/not-found/proposal-corrupt, 409/404) instead of transport-shaped 503. Live-verified end to end through the real socket with a hermetic daemon: reads normalize, staging, drift refusal, approve apply, corrupt guard, unknown-id fail-closed. Validation: coven gates green; cave test:app 758/758 + typecheck on merged head. Stowaway Desktop commit rescued to rescue/val-ui-tweaks-2026-07-17 (needs its own PR)."}}
{"id":"int-be6d3f843b0a440d8eb1d1c81d475d32","kind":"field_change","created_at":"2026-07-18T07:02:18.244791Z","actor":"Val Alexander","issue_id":"threads-vmf","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"MERGED coven PR #418 (b98504cd, all checks green incl. windows after cfg fix 2001da04). Root cause: handler Err propagated out of threads_weaves_response on the first WardConfig::load failure and daemon::handle_http_stream ?-returned before writing any HTTP bytes (empty reply, curl exit 52). Fix: per-familiar isolation (log to stderr + daemon-recovery.log, skip, continue — never abort fleet read) and handle_http_stream converts api handler errors to JSON 500 envelopes for every endpoint. Independently live-verified on the PR branch: fleet of healthy sage + Val's REAL v0.1-dialect nova ward.toml returns 200 with sage listed. Tests: threads_weaves_skips_malformed_ward_without_aborting_fleet_read, handle_http_stream_converts_api_handler_error_to_json_500. Surfacing of malformed-config familiars in the UI deferred to threads-v60 migration lane."}}
{"id":"int-b1b336460d93e610124263159faeada3","kind":"field_change","created_at":"2026-07-18T07:02:19.14866Z","actor":"Val Alexander","issue_id":"threads-wro","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"MERGED coven-cave PR #3407 (d1edf3e6, 19/19 checks). preferences-store + theme-store suites now set a hermetic temp COVEN_HOME so cave-home reconciliation stops walking the real ~/.coven legacy symlinks against temp canonical overrides. Verified locally on a migrated machine: both suites + backdrop/migration siblings green; remaining test:api failure is the separately-tracked pre-existing tts flake (cave-k7i3 pattern)."}}
{"id":"int-b0352cdd9a72fadc88de97b11bb2f4b9","kind":"field_change","created_at":"2026-07-18T08:11:35.780927Z","actor":"Val Alexander","issue_id":"threads-v60","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"COMPLETE. Command: coven ward migrate merged in coven PR #419 (74b09cd1, all checks green incl. windows after TOML-escape fixture fix 023dc5bb); shipping in v0.1.5 (signed tag pushed, release pipeline running). Fleet migration APPLIED on Val's machine 2026-07-18 with Val's decisions (SSH signing-key fingerprint via runtime arg; protected->tier 0 + protected_surface; editable->tier 2 Logged; backup-only legacy disposition): all nine familiars migrated with byte-exact ward.toml.v01.bak backups; thoth additionally needed a familiars.toml workspace= line (added, backup kept). Live verification post-kickstart: GET /api/v1/threads/weaves HTTP 200 with nine weaves, 4-8 threads each, all tensions Holds, all coherence Coherent — the authority-boundary protection layer is now live over real familiar memory. v0.1 approval_tiers/harness_blocks/invariants semantics intentionally not carried (no Phase-2 equivalent; preserved in backups)."}}
{"id":"int-7c8ce4baece71955acd514e5c34b1e12","kind":"field_change","created_at":"2026-07-18T08:24:30.113404Z","actor":"Val Alexander","issue_id":"threads-2q5","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"MERGED coven PR #393 2026-07-15 (daemon main; verified via git log 04e0ce7 ancestor of main). WARD-C6 CompactionLedger events append in store::vacuum_store_path with pre/post thread commitments; tests vacuum_appends_compaction_ledger_for_warded_surface, vacuum_without_warded_surfaces_appends_no_compaction_ledger, compaction_ledger_keeps_ward_audit_append_only. Full evidence in bead comments. Closing stale in_progress claim from coordinator session."}}
{"id":"int-45fee6c5015cd238bdf2b4f49197d1c5","kind":"field_change","created_at":"2026-07-18T08:24:30.930406Z","actor":"Val Alexander","issue_id":"threads-jq4","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"MERGED coven-threads PR #2 2026-07-15 (5b4a51a on main), tag v0.1.3 cut at that commit and coven pin bumped (30474c3). Surfaces content map + export_af lossy one-way Letta exporter, no .af import path, C7 conformance in tests/c7_roundtrip.rs. Full evidence in bead comments. Closing stale in_progress claim from coordinator session."}}
{"id":"int-96e600594080674425edaa10b7a4934c","kind":"field_change","created_at":"2026-07-18T12:03:18.346804Z","actor":"Val Alexander","issue_id":"threads-k9s","extra":{"field":"status","new_value":"open","old_value":"in_progress"}}
{"id":"int-3992491181076736d0b8c9d8072dd308","kind":"field_change","created_at":"2026-07-18T12:03:18.909381Z","actor":"Val Alexander","issue_id":"threads-3xd","extra":{"field":"status","new_value":"open","old_value":"in_progress"}}
{"id":"int-019bebf2d54257621bcb1e7d3bf06f74","kind":"field_change","created_at":"2026-07-18T12:03:19.445615Z","actor":"Val Alexander","issue_id":"threads-uqx","extra":{"field":"status","new_value":"open","old_value":"in_progress"}}
{"id":"int-1805bcc20e8bca84ac7425b1877298a9","kind":"field_change","created_at":"2026-07-18T14:42:35.772492Z","actor":"Val Alexander","issue_id":"threads-k9s","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"COMPLETE, both halves merged. Spec: §2.7 DegradedFamiliarView + §4.R12 + route-1 WeaveListView shape (coven-threads main 6476a67 + 6829e5d). Daemon: coven#422 merged e04a7af8 (reopened after accidental close; branch restored from verified head e5dd8fc5) — degraded entries with const reason + sanitized single-line errors, recovery-log breadcrumbs kept, no-ward familiars skipped. Cave: coven-cave#3415 merged 037bca078 — WeaveListView {weaves, degraded}, R12 blocked rail rows with exact copy 'ward unreadable — protection not verifiable', traceForDegradedFamiliar drawer, degraded fixture, forward-compat unknown reasons; typecheck + test:app 774/774. Fail-visible gap from threads-vmf closed end to end."}}
{"id":"int-c49d97f567aa70cc2b8d289e925f4114","kind":"field_change","created_at":"2026-07-18T14:45:05.028849Z","actor":"Val Alexander","issue_id":"threads-0ip","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"MERGED coven PR #426 (7ad55434), all checks green. Root causes fixed, not papered over: (1) windows pty_runner codex_json_batch_shim flake — side-effect files (args.txt/stdin.txt) were read before reliably visible on windows; now condition-based read_side_effect_file polling with deadline; (2) ubuntu smoke session-kill timeout — record_session_exit's natural-exit path could overwrite a concurrent 'killed' status; now update_session_status_if_current CAS (UPDATE ... WHERE status='running') with unit test conditionally_updates_session_status_only_from_expected_current_status; daemon.rs exit recorder uses it. Coordinator-reviewed the product diff. No assertions weakened, no quarantines needed."}}
{"id":"int-eefa76ec3968a5d984f3da51e113add6","kind":"field_change","created_at":"2026-07-18T21:24:21.080221Z","actor":"Val Alexander","issue_id":"threads-3ym","extra":{"field":"status","new_value":"in_progress","old_value":"open"}}
{"id":"int-17b3b70454cfdb7bbdaca849bc30ad2f","kind":"field_change","created_at":"2026-07-18T21:25:07.575924Z","actor":"Val Alexander","issue_id":"threads-3ym","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"PR #7 opened: https://github.com/OpenCoven/coven-threads/pull/7. 75+17+14 tests green, clippy clean. Awaiting merge + v0.1.4 tag."}}
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

All notable changes to `coven-threads-core` are documented here.

## [0.2.0] — unreleased

### Added

- `AuditEventType::ApplyAudit` variant + `"apply_audit"` tag in `WARD_AUDIT_SCHEMA_SQL`'s CHECK constraint (coven-threads#5).
- Enables the coven daemon to persist Gate-4 Tier-2 applied-write records into `ward.audit` (downstream: coven#414).
- `WardAuditRecord::detail` field — nullable JSON column for event-type-specific payload.
- For `ApplyAudit` events: `{"prev_sha256":"<hex>","bytes_written":N}`.
- `WardAuditRecord::for_apply(...)` constructor — builds the audit row for a Gate-4 applied write.
- `WardAuditRecord::apply_prev_sha256_hex()` / `apply_bytes_written()` — decode helpers for `ApplyAudit` detail.
- `APPLY_AUDIT_DETAIL_KEY_PREV` / `APPLY_AUDIT_DETAIL_KEY_BYTES` — stable JSON key constants.
- Phase 5 approval paths, veto windows, semantic surface regions, full-diff replay commitments, and validated daemon-to-client wire envelopes.
- Deterministic compilation of the retired Ward identity declarations for name, person, pronouns, purpose, and Coven membership.
- RFC-0001 provenance events with persistence-level required-detail constraints.
- `ward_audit_migration_sql` — transaction SQL builder that preserves existing detail payloads while also supporting pre-detail legacy tables. Schema ownership is tracked in `ward_schema_meta`, not SQLite's database-global `PRAGMA user_version`.
- Exhaustiveness test `schema_names_all_event_tags` extended to cover `ApplyAudit`.
- New tests: `for_apply_produces_correct_shape`, `for_apply_roundtrips_json`, `migration_sql_contains_apply_audit_and_detail_column`.

### Design notes

- **Column approach (Option A):** `diff_hash` carries `next_sha256`; `prev_sha256` + `bytes_written` ride in the new `detail` TEXT column as JSON. This avoids a second table rebuild by not adding typed hash columns while keeping the data query-accessible via SQLite JSON functions.
- **Migration approach (Option B-lite):** exports a migration builder and schema-action classifier so the daemon can perform the correct guarded rebuild for the observed source schema; component metadata avoids colliding with unrelated tables in `coven.sqlite3`.

## [0.1.3] — prior release

Initial audit module with seven `AuditEventType` variants (`proposal_submitted`, `proposal_approved`, `proposal_rejected`, `proposal_vetoed`, `ward_updated`, `validation_verdict`, `compaction_ledger`).
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/coven-threads-core"]

[workspace.package]
version = "0.1.0"
version = "0.2.0"
edition = "2021"
rust-version = "1.75"
license = "MIT"
Expand All @@ -17,7 +17,7 @@ thiserror = "2"
uuid = { version = "1", features = ["v4", "serde"] }
blake3 = "1"
sha2 = "0.10"
time = { version = "0.3", features = ["serde", "macros"] }
time = { version = "0.3", features = ["serde", "serde-well-known", "macros"] }

[workspace.lints.rust]
unsafe_code = "forbid"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//! Emit the public synthetic retired-Ward Phase 5 corpus as canonical JSON.

#[path = "../tests/support/phase5_retired_ward_corpus.rs"]
mod corpus;

fn main() {
println!("{}", corpus::canonical_corpus_json());
}
Loading