ci: enforce lint and formatting, add warn-only layering guard#732
Merged
Conversation
Add a Lint & Format job (oxlint --deny-warnings + new format:check script) and a warn-only guard that flags imports of src/commands/* from src/daemon and src/platforms; the guard flips to a hard failure once shared contracts move out of the commands layer. https://claude.ai/code/session_01LXZXzxi55sZ11DSyqWyBA2
11 tasks
|
Size Report
Startup median (7 runs, lower is better):
Top changed chunks: no changes in the largest emitted chunks. |
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
The repo has
oxlint --deny-warningsand oxfmt configured, but no CI workflow ran either — a drive-by PR could land lint warnings or format drift that every later contributor inherits. This adds:ci.yml:pnpm lintplus a newformat:checkscript (same target list as the existingformatscript,--checkinstead of--write).src/commands/*fromsrc/daemon/andsrc/platforms/(currently 10+ daemon files and 5 platform files). It emits a workflow warning, never fails — it flips to a hard failure once the shared contracts move out of the commands layer (refactor: extract shared contracts out of src/commands so daemon/platforms stop importing the CLI layer (M2-2) #726).Touched files: 2 (
ci.yml,package.json).Validation
pnpm lintandpnpm format:checkboth pass on the current tree (818 / 791 files, 0 issues), so the new job is green from day one. The guard'srgpattern was verified locally to match exactly the known cross-layer imports and nothing in tests.Part of #722.
https://claude.ai/code/session_01LXZXzxi55sZ11DSyqWyBA2
Generated by Claude Code