feat(preflight): add raw-socket capability probe - #1387
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
3eb050a to
8d89aae
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 17, 2026, 7:10 AM ET / 11:10 UTC. ClawSweeper reviewWhat this changesThe PR adds an opt-in Linux/WSL2 raw-socket preflight probe that reports direct, sudo-assisted, unavailable, or missing-interpreter capability without elevating the workload. Merge readinessKeep open for maintainer product-direction review: the exact-head terminal proof and focused coverage support the safety boundary, but this adds a supported preflight contract with a Priority: P3 Review scores
Verification
How this fits together
flowchart LR
A[Run configuration] --> B[Preflight tool selection]
B --> C{Linux or WSL2 target?}
C -->|raw socket requested| D[Bounded socket probe]
D --> E[Direct or sudo capability state]
E --> F[Remote workload]
C -->|unsupported or not requested| F
Decision needed
Why: The implementation is bounded and proof-positive, but deciding whether this privileged diagnostic belongs in the public preflight contract is product and security-boundary policy rather than a mechanical repair. 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: Land the opt-in probe only after a product owner accepts the documented privileged diagnostic boundary and treats its result strings as a supported preflight contract. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect report; the PR provides a high-confidence exact-head after-fix terminal run demonstrating the new capability result and cleanup behavior. Is this the best way to solve the issue? Unclear pending product approval: the implementation is a narrow extension of the existing preflight registry, but accepting a privileged diagnostic fallback is a maintainer policy choice. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 829679307534. 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)
|
8d89aae to
a7af8f3
Compare
Co-authored-by: Coy Geek <coygeek@users.noreply.github.com>
a7af8f3 to
3d44f9c
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer decision: accept the opt-in |
Summary
raw_socketpreflight capability for Linux and WSL2direct,sudo,unavailable, orprobe_missingstates usingpython3thenpythonVerification
go test -race ./internal/cli -run 'TestRawSocket|TestPreflight|TestPythonPreflight|TestRemoteCapabilityPreflight' -count=1 -timeout=10mgo vet ./internal/cligit diff --check origin/main...HEADnode scripts/build-docs-site.mjsA broad local CLI race run encountered unrelated host-sensitive controller/listener timing failures and timed out under concurrent test load; every reported failing test passed when rerun independently. Exact-head CI is the authoritative broad gate.
Exact-head live proof
Built from exact head
3d44f9c95428b16ab377c6ca92a2a771609d3d9b:The execution user could not open the raw socket directly; the identical bounded probe succeeded through non-interactive sudo. The ordinary workload remained unprivileged, the user command completed normally, and cleanup left no proof-owned container or claim. Separate Docker controls observed permission denial without
NET_RAW, direct success withNET_RAW, and sudo-assisted success from an unprivileged user.Maintainer decision: retain the Unreleased changelog entry. Repository policy requires changelog coverage for user-visible features; release preparation consumes that maintained section rather than replacing normal feature entries.
Closes #1258