Repository navigation
feat(check): --viewport + --warning-floor-px audit dials (default-inert) - #1
Open
emmanuelbruno wants to merge 1 commit into
Open
emmanuelbruno wants to merge 1 commit into
emmanuelbruno wants to merge 1 commit into
Conversation
…-warning-floor-px <N> (default 50); defaults reproduce v0.1.5 classification byte-identically (port/duration-normalised selftest diff empty, sha256 b770453d…); invalid values exit 2; check --help lists both with code-sourced defaults; _quarto-utils PR #44 workflow passthrough is the follow-up
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
Two additive, optional
checkCLI dials so the fleet can tune the audit without code changes:--viewport <WxH>— browser page viewport (default1280x800, the previously hardcoded value atsrc/runner.mjs, now exported asDEFAULT_VIEWPORT).--warning-floor-px <N>—overflow.slide-viewportseverity floor (default50, theSLIDE_VIEWPORT_WARNING_FLOOR_PXconstant insrc/checks/overflow.mjs— the fleet-docs 50 px figure verified).Fleet knob lineage:
_quarto-utilsPR #44's input table reservesviewport/warning-floor-pxpassthrough for AFTER the v0.1.6 tag. No consumer impact from this PR: the workflow wrapper does not pass the new flags, and the fleet clones this repo by tag (visual-check.yml→git clone --branch "$TOOL_REF"), so nothing changes until this lands, av0.1.6tag is cut, and the follow-up workflow PR ships.package.jsonis intentionally not bumped (release flow is tag-driven; no code or CI reads the version field).Default-inert proof
node src/cli.mjs selftest --out …run on cleanmain@38c0bb9(baseline) and on this branch with no new flags, both 27 PASS / 0 FAIL. Diffingviolations.jsonl/scrollers.jsonl/summary.jsonafter normalising only the two volatile fields (random localhost server port,durationSec): empty diff — SHA-256 of the concatenated normalised artifacts identical base vs head:Validation (macOS host, Playwright chromium-1248 available — browser tier achieved)
check --helplists both flags with defaults sourced from the code constants (DEFAULT_VIEWPORT,SLIDE_VIEWPORT_WARNING_FLOOR_PX) — exit 0.--viewport abc,--viewport(missing value),--viewport 800x600x1,--warning-floor-px -5,--warning-floor-px(missing value).check --site fixtures --warning-floor-px 10→ the planted 20 pxslide-overflow-minorrow flipsseverity:"warning"(default) →"error"(floor 10); the 500 px row stayserrorin both.check --site fixtures --viewport 640x480→ evidence screenshots render at 640x480 (vs 1280x800 default, measured viasips), classification diff (port-normalised) empty.node -eimport of the exportedparseViewport/parseWarningFloorPx(direct-run guard added tocli.mjsso it is importable): all pass..github/workflows/selftest.ymlrunsnode selftest.mjsunchanged on the CI runner as a second line of defence.Scope note
Exactly 2 flags; no change to check modes, classification logic, registry, fixtures, selftest, or
package.json. One known cosmetic gap:src/registry.mjsfixHintprose still hardcodes ">=50px" (static hint text, not classification input — left untouched deliberately).🤖 Generated with [opencode]