ci: check the setting paths shipped scripts hand to cli (#146)

* ci: check the setting paths shipped scripts hand to cli

`cli -s` cannot fail. yaml-cli stores whatever dotted path it is given,
creating intermediate mappings as it goes, and exits 0; majestic then silently
ignores a key it does not recognise. So a typo in a setting path applies
nothing and reports nothing, from the moment it is written to the end of the
device's life.

t40_lite_movols-mo-805p has been shipping six of them:

    cli -s .video0.bitrate: 4000
    cli -s .video0.rcMode: avbr

The path is `.video0.bitrate:`, not `.video0.bitrate`. Bitrate, rate-control
mode, profile, GOP size, GOP mode and OSD size have never applied on that
camera. The trailing colons are dropped here, including the one on the
commented-out `.onvif.enabled:`, which was a trap for whoever uncommented it.

The linter checks shape and nothing else. Whether a well-formed key is one a
given majestic build actually declares can only be answered by the running
binary -- it varies by vendor and by flavour -- while shape is decidable from
the tree, costs nothing, and is the whole of the class that shipped. A path
built at runtime is skipped rather than guessed at: uvc-gadget-setup reads
`cli -g ".$1"`, which is fine and unknowable here.

It carries a floor check for the same reason lint-workflow-shell.py does. A
matcher that quietly stops matching finds no bad paths, which looks exactly
like a clean tree -- so finding no cli invocation at all is itself a failure.

80 scripts scanned, 610 invocations, 6 bad paths, all in the one device.

* ci: recheck the merged result when the cli linter itself changes

lint.yml's push trigger names the checkers it guards one by one, and the new
one was not on the list -- so a master push touching only
.github/scripts/lint-cli-paths.py would have skipped the very job that exists
because #121 shipped a broken merged result nothing re-checked.

Same reasoning as the lint-workflow-shell.py entry beside it, and the same
cost: seconds, no runners.
This commit is contained in:
Dmitry Ilyin
2026-09-05 16:31:10 +03:00
committed by GitHub
parent 605fa9dd97
commit c2f5024972
3 changed files with 187 additions and 7 deletions
@@ -12,24 +12,24 @@ fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/t
#
cli -s .isp.blkCnt 4
cli -s .video0.codec h265
cli -s .video0.bitrate: 4000
cli -s .video0.rcMode: avbr
cli -s .video0.profile: high
cli -s .video0.gopSize: 5
cli -s .video0.gopMode: smart
cli -s .video0.bitrate 4000
cli -s .video0.rcMode avbr
cli -s .video0.profile high
cli -s .video0.gopSize 5
cli -s .video0.gopMode smart
cli -s .nightMode.irCutPin1 122
cli -s .nightMode.irCutPin2 123
cli -s .nightMode.backlightPin 119
cli -s .osd.enabled true
cli -s .osd.template "%d.%m.%Y %H:%M:%S"
cli -s .osd.size: 0.8
cli -s .osd.size 0.8
#cli -s .audio.enabled true
#cli -s .audio.codec aac
#cli -s .audio.srate 48000
#cli -s .audio.volume 95
#cli -s .audio.gain 25
#cli -s .audio.speakerPin 7
#cli -s .onvif.enabled: true
#cli -s .onvif.enabled true
#
# Set osmem and rmem
#