Repository navigation
CI: clear npm audit advisories; adapt e2e seed and PTZ search to ZoneMinder dropping Controls.Type - #41
Merged
Conversation
SteveGilvarry
force-pushed
the
ci-audit-and-seed-fix
branch
from
October 29, 2026 20:37
a277001 to
baa6d11
Compare
npm audit --audit-level=high now fails every branch on newly published advisories in vite (<=7.3.6), seroval (<=1.6.2) and source-map-js (1.0.0-1.2.1). `npm audit fix` moves the lockfile to vite 7.3.7, seroval 1.6.12 and source-map-js 1.2.2; package.json is unchanged. The seeded e2e job loads ZoneMinder master's schema, which dropped Controls.Type (ZoneMinder 104327349), so the seed's positional `INSERT INTO Controls VALUES` had one value too many and failed with ERROR 1136. Name the columns instead and drop Type, so a column added or removed elsewhere in Controls no longer breaks the load. Stock rows now live in db/controls.sql; the comment points there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ZoneMinder 1.39.39 dropped Controls.Type (ZoneMinder 104327349), so zm-api now returns `type: null` for every control. The PTZ controls page searched with `c.type.toLowerCase()`, which throws as soon as anything is typed in the search box; client.ts reports a TypeError as "Cannot reach the server.", which is what the seeded e2e saw. Type the field as nullable and search `c.type ?? ''`. The e2e check that the seeded row says "Ffmpeg" now checks its protocol, PelcoD, instead. The e2e job also still checked out SteveGilvarry/zm-api, which stopped moving when the project moved to ZoneMinder/zm-api; build that instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SteveGilvarry
force-pushed
the
ci-audit-and-seed-fix
branch
from
October 29, 2026 21:31
baa6d11 to
e7b5713
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Two checks are failing on every branch for reasons unrelated to the branch itself (for example on #39):
typecheck · unit tests · build: the tests and build pass, then
npm audit --omit=dev --audit-level=highfails on newly published advisories:vite≤ 7.3.6 (launch-editor and dev-server advisories)seroval≤ 1.6.2source-map-js1.0.0–1.2.1npm audit fixchanges only the lockfile, moving to vite 7.3.7, seroval 1.6.12 and source-map-js 1.2.2.e2e (seeded): the seed load fails with
ERROR 1136 Column count doesn't match value countonINSERT INTO Controls. The job builds its database from ZoneMinder master'szm_create.sql.in, and ZoneMinder/zoneminder@104327349 droppedControls.Type, so the positional INSERT has one value too many. The INSERT now names its columns and dropsType, so columns ZoneMinder adds or removes elsewhere inControlscan't break it again. Every other value is unchanged.PTZ controls page: with the seed fixed, the run got through to the tests: 258 of 260 passed. The 2 that failed were the PTZ control-profile search in both skins.
type: nullfor every control.c.type.toLowerCase(), so it threw aTypeErroras soon as anything was typed.client.tsreports anyTypeErroras "Cannot reach the server.", which is what the page showed.Control.typeis now nullable and the search usesc.type ?? ''. A new unit test covers null types and fails without the fix.PelcoD) now, instead ofFfmpeg.CI pointed at the old zm-api fork: the e2e job still checked out
SteveGilvarry/zm-api, which stopped changing when the project moved. It now buildsZoneMinder/zm-api.Testing
sourcefiles inlined) into a throwaway MariaDB database.ERROR 1136 … at line 100.npm audit --omit=dev --audit-level=highreports 0 vulnerabilities.masterand the old fork. Both tests pass. The rest of the e2e suite runs in CI.🤖 Generated with Claude Code