ECC/tests/ci
Affaan Mustafa e755c5f72b
fix: make plugin hooks run on Node 21+ and green the suite under modern Node (#2184)
ROOT CAUSE: hooks load plugin-hook-bootstrap.js via
`node -e "...; process.argv.splice(1,0,s); require(s)"`. On Node 21+,
require.main is `undefined` under --eval, so the `if (require.main === module)`
guard was false and main() never ran — every plugin hook silently no-op'd
(e.g. the MCP-health PreToolUse hook stopped blocking). CI (Node 18/20) hid
this; it only surfaces on Node 21+. Fix: also run main() when require.main is
undefined (the eval-bootstrap case), while staying dormant on real imports.

Also clears pre-existing main debt the full local suite enforces:
- catalog:sync — README/docs agent+skill counts drifted after recent merges
- tests/ci/supply-chain-watch-workflow: update checkout SHA to the merged v6.0.3 (#2183)
- markdownlint + check-unicode-safety --write across docs/skills

Suite: 2683/2683 green under Node v25; lint + unicode clean.

Co-authored-by: ECC Test <ecc@example.test>
2026-06-07 16:05:28 +08:00
..
agent-instruction-safety.test.js test: report instruction guardrails independently 2026-04-30 09:39:54 -04:00
agent-yaml-surface.test.js fix: remove canonical Anthropic skill duplicates 2026-04-30 00:21:13 -04:00
catalog.test.js feat: add command registry and coverage checks (#1906) 2026-05-14 22:02:36 -04:00
code-reviewer-false-positive-guard.test.js feat: salvage code-reviewer false-positive guardrails (#1817) 2026-05-12 15:01:46 -04:00
codex-skill-surface.test.js feat: add machine learning engineering workflow 2026-05-11 17:55:50 -04:00
command-registry.test.js feat: add command registry and coverage checks (#1906) 2026-05-14 22:02:36 -04:00
dynamic-workflow-team-surface.test.js feat: add dynamic workflow team orchestration surface 2026-06-04 21:45:13 +08:00
mle-workflow-coverage.test.js feat: add machine learning engineering workflow 2026-05-11 17:55:50 -04:00
no-personal-paths.test.js fix: harden CI validators 2026-05-11 03:08:43 -04:00
scan-supply-chain-iocs.test.js fix: ignore defensive ioc deny rules 2026-05-18 02:29:59 -04:00
secret-curl-flags.test.js fix(skills): keep curl credentials out of argv (#2175) 2026-06-07 13:25:45 +08:00
supply-chain-advisory-sources.test.js Cover advisory source renderer branches 2026-05-15 23:09:54 -04:00
supply-chain-watch-workflow.test.js fix: make plugin hooks run on Node 21+ and green the suite under modern Node (#2184) 2026-06-07 16:05:28 +08:00
validate-workflow-security.test.js security: scope release oidc publishing 2026-05-18 13:41:10 -04:00
validators.test.js test: guard broken-symlink tests so the suite passes on Windows (#2176) 2026-06-07 13:25:43 +08:00