Skip to content

ci(lint): guard configured tool path joins - #1611

Closed
huong8373tt-beep wants to merge 1 commit into
Tencent:mainfrom
huong8373tt-beep:teamai-cli-1590-configured-paths
Closed

huong8373tt-beep wants to merge 1 commit into
Tencent:mainfrom
huong8373tt-beep:teamai-cli-1590-configured-paths

Conversation

@huong8373tt-beep

Copy link
Copy Markdown
Contributor

Summary

Part of #1590. Adds the teamai/configured-tool-paths oxlint rule and enables it in the repository lint gate. The rule catches production path.join/path.resolve calls that consume configured skills, rules, or claudemd fields outside src/locate.ts, so moved homes, scope rules, and read gates stay centralized.

It also records the two existing comparison-only call sites as explicit exceptions:

  • the Codex shared-skill target comparison in src/source.ts;
  • the legacy configured-root comparison in src/uninstall.ts.

The rule ignores test fixtures, literal directory names, unrelated configured fields, and locate.ts itself.

Validation

  • npx vitest run oxlint-plugin-teamai/rules/configured-tool-paths.test.ts — 6 passed
  • npm run typecheck — passed
  • npm run lint — 0 warnings, 0 errors across 1,454 files
  • npm run build — passed
  • node dist/index.js --version — 0.22.0
  • git diff --check — passed

Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.

@huong8373tt-beep
huong8373tt-beep marked this pull request as ready for review October 31, 2026 02:08
@github-actions

Copy link
Copy Markdown

No confident findings in the requested diff.

The validation record is sufficient: it includes focused rule tests, repository lint, type checking, a build, and a real-CLI --version run. The lint run directly exercises the new guard.

Review was read-only; I did not run, build, or install PR code.

@SaulMoro SaulMoro left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was generated by AI during triage.

No blocking findings. teamai/configured-tool-paths is on, lint is clean with it, and the two existing call sites (src/source.ts, src/uninstall.ts) carry an oxlint-disable-next-line with a reason. CI is green.

[P3 nit]

  • The rule flags any .skills, .rules or .claudemd member anywhere inside a path.join / path.resolve argument, whatever the object is, so a later unrelated object with one of those field names will need a disable line. Matching only a toolPath object would miss scopes[tool].rules, so keeping it broad is fine; a short note in the rule's doc comment would help the next reader.
  • The two new files have no newline at end of file.

@jeff-r2026 Your call: a new lint rule, ready from my side.

@SaulMoro

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Thank you for this. #1630 has just merged and moved all of #1590 into npm run lint in one change, including teamai/configured-tool-paths, which is now enabled on main. This branch is based on an older main, so merging it now would conflict with that work and drop rules main already enables. Closing it as superseded by #1630.

@SaulMoro SaulMoro closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants