Repository navigation
perf(ci): avoid duplicate receipt input validation - #198708
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 changes before merge. What this changesThis PR removes repeated input-path validation by reusing validated successful compiler lookups. Example: A valid receipt lists src/index.ts as both an input and a successful readFile lookup.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-authored PR open: the change is focused and preserves receipt validation, with no actionable correctness or security findings. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherExtension boundary CI consumes compiler receipts and checkout files, validates recorded inputs and resolution facts, and decides whether cached compilation results remain reusable. flowchart LR
A[Boundary CI] --> B[Compiler receipts]
B --> C[BoundaryInputSnapshot]
D[Checkout files] --> C
C --> E[Validated inputs and lookups]
E --> F[Reuse or compile]
Technical reviewBest possible solution: Keep the existing receipt parser as the sole validation owner and qualify this minimal removal of redundant work against the recorded acceptance rule. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows the same input paths validated through lookups and again through info.inputs; this read-only review ran no target code. Is this the best way to solve the issue? The patch is the smallest complete change: reuse already validated reads while preserving exact inventory equality, lookup uniqueness, physical containment, and resolution replay. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 569bf22dba45. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +4, Other -1. Total +3 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 14, 2026, 1:45 AM ET / 06:45 UTC. |
|
Merged via squash auto-merge.
|
What Problem This Solves
Warm extension boundary checks validate the same input paths twice while parsing compiler receipts.
User Impact
This is an internal CI optimization. Compiler diagnostics, cache invalidation and physical checkout boundaries remain unchanged.
Why This Change Was Made
Validate lookup paths once, require the input inventory to match the sorted successful read lookups exactly, and return that validated inventory. The receipt still rejects malformed, duplicate, noncanonical and escaping inputs.
Evidence
7e69bf4c26b3cd00789f55ee4f6185af8aa2dbf3: no actionable correctness or security findings.7e69bf4c26b3cd00789f55ee4f6185af8aa2dbf3and head275391d43f6a450a90f0a5850df3f62affeda941: no actionable correctness or security findings.run_586e22053bcf5a78e131a0f3bfb28115.Performance acceptance rule — recorded before qualification
Run the full 146-plugin CLI in compile mode on the same frozen source, dependency installation, hardware and prepared receipts. Use exact baseline/candidate source overlays so compiler-generator identity does not force recompilation between variants. Exclude one warmup per variant, then run five serial alternating baseline/candidate pairs.
Accept only with at least 5% lower median compile-phase time, no increase in median total wall time or total CPU, and no 20% regression in median or p95 wall time, compile time, total CPU or peak RSS. Report all samples, median and p95, filesystem operation counts, observed hardware/load and an unchanged receipt digest. Profile the accepted candidate. The complete candidate also needs a cold full boundary pass.
Command:
CI=true OPENCLAW_CI_EXTENSION_BOUNDARY_FULL=1 node scripts/check-extension-package-tsc-boundary.mts --mode=compile.Measured warm results
Frozen base:
7e69bf4c26b3cd00789f55ee4f6185af8aa2dbf3. Candidate:275391d43f6a450a90f0a5850df3f62affeda941.Boat direct Linux runner, observed 4 CPUs / affinity 4 / 8,130,928 KiB memory. Measured-pair load averages were about 1.0–1.3. Requested profile: standard. This is Boat evidence, not Blacksmith billing evidence.
The same complete 64,951-file source tree, installation and receipts were used for both variants. The exact source overlay was inherited by Node preparation children as well as the parent. Physical generator inputs stayed fixed during the paired run. A priming run and one warmup per variant were excluded. All ten measured runs compiled 0 and skipped all 146 plugins.
p95 is nearest-rank (the maximum for five samples). Peak-RSS p95 increased 1.5%, below the 20% rejection limit.
Separate instrumented runs counted the SDK-preparation Node process, not the whole process tree: existence checks 804,181 → 739,336; native realpath calls 659,537 → 594,692; file reads unchanged at 44,851; stat calls unchanged at 56,607. These counts are diagnostic and excluded from timing aggregates.
The final candidate CPU profile still shows filesystem path work as the main cost (self samples: native realpath 20.57s, path resolve 10.69s, existence checks 9.98s). No new cache or relaxed boundary check was introduced.
All 438 receipt JSON files remained byte-for-byte unchanged through the paired, count and profile runs; aggregate SHA-256
6e779aa09314357ca3cddf57623d54acc3c5a1540391b6c1afd44bedabda6bc4.Benchmark run:
run_6d9344274f499fee7faef9507f06fdc1; Boat leasecbx_9af785c7e75e. No public run URL was provided. This establishes a warm-path runtime gain on the measured machine; it does not estimate fleet-wide or dollar savings.