Repository navigation
fix(package-verifier): reject overview responses without a procedure count - #2936
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
afd6497 to
83769fd
Compare
…count The analyze and inspect checks compared procedure_count with `< 1`, and an absent or null normalized_result makes that comparison false, so a binary_overview response without its required result passed the platform smoke check. Require an integer procedure count before the positive-count comparison.
83769fd to
23f2500
Compare
|
Welcome to REA, @CodeAlex52. Thanks for catching the package verifier's false pass when an overview has no procedure count, and for adding the malformed-response cases. |
Summary
Fixes #2518.
The packaged platform smoke check now rejects an
analyzeorinspectresponse whosebinary_overviewresult is missing or null, instead of reporting a false success.Problem and expected behavior
scripts/verify-package-platform.mjs:17-18,27-28comparednormalized_result?.procedure_count < 1. An absent or nullnormalized_resultmakes that comparisonfalsein JavaScript, so a malformed overview passed the check.Expected (per the issue's restoration check): a response with the expected operation and a positive procedure count passes; a response without the result, with
normalized_result: null, with a zero count, or with a wrong operation is rejected.Change and scope
scripts/verify-package-platform.mjs: both overview checks now requireNumber.isInteger(normalized_result?.procedure_count)before the existing positive-count comparison. The positive-count, wrong-operation and other lane assertions are unchanged.Verification
I ran a fixture-driven harness against the modified script (the issue's fixture CLI, with the assertion executed from the exported production verifier):
As a control, the same harness against the unmodified script fails at
analyze/missingwithAssertionError: Missing expected rejection, which is the reported false acceptance. The harness stubsscripts/lib/verify-package-core.mjs'srun/runWithStatus/jsonhelpers with equivalent implementations (the original module additionally validates schemas with Ajv); the code under test is the unmodified verifier. I did not run the packaged platform lane or the repository's static checks here.