chore: lint cleanup and notice-suppressibility fix#185
Conversation
…es and adjust related tests
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThis PR fixes CLI notice suppression so the allow-all skills security warning is not hidden by ChangesAllow-all notice suppression fix
Command signature, lint, and test mock cleanups
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CLI as intent list
participant SourcePolicy as applySourcePolicy
participant CliOutput as printNotices
User->>CLI: intent list --no-notices
CLI->>SourcePolicy: build notices for allow-all config
SourcePolicy-->>CLI: notices [ALLOW_ALL_NOTICE, ...]
CLI->>CliOutput: printNotices(notices, { noNotices: true })
CliOutput->>CliOutput: filter notices to ALLOW_ALL_NOTICE only
CliOutput-->>User: prints "All skill sources allowed" warning
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit ba25ea9
☁️ Nx Cloud last updated this comment at |
commit: |
Summary
Five items, each independently verified (eslint, tsc, full test suite).
test:eslint—packages/intent/package.jsonhad notest:eslintscript, so eslint was silently a no-op in CI despite being wired innx.json.intent/static-discoveryrule block ineslint.config.jspointed atpackages/intent/src/scanner.ts, which no longer exists (moved topackages/intent/src/discovery/scanner.ts); the rule wasn't being applied.import/orderviolations, 1no-useless-escape(unnecessary\/inside a regex character class), 1no-unnecessary-type-assertion(redundantas anyafterJSON.parse).require-awaitwarnings — removed unnecessaryasyncfromrunExcludeCommand/runLoadCommand(confirmed CLI-internal, not public API) and from 17 test mocks acrosscli.test.ts,source-policy-surfaces.test.ts, andstale-command.test.ts.intent list --no-notices/INTENT_NO_NOTICES=1silently hid the warning that all skill sources are permitted (intent.skills: ["*"]). The banner is a security-relevant signal, not a migration tip, and shouldn't be silenceable.ALLOW_ALL_NOTICEis now excluded from suppression by identity inprintNotices()(shared/cli-output.ts), while every other notice stays suppressible as before.warningschannel, which would have leaked it into every agent session-start/resume/clear/compact hook context (hooks/install.tsharvestswarnings/conflictsfor its catalog, nevernotices). Kept it innoticesinstead so it stays out of agent-injected context automatically, with no audience branching needed.cli.test.ts) proving the banner survives--no-notices; verified the test fails against the pre-fix code and passes with the fix.Summary by CodeRabbit