Repository navigation
ci(lint): guard workflow providers against merging requests - #1602
huong8373tt-beep wants to merge 5 commits into
Conversation
|
|
Follow-up pushed in
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content. |
Resolved earlier findings:
No additional confident findings. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
No blocking findings at cec3fe2. The rule is turned on, covers the same patterns as src/__tests__/no-provider-merge.test.ts (including the separate 'pr', 'merge' arguments through the bare 'merge' literal), and adds call and property checks. The learnings-root rule is out of this PR now, and gh pr merge inside a shell string is caught, with a test.
[P3 nit] dangerousCallee reports any bare merge(...) call in scope, so a future object-merge helper in src/providers/ would be flagged; main has none today. The CI review's real-CLI finding doesn't apply to lint tooling. CI is green at this head.
@jeff-r2026 Your call: this turns on a new lint rule, ready from my side.
|
Updated the PR description to include the post-build real TeamAI CLI verification record:
The other two findings from the earlier review remain resolved at Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content. |
|
Approved at cec3fe2 after verifying it on main 313341f (tsc, lint 0/0, build, rule tests). #1601 has since landed and also registers a rule in |
cec3fe2 to
41a4f9c
Compare
|
Rebased onto current
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content. |
|
No confident findings in the current diff. Resolved earlier findings:
Review was read-only; no PR code was run, built, or installed. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
[P1 blocking] The rebase drops the learnings-root registration. At 41a4f9c, oxlint-plugin-teamai/index.js replaces the learningsRoot import and its 'learnings-root' entry with no-provider-merge, where both were meant to stay:
-import learningsRoot from './rules/learnings-root.js';
+import noProviderMerge from './rules/no-provider-merge.js';
...
- 'learnings-root': learningsRoot,
+ 'no-provider-merge': noProviderMerge,rules/learnings-root.js and its test are still on main, and learnings-root.test.ts runs oxlint with teamai/learnings-root turned on, so it can't find the rule. Please keep all four entries: home-env, remove-delivered, learnings-root and no-provider-merge. The rest of the rebase matches what was approved.
|
Re-applied the
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content. |
|
No confident findings in the current diff. Resolved earlier findings:
Review was read-only and limited to the specified diff. No PR code was run, built, or installed. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Fixed at adcac3f: index.js registers all four rules again, and the branch merges cleanly into main. CI is green at this head.
@jeff-r2026 ready for the merge you planned.
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
[P1 blocking] #1590 moves each static check into lint and deletes the Vitest test it replaces, so CI gets shorter. This PR adds teamai/no-provider-merge and its rule tests but keeps src/__tests__/no-provider-merge.test.ts, which runs the same scan over providers/ and workflow/pr-delivery.ts. Both now run on every matrix job, so CI gets longer. Delete the scan from that file; keep only what it checks that the rule cannot (the expectTypeOf part), or move that next to the provider types.
@jeff-r2026 Your call once the old scan is gone.
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Requesting changes for the [P1 blocking] point above (#1602 (review)): this slice must delete the Vitest scan it replaces, per #1590.
|
Pushed |
|
Follow-up verification after |
Thank you for this. #1630 has just merged and moved all of #1590 into |
teamai/no-provider-merge also rejects member .merge() and .accept() calls in provider and workflow delivery code. Closes #1602
teamai/no-provider-merge also rejects member .merge() and .accept() calls in provider and workflow delivery code. Closes Tencent#1602
Summary
Add a focused
teamai/no-provider-mergeoxlint rule as the next small slice of #1590.ruleHarnesscoverage for allowed request creation, harmless wording, merge methods, accept endpoints, auto-merge configuration, and unrelated files.The rule intentionally does not flag ordinary prose such as
pull/merge request.Validation
npx vitest run oxlint-plugin-teamai/rules/no-provider-merge.test.ts src/__tests__/no-provider-merge.test.ts --maxWorkers=2— 10 passednpm run typecheck— passednpm run lint— passed, 0 warnings and 0 errorsnpm run build— passednode dist/index.js --version—0.22.0node dist/index.js list --help— exited 0git diff --check— passedRelated
Refs #1590
Disclosure
Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.