Repository navigation
fix(scripts): replace raw TLS guard matching with compiler AST - #3106
Merged
Merged
Conversation
code-yeongyu
marked this pull request as ready for review
October 11, 2026 01:20
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
Fixes #3105. Replace the regex/hand-lexer raw TLS guard with ts.createSourceFile from the existing @typescript/typescript6@6.0.2 dependency. No runtime TLS policy changes or new Senpi dependencies.
Head: d8b1351. Main was integrated without rewriting history; behind 0 at verification.
Detection and pinning
Measured RED -> GREEN
The OmOWright #41 Opus review (b515dc9d6a) supplied the independent harness.
The precise OmOWright H1 blind region did not reproduce in Senpi; H2 and malformed-source fail-open did. The original 45 cases contain 43 positives and two intentional negatives (inbound Bun.listen, third-party ws); all positives are now caught. The site totals differ because the scanned tracked tree changed.
New regression tests first ran 7 pass / 14 fail; the remaining import-equals/Bun-assignment cases were also RED first (23 pass / 2 fail) before becoming GREEN.
Gates
node --test scripts/no-raw-tls-client*.test.mjs: 38 pass / 0 fail, after integrating current main.tsc --noEmitandtsc --noEmit -p scripts/tsconfig.json: exit 0.biome check --error-on-warnings .: exit 0, 5833 files. Explicit Biome lint over guard files also passes with no warnings/errors.git diff --check: exit 0; configured commit author retained without overrides.Related: #3098, merged #3099, code-yeongyu/omowright#41 and code-yeongyu/oh-my-openagent#9893. No PR merge or Slack.