Repository navigation
fix: stabilize resource-profile measurement tests - #94
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 30, 2026, 1:03 AM ET / 05:03 UTC. ClawSweeper reviewWhat this changesThe resource snapshot JSON transport test uses an exactly representable elapsed-time baseline so its 10 ms delta assertion is deterministic. Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep this PR open. Current main still contains the flaky exact-equality assertion, and the one-line fixture change addresses its floating-point cause while retaining a separate live timing test. Priority: P2 Review scores
Verification
How this fits togetherPlugin Inspector captures timing and resource counters inside a measured process, then compares snapshots for runtime reports. This test sends snapshots through JSON and checks the resulting delta. flowchart LR
A[Process resources] --> B[Snapshot capture]
B --> C[Synthetic elapsed baseline]
C --> D[JSON transport]
D --> E[Resource delta]
E --> F[Exact assertion]
B --> G[Live timing test]
Before mergeNone. Agent review detailsSecurityNone. Review metricsNone. Technical reviewBest possible solution: Keep the JSON transport test on a deterministic synthetic clock while retaining the separate measured-child test for live elapsed time. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main adds 10 to a live floating-point timestamp and then requires subtraction to equal exactly 10. I did not re-run the test in this read-only review. Is this the best way to solve the issue? Yes. An exact synthetic baseline fixes the assertion's precision dependency without changing production timing or removing live timing coverage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a0c66caff88f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: stabilize resource-profile measurement tests This is item 1/1 in the current shard. Shard 0/1. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
What Problem This Solves
Fixes two intermittent failures in the resource-profile tests: exact floating-point subtraction from a live clock, and an allocation assertion that treats net process memory growth as gross allocation size.
User Impact
CI tests respect the resource metrics they measure. Production resource timing, memory accounting, and report precision are unchanged.
Why This Change Was Made
The JSON transport test already synthesizes resource changes. Set its elapsed-time baseline to the exactly representable fractional value
100.25, preserving the exact 10 ms assertion without depending on process startup timing.The live test can collect pre-existing buffers during its CPU workload. Account for those observed baseline bytes in the net-growth lower bound, while still requiring positive growth and at least the retained 8 MiB allocation in the loaded snapshot. Keep the full 8 MiB disposal bound and include measured snapshots in assertion failures.
Evidence
10.000000000000014versus10).npm run checkpassed all 571 tests and package-content checks.