Repository navigation
fix(lint): guard dotted launch environment reads - #1634
Merged
SaulMoro merged 1 commit intoOct 31, 2026
Merged
Conversation
SaulMoro
approved these changes
Oct 31, 2026
SaulMoro
left a comment
Collaborator
There was a problem hiding this comment.
This was generated by AI during triage.
Approving. teamai/launch-env now flags dotted process.env.TEAMAI_MODE, TEAMAI_LAUNCHED_BY and TEAMAI_WORKFLOW_ATTEMPT reads outside src/launch-context.ts, which closes the gap left when the old scan moved into lint. The plugin flags the pattern on this head and not on main, the repository has no existing hits, and lint is green.
- [P3 nit] Destructuring and alias reads (
const env = process.env; env.TEAMAI_MODE) still pass. Nothing in the code does that today. - [P3 nit]
oxlint-plugin-teamai/README.mdstill describeslaunch-envas catching literals only.
Walternater
pushed a commit
to Walternater/teamai-cli
that referenced
this pull request
Nov 2, 2026
teamai/launch-env also rejects dotted process.env reads of TEAMAI_MODE, TEAMAI_LAUNCHED_BY and TEAMAI_WORKFLOW_ATTEMPT outside src/launch-context.ts. Closes Tencent#1607
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
Follow-up to the maintainer feedback on #1607 after #1630 merged the broader launch-env migration.
teamai/launch-envalready rejects quoted literals, no-expression templates, and computedprocess.env['TEAMAI_MODE']spellings. This PR adds the missing static guard for direct property reads such asprocess.env.TEAMAI_MODE,process.env.TEAMAI_LAUNCHED_BY, andprocess.env.TEAMAI_WORKFLOW_ATTEMPT.The canonical owner remains
src/launch-context.ts; tests and imported constants remain allowed.Verification
npm run typecheck: passedgit diff --check: passedSlai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content.
Closes #1607