Repository navigation
Conversation
HugoXK-bot
left a comment
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES at 8ca3856
Blocker: ci.yml:141-142 puts npm run arch:check inside the required lint job. scripts/lib/gate-compare.mjs (compareGate, base blob 7ca41bba) compares every key of every required job, steps included, so the publisher's ci-ok (137504400176) refuses with "required job lint differs from the base tree"; by its own DOOR no PASS and no ci-workflow-change label can turn that green, so this red is permanent at this head and independent of review-gate.
Reproduced: compareGate from base a09997f6 returns ok:false with exactly that refusal for this head's ci.yml, and ok:true once the step moves to its own job.
Fix: give the gate its own job under jobs: (a new job passes the comparator) or drop the hunk — test/archBoundaries.test.ts:90-93 already runs scripts/arch-boundaries.mjs inside required test (24), which passed here. Issue #1228 asks for "a CI job in ci.yml" plus "green ci-ok"; a step in lint delivers neither.
Checks at this head: 31 latest check-runs — ci-ok (publisher) and pre-verdict review-gate red, 6 conditional skips, every other check success; the rest of the diff read consistent (scripts/lib/arch-boundaries.mjs:16-46 rules, :162-195 size ratchet).
Not run: the PR's suites locally (no checkout on this host); the ruling rests on the live head, its check-runs and the base-tree comparator.
Written-by: HugoXK-bot
Written-by: HugoXK
Fixes #1228
What changed
scripts/lib/arch-boundaries.mjs(pure): parses static, side-effect and dynamic imports, resolves relative targets, and applies four runtime import rules:dbrow types but not the store;app, a view or a job;src/jobs/continuity.tsandsrc/jobs/automationHealth.tsfrom the job layer.Type-only imports are erased at build time and are allowed across a boundary.
scripts/lib/arch-boundaries.mjsalso ratchets file size: a new source file is at most 1,200 lines, and a grandfathered file may not grow.scripts/arch-boundaries.mjsis the CLI; it reads the tree, not a diff.npm run arch:checkruns it.scripts/lib/arch-grandfather.jsonrecords the five files above 1,200 lines at the sizes measured onv0.5.0:app.ts7,471,db.ts8,722,jobs/service.ts5,518,repos/github.ts1,335,views/pages.ts6,234. An entry must be deleted once its file is at or below 1,200 lines.test/archBoundaries.test.tscovers the four rules, type-only imports, unresolved/external imports, the line number of a multi-line import, the size ratchet, and the real tree.npm run arch:checkis a step in the existinglintCI job. It is not a new required check, soci-ok's job list and the aggregate script are unchanged; the same test also runs intest, which runs on every diff.docs/code-standards.mdrecords the rules and the ratchet.Ran:
npx tsx --test test/archBoundaries.test.ts— 10 pass, 0 failnpm run arch:check—arch: 174 files, 699 imports, 5 grandfatherednpm run lint— 11 baseline warnings, unchangednpm run typecheck— passnpm run build— passnpm test— 3328 pass / 9 fail. The same 9 fail on the untouchedv0.5.0tree in a second worktree:deployAutomation(5),gateBaseTree(1),nginxCheck(2),securityHeaders(1). They are macOS host/tool failures, not this diff.Not run:
npm run checkon this macOS host is blocked by the same 9 pre-existing failures;lint,typecheckandbuildpass before them.Risks
lint, not a new job. A docs-only diff skipslint; the suite test still runs, and a docs-only diff cannot introduce a runtime import or a large source file.scripts/,.github/,docs/code-standards.md,package.json). The tip needs a PASS fromHugoXK-bot; the author of the tip may not PASS it. I have not posted one.Docs updated:
docs/code-standards.md— Architecture boundaries.