[architect] validate-button-contrast.mjs diverges from the shared validator error-reporting contract
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1592 by @hivecommons-hive — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- developer-experience, testing-qa
Research direction
Start with scripts/validate-button-contrast.mjs, scripts/lib/validate-utils.mjs, and several existing scripts/validate-*.mjs scripts already using reportAndExit(). Run tests/validate-button-contrast.test.mjs before making changes, then update the contrast validator to follow the shared reporting contract. Done means it uses the structured findings and warning behavior without changing the existing success or failure text asserted by the tests.
Written by the indexing model from the issue text.
Description
Architecture Finding
Type: interface-violation
Affected area: scripts/validate-button-contrast.mjs
12 of the 13 scripts/validate-*.mjs scripts wired into npm run validate:all collect findings into an errors array of { path, severity, message } records and hand it to the shared reportAndExit() helper in scripts/lib/validate-utils.mjs, which prints a uniform N error(s) in <label>: report (plus any warnings) to stderr and exits 1 on failure. scripts/validate-button-contrast.mjs is the lone holdout: it throws a raw Error and relies on Node's default uncaught-exception stack-trace dump, with no structured path/severity/message and no support for the warning half of the shared contract.
Impact
A maintainer or CI consumer who parses/greps the uniform reportAndExit report format for every other validator failure gets a different, unstructured shape from this one — the inconsistency has to be special-cased by anything that wraps validate:all output, and the next person adding a check to this script has no established pattern to extend (warnings, multiple findings, consistent exit-code contract) the way every other validator already does.
Recommendation
Refactor validate-button-contrast.mjs to build an errors array and call reportAndExit(errors, 'button contrast'), matching the pattern every other validator in scripts/validate-*.mjs already follows. Preserve the existing success message and the existing failure message text (tests in tests/validate-button-contrast.test.mjs assert on both).
Filed by architect agent (ACMM L5 — hold-gated mode)
🐝 Hive Agent: architect | Instance: hosted-available-lke648397-260827-5n31 | SHA: 9e0a746
— hive: agent=architect backend=copilot model=claude-opus-4-6 copilot=1.0.88
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 3
- Avg merge
- 7h 20m
- Merged PRs (30d)
- 641
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
agent/ci-maintainer ci stage/010-actionable
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[ci-maintainer] Scheduled full-tree mutation run fails weekly on main: score 82.09% under break threshold 83Possibly taken @hivecommons-hive claimed this today. Openagent/ci-maintainer ci hive/claimed-by-ci-maintainer stage/040-covered-by-pr
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
cncf/endusers#1743 · 1 comment ·
Maintainers usually reply within 1 day
-
[sec-check] MDX gate misses the admonition preprocessor rewrite, publishing javascript: links from inert-looking textPossibly taken @hivecommons-hive claimed this today. Openagent/sec-check hive/claimed-by-sec-check security stage/040-covered-by-pr
Difficulty 4/5 3-5 days Newbie friendliness 25/100
cncf/endusers#1740 · 1 comment ·
Maintainers usually reply within 1 day
-
[architect] Duplicated sourceUrl/id-dedup validation harness in validate-case-studies.mjs and validate-radar-reports.mjsPossibly taken @hivecommons-hive claimed this today. Openagent/architect architecture hive/claimed-by-architect stage/040-covered-by-pr tech-debt
Difficulty 3/5 1-2 days Newbie friendliness 25/100
cncf/endusers#1738 · 1 comment ·
Maintainers usually reply within 1 day
-
agent/quality hive/claimed-by-quality stage/010-actionable testing
Difficulty 4/5 3-5 days Newbie friendliness 42/100
cncf/endusers#1736 · 6 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Place search spins forever when nominatim failsPossibly taken @jgt87 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anvaka/city-roads#213 ·
-
mobile UX
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
jellyfin/jellyfin-web#8685 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
SchemaStore/schemastore#6535 ·
Maintainers usually reply within 1 day
-
enhancement good first issue helia storage tier-1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QMeshPy/distributed-quantum#53 ·
Maintainers usually reply within 1 day