Repository navigation
fix(bay): measure review journeys to final receipt - #1238
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
755e31f to
7d0f561
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 24, 2026, 10:41 PM ET / August 25, 2026, 02:41 UTC. ClawSweeper reviewWhat this changesThe PR replaces Bay’s routing-terminal timing with trigger-to-verified-final-receipt journeys, adds a five-minute median history chart, and starts a fresh v2 durable aggregate. Merge readinessKeep open. The branch supplies a coherent, tested v2 Bay timing design and current-head isolated runtime proof; the remaining merge question is whether maintainers want verified final receipts, with an intentional one-hour warming period, to be the permanent public timing definition. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherBay receives exact-review lifecycle events from the queue and Durable Object, projects a redacted public status snapshot, and renders it in the dashboard. This PR changes the completion boundary used by that projection and the timing information shown to Bay users. flowchart LR
A[Review trigger] --> B[Durable lifecycle record]
B --> C[Final GitHub receipt]
C --> D[Journey timing aggregate]
D --> E[Public status snapshot]
E --> F[Bay dashboard]
C --> G[Terminal journey card]
Decision needed
Why: The patch is mechanically coherent, but selecting the public operational metric and rollout semantics is a product and observability-policy choice rather than a correctness inference. Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Adopt the v2 metric only with explicit maintainer agreement that final-review receipt latency is Bay’s canonical timing definition, while preserving the existing public source enum and the fail-closed warming behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a proposed implementation rather than an issue report; its controlled Worker, Durable Object, status-route, and Chromium scenario is documented as passing on the current head. Is this the best way to solve the issue? Yes, conditionally: final receipt correlation is the narrowest source-backed way to avoid presenting routing-terminal time as completed-review time, but maintainers must choose that public metric definition. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ed20a56037dc. LabelsLabel changes:
Label 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 (3 earlier review cycles)
|
7d0f561 to
390863f
Compare
390863f to
ff2afbe
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Fixes #1237
Summary
Make OpenClaw Bay's review timing an end-to-end measure: the verified GitHub
triggered_atrequest boundary through the correlated, explicit final reviewreceipt. Add a compact five-minute median/mean chart to the last-hour Bay
header.
Contract
time as a duration boundary.
triggered_atto final-receiptpair, capped at 24 hours.
stale/uncorrelated receipts, private data, and incomplete snapshots fail
closed.
materialize immediately; reconciliation retries it.
bay.timings.sourceenumdurable_exact_review_lifecycles; exposecompletion_source=verified_final_review_receiptsadditively.intentionally warms for one hour.
Implementation
being verified rather than inventing lane ages.
cap.
provenance assertion.
Validation
The range was rebased onto
origin/mainated20a56037;range-diffshowsthe product commit unchanged across that documentation-only base advance.
Real Behavior Proof
Claim: A real Worker and Durable Object publish a Bay duration only when a
public review has a correlated final receipt; the aggregate remains fail-closed
while its one-hour coverage is incomplete, while a verified terminal card and
tide progress remain visible.
Scenario: On head
ff2afbe55d6c7e959e521c2b4d14e42f3dd3004c, the maintainedauthoritative lifecycle fixture starts Wrangler locally, signs lifecycle
requests, exercises durable public review and re-review completions, obtains
the explicit final command receipt, and drives the public status route and a
real Chromium Bay render. It also materializes one private-scope completion and
proves it is excluded from the public aggregate.
Command/environment:
Observed result:
proof-summary.jsonreports 143 assertions passed,metrics_state=warming, 21 public timing samples, one completed 20-review tide,one retained terminal card, and
last_tide_at. The status contract retainedsource=durable_exact_review_lifecyclesand emitted additivecompletion_source=verified_final_review_receipts. The UI withheld thepartial last-hour average during warming but rendered the verified terminal
journey duration. The private-scope fixture did not enter the public aggregate
or terminal buffer. Local artifacts are ignored by Git and contain only the
synthetic fixture state and screenshot.
Crabbox proof: the same head and maintained fixture also passed on the resolved
AWS Crabbox provider: run
run_a9abe65f5ab9, leasecbx_cb0367778877, Linuxc7a.8xlarge, promoted imageami-0461d919be7deb53c. The provider recordedexit code 0 and the 143-assertion result above. It downloaded the remote
proof-summary.jsonand renderedbay-lifecycle-metrics.pnginto the localignored proof artifact directory. The first AWS attempt (
run_dc7239526d42)failed before execution because the Windows-synced shell launcher had CRLF;
the successful retry used an ephemeral LF-normalized copy only, with no source
change.
Limits: Docker Desktop's Linux daemon is unavailable on this host. The AWS
proof provides the policy-required isolated-provider run. The short controlled
scenario intentionally does not advance a full hour, so it proves warming and
terminal-card behavior rather than a coverage-rollover average. It makes no
GitHub or production mutation.
Review
origin/mainafter rebase:clean; no actionable findings.
line-level correctness or security defect. Its only requested rank-up item
was current-head real behavior proof; that proof is recorded above and was
rerun after the rebase.
Risk and rollout
The v2 aggregate starts empty and reports
warmingfor its first hour. Thatavoids treating legacy router-terminal data as final-review timing. No
protected/internal timestamps are added to the public projection. No CHANGELOG
change is included.