Repository navigation
fix: resolve VariaQ CLI validation and security documentation findings - #11
Merged
Merged
Conversation
- Convert invalid --compare values on report-campaign, analyze-runs, and analyze-campaign from an uncaught ZodError into structured PluginError CLI errors with valid-value hints (PR #10 review finding 1). - Correct SECURITY.md to the current audit state: drop the remediated source-map-js 1.2.1 row, document five development-only packages (three high, two moderate) with complete per-package advisory lists (PR #10 review finding 2). - Add regression coverage for operation-level schema errors (nine --group-by values vs the max-8 limit) and prove --compare is forwarded to the VariaQ subprocess via a fake-harness artifact echo (independent Codex P3 notes).
Owner
Author
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves the two outstanding P2 findings from the PR #10 Codex review (submitted after merge), plus both P3 follow-up notes from the independent re-review of this patch. Follow-up to #10.
Finding 1 — invalid
--comparevalues leaked rawZodErrorexceptions (P2, server.ts:608)opReportCampaignvalidatedoptions.comparewith a barecomparisonTypeSchema.parse(). The CLI wrapper only convertsPluginErrorinstances into command results and rethrows everything else, so a user typo escaped as an unhandled exception.parseComparisonOption()CLI helper:safeParseagainstcomparisonTypeSchema; invalid values raise a structuredPluginErrorwith aValid comparisons: …hint — the same convention the CLI already uses for problem families.report-campaign,analyze-runs,analyze-campaign), replacing unsafeascasts.opAnalyzeRuns/opAnalyzeCampaignconverted from bare.parse()tosafeParse→PluginErrorwith a short first-issue message (minimizeZodIssue).requireComparisonSupportgate, schema-v1 validation, and VariaQ 0.6.x / 0.8.x / 0.8.0rc1 compatibility are unchanged. Agent tools were already schema-validated by the SDK beforeexecute; only CLI paths needed the fix.Finding 2 — stale
source-map-jsadvisory row in SECURITY.md (P2, SECURITY.md:54)The audit table reported
source-map-js 1.2.1and a count of six development packages (four high, two moderate), contradicting the shipped override to 1.2.2.source-map-jsrow, noting explicitly that the override remediated it (nothing suppressed).bb-app, outside npm's override reach and unreachable from the shipped plugin runtime; the production audit remains clean.Codex P3 follow-ups (independent re-review)
--group-byvalues againstanalyzeQuerySchema'smax(8)limit through the CLI, asserting structuredPluginErroroutput (exit 1, first-issue message, hint, noZodErrorleak) foropAnalyzeRunsandopAnalyzeCampaign.--compareand echoes it into the report envelope and the generated markdown artifact (comparison: <value>), so the valid-comparison regression test proves the selector is actually forwarded to the VariaQ subprocess rather than merely accepted.Verification
All commands executed locally on this branch (Node v26.8.1, npm 11.19.0):
npm run typecheckvitest run tests/runner.test.ts tests/fake.test.tsnpm testVARIAQ_TEST_PROJECT=… VARIAQ_TEST_VERSION=0.8.0 vitest run tests/server.test.tsv0.6.0worktree with a CI-identical-e '.[quantum]'venvnpm run buildnpm run sdk:check0.6.37equals host0.6.37npm audit --omit=devnpm auditnode_modules/npmbundled tooling, documented in SECURITY.mdnpm ci --dry-runnpm pack --dry-runDocumented limitations
0.8.0rc1candidate pin on Node 22, which this environment does not replicate.node_modules/npm's bundled dependencies are retained and documented — they require an upstream npm/bb-app refresh; npm overrides cannot reach them.Relation to PR #10
server.ts:608— convert invalid comparison values into CLI errors) and 4243678252 (SECURITY.md:54— remove the remediated source-map advisory). As agreed, the original review threads remain unresolved pending independent verification of this patch.No merge, release tag, version bump, or marketplace metadata changes are included.