Skip to content

Fix vacuous-pass bugs in verify.ts#14705

Merged
cderv merged 1 commit into
mainfrom
test/verify-vacuous-pass
Jul 17, 2026
Merged

Fix vacuous-pass bugs in verify.ts#14705
cderv merged 1 commit into
mainfrom
test/verify-vacuous-pass

Conversation

@cderv

@cderv cderv commented Jul 17, 2026

Copy link
Copy Markdown
Member

Three shared verifiers in tests/verify.ts pass vacuously — a broken assertion never fails the test:

  • ensureHtmlElementContents skips its content assertions when the selector matches no element, instead of failing.
  • ensurePptxMaxSlides passed true in the rels positional slot, silently disabling the max-slides check entirely.
  • verifyYamlFile skips its predicate when the yaml file is missing or empty.

The pptx unzip helper also moved the file instead of copying it, so later verifiers in the same test lost access to it.

These helpers are used across the smoke suite, so the fix lands on its own rather than buried in the larger change that surfaced it.

@posit-snyk-bot

posit-snyk-bot commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Verifier audit findings, each verified against the source:

- ensurePptxMaxSlides passed 'true' into the rels slot instead of
  isSlideMax, so the slide{N+1}-must-not-exist assertion never ran -
  the verifier could only fail when the deck had FEWER slides than the
  max, the inverse of its purpose. Two live regression tests (9681,
  11896: no extra blank slides) were neutered by this.
- ensureHtmlElementContents skipped selectors that matched nothing -
  all content assertions silently vacuous when the selector is absent
  (e.g. jupyter display-error tests pass if error output disappears
  entirely). Now asserts the selector matched.
- verifyYamlFile resolved successfully when the yaml file was missing
  or empty; now fails loudly before running the predicate.
- ensurePptxRegexMatches MOVED the pptx into its temp dir (destroying
  it for any later verifier in the same test); now copies like
  withPptxContent does.

Like the previous commit, these assertions were dead until now and may
surface genuine regressions on their first live CI run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cderv
cderv force-pushed the test/verify-vacuous-pass branch from b9b54a6 to f3ea9c9 Compare July 17, 2026 18:44
@cderv
cderv merged commit 32bcc03 into main Jul 17, 2026
51 checks passed
@cderv
cderv deleted the test/verify-vacuous-pass branch July 17, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants