Repository navigation
fix(heartbeat): reject ambiguous identifiers - #1379
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 6:07 AM ET / 10:07 UTC. ClawSweeper reviewWhat this changesThe PR makes Merge readinessThis PR remains necessary: current main still accepts the reported ambiguous form, while the branch rejects it before configuration or lease handling. Direct review found no actionable patch defect; the supplied built-CLI transcript is sufficient real-behavior proof. Priority: P2 Review scores
Verification
How this fits togetherThe heartbeat CLI command accepts one lease identifier, resolves its configuration and provider, then refreshes lease liveness. The changed validation boundary prevents malformed commands from reaching those downstream operations. flowchart LR
A[CLI arguments] --> B[Heartbeat command]
B --> C[Identifier validation]
C -->|one valid identifier| D[Configuration and provider resolution]
C -->|missing or ambiguous| E[Usage error]
D --> F[Coordinator or provider heartbeat]
F --> G[Updated lease state]
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. Technical reviewBest possible solution: Land this narrow validation and regression-test change once the normal required checks finish, preserving one unambiguous heartbeat lease identifier. Do we have a high-confidence way to reproduce the issue? Yes—source inspection of current main proves that one positional argument can remain after an explicit Is this the best way to solve the issue? Yes—the repair follows existing command validation conventions, rejects ambiguity before configuration loading, and keeps both documented single-identifier forms. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 055dde3111b1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
5afcb16 to
0028b5c
Compare
Co-authored-by: Coy Geek <[email protected]>
0028b5c to
0c5efc2
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…nal driver (#1186) The first production terminal recording (openclaw/crabbox#1379, run 32017763576) failed because ffmpeg launched against the xvfb display before it accepted connections and died silently inside its detached tmux session. The driver now polls xdpyinfo for display readiness, waits for the recorder output to exist and grow, waits for the recorder to exit after finalize, and attaches capture-pane diagnostics from all three sessions to any failure. Also registers the batch-publish dispatch lane's setup-state site in the state-writer audits, which were red on main since #1185.
Summary
heartbeat --id <lease> <extra>and other ambiguous identifier forms before loading configuration or resolving a provider--id-only formsCloses #1368
Verification
go vet ./..., docs validation,gofmt, andgit diff --checkBuilt-CLI behavior proof
Source-blind proof was run from exact head
0c5efc2123221729fbf403ad3023a3f99b4e3f4e. The temporary binary was built withgo build -trimpath -o "$PROOF_DIR/crabbox" ./cmd/crabboxand had SHA-256509b3d096a0da3072d2dd5062ea79aa51b4a537afcb7ce6f2ce991419490d22f.Each invocation used a new private temporary HOME/XDG tree plus deliberately invalid YAML, with the inherited environment removed:
Inspected, path-redacted transcript:
All six malformed identifier forms returned the same usage error without exposing the invalid-config diagnostic. The valid single-ID control crossed the syntax boundary and failed on that deliberately invalid configuration, proving malformed input is rejected first.
Maintainer disposition
The P3 suggestion to remove the Unreleased changelog entry is intentionally rejected. Repository standing policy requires changelog coverage for user-visible fixes, so the existing credited entry remains.