fix(dashboard): make Phase 0.5 evidence activation-grade - #1156
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 3:19 PM ET / 19:19 UTC. ClawSweeper reviewWhat this changesThis PR makes GitHub-egress completeness depend on the evidence actually evicted and adds bounded, privacy-safe publication transition reconciliation to the exact-review dashboard. Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer merge review: current main does not contain the eviction-boundary or publication-cause fixes, and the branch has coherent exact-head Worker/SQLite proof with no actionable correctness or security finding. The durable-schema and public-observer expansion still warrants controlled rollout observation. Priority: P2 Review scores
Verification
How this fits togetherThe exact-review queue receives publication completion events and signed GitHub-egress telemetry, persists bounded operational facts in a SQLite Durable Object, and exposes observer-only status to dashboard consumers. This change improves how retained telemetry determines query completeness and how publication outcomes are attributed downstream. flowchart LR
A[Signed egress telemetry] --> B[Rollup and rate-limit store]
B --> C[Eviction watermarks]
D[Queue and batch completions] --> E[Publication cause buckets]
C --> F[Observer API]
E --> F
F --> G[Dashboard and Bay observers]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the additive observer changes through the normal deployment path, then verify migrated dashboard responses and attribution completeness before treating the new telemetry as activation evidence. Do we have a high-confidence way to reproduce the issue? Yes. The committed Worker/SQLite harness provides a focused cap-eviction, restart, batch-completion, and public-observer scenario; source inspection also identifies the former cleanup-time completeness mechanism. Is this the best way to solve the issue? Yes. Recording actual eviction boundaries and bounded closed-dimension causes fixes the observed attribution gap without enabling Phase 1 or changing queue policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6494ab5eb285. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
531dcb2 to
3b8feda
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Pull request received. I will update this pull request when review starts. |
3b8feda to
9e984a4
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Summary
target_apppathThis is the CSW-127 Phase 0.6 remediation derived from the Phase 0.5 monitor. It does not activate Phase 1 and does not change admission, capacity, schedules, retry ceilings/delays, credential ownership, gates, or rollback behavior.
Final head:
9e984a44ec946557896ca69558a00a7cf929fe9cRebased base/current main:
6494ab5eb285cc2993d4679d6723e4b2486de99cLive deployed dashboard at final local proof:
6494ab5eb285cc2993d4679d6723e4b2486de99cProblem
Phase 0.5 proved two activation blockers:
rollup_window_complete=falseand thereforequery_complete=falsepersisted in otherwise small, untruncated 15-minute and one-hour views. The store recorded when cap pruning ran, so evicting old rows could incorrectly poison newer windows.retry_exhausteddead letters, but the public surface lacked durable stage/revision/pool/recovery attribution needed to distinguish real retry amplification, circuit deferral, supersession, and refresh.The monitor also observed a separate owner-isolated
target_appclosure-proof 403 path. This PR does not alter that read path or merge it intorepository_actions; it only ensures fallback publication telemetry retains the active closed pool classification.Implementation
Honest rollup completeness
Publication-cause reconciliation
attribution_completefails closed on mismatch, truncation, or unattributed rowsretry_exhaustedDLQ reasonCausally supported behavior corrections
backoffcause and does not consume publication retry budgetpublished,superseded,deferred) preserve the existing failure depth instead of being counted as another failed attemptcompleteandreleaseretain the active circuit scope instead of silently defaultingtarget_appobservations torepository_actionsCurrent-main reconciliation
The branch was rebased once, conflict-free, onto exact main
6494ab5eb285cc2993d4679d6723e4b2486de99c, which includes merged PR #1169. Range-diff shows the original nine Phase 0.6 commits are patch-equivalent. Two additional commits reconcile proof and fix the fallback pool attribution found by committed review.dc738b3845655ad36f91ea9584d90abdd4df3ca34398fe9c9fb599a83aaef5304b4ab39e359273dac175faa03a95208d82bca5ec3e2335ccc9d5dc11c4751080cf1466a45df3a8073ad0a07d8488c91182d9ba983abdb5738c138e4741c52960fa8aa019c9eda83c29d222bddf917b6a8c5ef27254887ec2746cb858bf00fc0fdf37c7f9471b935054a25bab6a358d239c1e67cd38159d70de18eecbd9a5d844dc6762092a509828f8a9acebae23d342f92efeedbroker_lookupandconditional_responseremain in completeness totals93ecdfc3937f7988667da7f59e784f4c2fe1930dat reconciliation386730fc41ae0b1b63a7dbbd648404be6bd65c66bf762f3f6f9e8ee89fc31a260053dabe257a7103e17e09425b604aeb6db9fb56494f640a9454ec976494ab5eb285cc2993d4679d6723e4b2486de99cNo landed logic is duplicated. Phase 0.6 uniquely contributes per-kind cap-eviction watermarks, bounded publication transition/cause reconciliation, retry-neutral credential-circuit deferrals, and correct closed-pool attribution through fallback completion.
Compatibility, privacy, and Bay
target_appandrepository_actionsowner isolation remains intactValidation
pnpm run checkin the exact-code container — passedcorepack pnpm run check:docs— passedgit diff --check— passed6494ab5eb285cc2993d4679d6723e4b2486de99c— no actionable findings--local-rangeagainst6494ab5eb285cc2993d4679d6723e4b2486de99c— completed at exact head,keep_open, high confidenceReal Behavior Proof
ExactReviewQueueDurable Object, production row caps, and Worker restart.target_app; 50,000 rollup rows and 10,000 rate observations are seeded before cap eviction.provider=local-container, leasecbx_b188010777d1(swift-krill-16ae),node:24-bookworm,wrangler@4.107.0 --local. The container reconstructed an immutablegit archiveand asserted code tree84f9205a89d0fafdd20e9796affb7b67bd534fe2for code commit92d91e812f810c5bf9f7e0f470cb017533aee43cbefore execution.query_complete=true; overlapping six-hour view incomplete; restart preserved watermarks and causes; fallbacktarget_appscope preserved; privacy assertions passed; full Linuxpnpm run checkpassed. Coverage: 81.49% lines, 74.08% branches, 87.35% functions.docs/proof/csw-127-phase0-6/contains the contract, reproducible harness, sanitized receipt, artifact hashes, and limits.Artifact SHA-256 receipts are recorded in
container-receipt.json, including runtime receiptD890DFA935CE8A8DCE76A93651DFD3AA79030E266869C4E67DA054838DFA2FDBand redacted Wrangler log53A55DECCBA450985FFADBCC7D864D14C2C2ECF24C049877B458A6BCDB33149E.Two discarded Docker leases stopped before test execution:
cbx_42cd4a3fdb12rejected a CRLF-mounted wrapper, andcbx_35f8c4b178f6rejected ignored-file contamination through the worktree bind. The successful run used the immutable archive harness and the same expected Git tree.Review findings resolved
target_appownership. Commit92d91e812f810c5bf9f7e0f470cb017533aee43ccarries the active circuit scope through both batchcompleteandrelease; the complete container proof was rerun afterward.Phase 1 and unrelated work
target_appclosure-proof 403/read-fallback behavior remains a separate follow-up and is not folded intorepository_actionscircuit semantics.Risks, rollout, and rollback
The SQLite changes are additive and migrate legacy state conservatively. A rollback to current main retains the existing rollback shadow and ignores additive public fields; new cause rows and exact eviction metadata can remain dormant. The main residual risk is production-cohort behavior, so Phase 1 activation remains separately authorized even if the post-merge Phase 0.6 cohort passes.
Related