feat: add opt-in HTTP context for Node and Rust - #200
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. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 8:23 AM ET / 12:23 UTC. ClawSweeper reviewWhat this changesAdds an optional flag that links literal Node HTTP calls to Rust handlers and includes counterpart files in review prompts, with documentation, tests, and packaging support. Merge readiness✅ Ready for maintainer review Keep open: this is a distinct, bounded improvement absent from current main and v0.7.3. The earlier duplicate-handler blocker is resolved, and no remaining actionable defect was found. Priority: P2 Review scores
Verification
How this fits togetherClawpatch maps repository files into reviewable features and sends bounded source context to a coding provider. The optional HTTP scanner connects explicitly paired frontend and backend roots before constructing a review prompt. flowchart LR
A[Explicit frontend and backend roots] --> B[Filtered source scan]
B --> C[Literal HTTP candidates]
C --> D[Reject ambiguous routes and mounts]
D --> E[Map relation output]
D --> F[Bounded temporary review context]
F --> G[Coding provider review]
Before mergeNone. 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: Retain explicit root pairing and temporary, bounded candidate context without introducing persistent graph state or inferred deployment topology. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug reproduction: this adds a capability; the supplied built-CLI observations exercise its enabled and disabled behavior. Is this the best way to solve the issue? Yes: explicit pairing and ephemeral context provide a narrower solution than a persistent global dependency graph, while documenting unsupported syntax and routing assumptions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9f71d92f0069. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Prepared head: All 941 tests passed (2 platform skips), along with typecheck, lint, formatting, build, and packaged CLI smoke. Exact-head Linux/Windows CI succeeded: https://github.com/openclaw/clawpatch/actions/runs/34120601463. Final Codex branch autoreview against origin/main is scoped-clean at P2. The real built CLI produced one relation across six synthetic Node/Rust features. Backend review results were 0→1→0 when the explicit HTTP flag was enabled and then omitted, using the documented fixture provider; stored context stayed unchanged. A 159,001-byte input with 4,000 duplicate handlers returned only the three unique routes in 152 ms. The duplicate bucket now uses an ambiguity marker, so it does not repeatedly copy lists. The built-code and regression checks cover generic mounts, regex/control-flow syntax, comments, private and Unicode-prefixed identifiers, and deep templates. This addresses the earlier duplicate-handler finding. The complete final proof and bounded syntax contract are in the PR body and docs. #201 must merge last to supply the consolidated 0.8.0 notes. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Add opt-in HTTP candidate context for Node/TypeScript callers and Rust handlers.
map --link-http frontend:backendreports literal method/path links between explicitly paired roots;reviewwith the same flag adds counterpart files only to that review's prompt. Default output, stored feature schemas, and persisted context remain unchanged.The pass validates canonical roots, rejects ambiguous handlers and recognized unresolved mounts, and bounds source reads, output, and per-feature review context. JavaScript calls are matched from
js-tokenstokens, keeping regex/template contents, private methods, and longer identifier names out of the candidate set. The small dependency has no transitive dependencies; package smoke now resolves dependency metadata through public entry points so packages with restricted exports are supported.JSX/TSX, dynamic or escaped paths, additional fetch options, other handler syntaxes, and inferred deployment topology are outside this first version. The feature-mapping documentation defines the exact syntax and limits. Thanks @Tanmay-008 for the proposal and narrowed scope. Closes #169.
Merge #201 after this PR and #199. It contains all release notes and contributor credit for the group.
Validation on 8835259
/health,/users/@me, and/Über. Generic mounts were rejected. Built-code checks also rejected private/Unicode-prefixed identifiers and recognized a real call after a regex control-flow body and formatting comments.The fixture provider measures real CLI/scanner/prompt behavior, not live service topology. The result remains candidate context that reviewers must verify against runtime routing.