fix: require and retain post-action sampling evidence - #723
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
PR SummaryMedium Risk Overview For positive New manifests add optional Reviewed by Cursor Bugbot for commit 6057e54. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Codex review: blocked before merge. Reviewed September 12, 2026, 9:03 PM ET / September 13, 2026, 01:03 UTC (Revision 2). ClawSweeper reviewWhat this changesRequire a valid post-action sample for positive post-roll and retain precise sample timing in backward-compatible capture manifests. Merge readiness⛔ Blocked before merge - 1 item remains The fix remains necessary: current main and v4.3.4 still accept elapsed post-roll without proving a post-action sample. No actionable patch defect was found, and the supplied native proof remains relevant to the unchanged implementation. Priority: P2 Review scores
Verification
How this fits togetherPeekaboo’s action capture runs a child command while sampling the desktop, then validates and publishes capture artifacts. The sampling loop supplies timing evidence used by the CLI to determine success and write the action manifest. flowchart TD
A[Capture options] --> B[Desktop sampling loop]
C[Child command completion] --> D[Post-roll stop decision]
B --> D
D --> E[Sample and artifact validation]
E --> F[Result and action manifest]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the documented stronger sampling guarantee, bounded capture limits, explicit zero-post-roll behavior, and readable legacy manifests without granting them new proof. Do we have a high-confidence way to reproduce the issue? Yes: current main’s elapsed-only validation and the delayed-frame regression establish the failure path; this read-only review did not execute it. Is this the best way to solve the issue? Yes: tracking valid sample starts in the existing sampler directly repairs the evidence gap, and the optional manifest field preserves legacy decoding without overstating old evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 01b8b3118043. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: require and retain post-action sampling evidence This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
A slow earlier frame could keep the sampling loop alive past post-roll while no valid sample began after the child command finished.
capture actionthen reported success from elapsed loop time alone.For positive post-roll, defer stopping until a valid post-action sample arrives, subject to the existing duration, frame, and size caps. If a cap prevents that sample, report incomplete coverage. Zero post-roll and immediate cancellation retain their existing stop behavior. Child execution and post-roll completion now have scoped helpers.
New
action.jsonmanifests retain canonical decimal-string nanosecond offsets for child completion and the last valid sample start, validate them against the millisecond timeline, and reject claimed valid post-roll with an earlier sample. Existing version-1 manifests remain readable as legacy elapsed-time evidence and do not gain a post-action sample proof; consumers requiring it must require the new field and verify the retained hash. No application or schema version bump.Validation:
/usr/bin/truechild and a delayed frame source failed before the fix. It now passes alongside capped-failure and explicit zero-post-roll cases.swift test --package-path Apps/CLI --filter 'CaptureActionCommandEndToEndTests|CaptureActionSampleBoundaryTests|CaptureActionTimingTests': 22 tests passed, including exact decimal encoding, one-nanosecond ordering, malformed offsets, and legacy decoding.swift test --package-path Core/PeekabooAutomationKit --filter WatchCaptureCadenceSchedulingTests: 9 tests passed, including deferred/immediate stop boundaries and existing cadence/deadline contracts.scripts/build-swift-debug.sh, using the matching Developer ID. The signed, source-stamped CLI ran a real local classic screen capture with a real child:6057e54b05b923e53d261e4eab9d2b0f22250064, action completion offset295337959ns, and last sample start2309033209ns. The latter is after the action. Desktop images stayed local and were removed after structural verification.