From 0fdbb46fd00ffd7da184fd7582d40eb1a7868674 Mon Sep 17 00:00:00 2001 From: Bretton Date: Sat, 08 Aug 2026 05:47:57 +0000 Subject: [PATCH] chore(loop): task 4 done — merged e00d97a, task-5 obligations + suite-health notes Co-Authored-By: Claude Fable 5 --- loop_state.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file(s) changed, 37 insertion(s)(+), 1 deletion(s)(-) diff --git a/loop_state.md b/loop_state.md --- a/loop_state.md +++ b/loop_state.md @@ -16,7 +16,7 @@ |---|------|-------|--------|--------------|-------| | 1 | Lexicons: postv2 + acceptance + removal, deprecation note, fixtures, T0 validation | A | done | 4574151 | make ci 4640/0. 10-stream review; codex HIGH: rkey transform non-total → digest scheme (PRD rev 2.2) | | 2 | Migration 034: community_post_admissions + posts FK drop; admissions repo + T1 transition/watermark matrix | A | done | 9491744 | make ci 4735/0. PRD → rev 2.4 (tuple watermark, pending-only rejection CAS, repo-side op-rank). Behavior flips: unknown authors indexable, explicit deletion sweep | | 3 | admitPost extraction + NEW policy (bans, rate limits, dedupe) wired into existing write path | A | done | df97cb2 | make ci 4840/0. PRD → rev 2.6. Migration 035 ledger (plan review killed posts-table limiter). BANS NOW ENFORCED. T2 wire probe added | -| 4 | Acceptance engine: deterministic rkey, swap-safe acceptance writer, atomic applyWrites removal, repin/terminality rules | B | pending | | | +| 4 | Acceptance engine: deterministic rkey, swap-safe acceptance writer, atomic applyWrites removal, repin/terminality rules | B | done | e00d97a | make ci 4944/0. Probe-driven plan review killed 4 assumptions pre-code. 2 production bugs fixed as side effects. Gate saga: 2 latent test defects fixed + Docker restart (150d uptime) | | 5 | Ingestion: postv2/acceptance/removal consumers, watermark gating, direct-fetch convergence, WantedCollections + 3 e2e contracts | B | pending | | parent may split 5a/5b at brief time; WantedCollections + contracts same merge | | 6 | Write path flip: author-repo postv2 via session, author-PDS blobs, sync fast-path accept, post.delete flip, post.update NEW | C | pending | | review MUST include pragma:security — verify it fired | | 7 | Read path: centralized visibility predicate, full surface inventory, #removedPost, getStatus, alternate-endpoint invisibility T2s | C | pending | | | @@ -70,6 +70,42 @@ flip re-triggers the bypass security review. TASK 7 unchanged obligations. PRODUCT QUESTION for Bretton: comments bypass admission entirely — a banned author can still comment (PRD open question #2); decide whether bans should gate comments before Beta. +- (2026-08-08, task 4) RESOLVED in-task, no issue needed: comment edit's + dead swap-conflict handling FIXED (ErrSwapConflict || ErrConflict) and + the retried-delete-500 defect FIXED (RecordNotFound name mapping; the + self-retiring pinned test fired exactly as designed and was retired). +- (task 4 → TASK 5 OBLIGATIONS, additive to task-2/3 lists): wire + social.coves.community.acceptance + removal into consumerWantedCollections + FIRST — the engine's catch-up stamp covers the stranded-pending hole but + the firehose consumer is still the authority; drive the engine via a + LEASELESS queue (safe only because every write is idempotent — documented + in engine.go); serialize the queue per community DID (swapCommit is + repo-global — sibling workers on one busy community starve removals); + classifyRecordDiff ships PURE+UNCALLED — task 5 invokes it with old/new + event snapshots AND applies the §5.5 bridge-trust gate; §8 edit-debounce + belongs to the queue driver; no production AdmissionDecider/ + CommunityRepoFactory exists yet — task 5/6 wire them, factory MUST fail + closed on unhosted communities (DID-mismatch guard is tested). +- (task 4, suite-health findings fixed at root): invalid lexicon fixtures + must carry EXACTLY ONE violation (map-order coin-flip otherwise — + tribunal-vote fixture repaired); T2 waits that can legitimately run long + need poll cadences whose 100/min-bucket arithmetic outlasts + contractBudget (comment contract's parent-post wait moved to 600ms after + 5 consecutive cliff failures at 23.97s-measured healthy latency). WATCH: + posts-consumer drain latency under full-suite parallel load is ~20s+ — + if another contract trips the cliff, revisit contractPollInterval + systemically and profile the consumer (backlog candidate). +- (task 4 locked decisions): applyWrites writers are STATE-SHAPED (no + upsert/tolerant-delete in the PDS — read both rkeys, shape create/update/ + delete per presence, swapCommit-guard the read-then-write); validate:false + on applyWrites (unpublished lexicons fail validate:true); acceptance + re-fire must not mint a new CID (skip-if-already-pinned / reuse + createdAt); engine = ProcessAdmission one-row contract, no lease (safe + ONLY because every write is idempotent — documented); optimistic + ApplyAcceptance with commit rev = optimization, firehose is authority, + own-echo skipped_stale = success; diff classification ships PURE + + UNCALLED in task 4 — TASK 5 invokes it with old/new event snapshots and + drives the engine via a leaseless queue. - (task 3, backlog candidates — /file-issue if they survive the loop): registered-aggregator limiter is fail-open (RecordAggregatorPost failures logged-only, non-atomic count) — pre-existing; IsAggregator lookup -- tangled.sh