feat(engine): injectable AST timeout, BOM coverage, .cts support#457
Conversation
- Make runAstSubprocess() timeout injectable via optional timeoutMs parameter (defaults to AST_SUBPROCESS_TIMEOUT_MS) so tests can exercise the timeout→kill→throw path deterministically (#453) - Add BOM fixture tests for Python (utf-8-sig) and Ruby (r:bom|utf-8) serializers to guard against encoding regressions (#454) - Parse .cts files with sourceType "script" in the TypeScript AST branch, mirroring the existing .cjs handling for JavaScript (#455) - Consolidate plausibility guardrail tests and merge .cjs/.cts sourceType tests to stay within the 500-line file limit Closes #453, closes #454, closes #455 Claude-Session: https://claude.ai/code/session_01H7XPPVhN1t6HzH8F3xN4DP Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_0bafb8f6-d712-4233-9cde-61bd48270a59) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Linked Issues check | ❓ Inconclusive | Issues #453 and #454 are covered; #455 is only partially evidenced because the .cts guardrail addition in ast-support.ts isn't shown. |
Add or confirm .cts is included in AST_LANGUAGE_EXTENSIONS.typescript and that ctx.ast("file.cts", "typescript") passes the guardrail. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title is concise and matches the main changes: injectable timeout, BOM tests, and .cts support. |
| Description check | ✅ Passed | The description clearly summarizes the timeout, BOM, and .cts changes and their tests. |
| Out of Scope Changes check | ✅ Passed | The changes stay focused on the three requested engine/test updates; no unrelated edits are evident. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
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 @coderabbitai help to get the list of available commands.
Deploying archgate-cli with
|
| Latest commit: |
7fee870
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2280d288.archgate-cli.pages.dev |
| Branch Preview URL: | https://fix-issues-453-454-455.archgate-cli.pages.dev |
Code Coverage
Full HTML report available in workflow artifacts. Per-directory breakdown
|
# archgate ## [0.47.0](v0.46.1...v0.47.0) (2026-07-06) ### Features * ast-aware rule context (ctx.ast) for TS/JS/Python/Ruby ([#452](#452)) ([81f68c8](81f68c8)) * **engine:** injectable AST timeout, BOM coverage, .cts support ([#457](#457)) ([32ad715](32ad715)), closes [#453](#453) [#454](#454) [#455](#455) --- This PR was generated with [simple-release](https://github.com/TrigenSoftware/simple-release). <details> <summary>📄 Cheatsheet</summary> <br> You can configure the bot's behavior through a pull request comment using the `!simple-release/set-options` command. ### Command Format ````md !simple-release/set-options ```json { "bump": {}, "publish": {} } ``` ```` ### Useful Parameters #### Bump | Parameter | Type | Description | |-----------|------|-------------| | `version` | `string` | Force set specific version | | `as` | `'major' \| 'minor' \| 'patch' \| 'prerelease'` | Release type | | `prerelease` | `string` | Pre-release identifier (e.g., "alpha", "beta") | | `firstRelease` | `boolean` | Whether this is the first release | | `skip` | `boolean` | Skip version bump | | `byProject` | `Record<string, object>` | Per-project bump options for monorepos | #### Publish | Parameter | Type | Description | |-----------|------|-------------| | `skip` | `boolean` | Skip publishing | | `access` | `'public' \| 'restricted'` | Package access level | | `tag` | `string` | Tag for npm publication | ### Usage Examples #### Force specific version ````md !simple-release/set-options ```json { "bump": { "version": "2.0.0" } } ``` ```` #### Force major bump ````md !simple-release/set-options ```json { "bump": { "as": "major" } } ``` ```` #### Create alpha pre-release ````md !simple-release/set-options ```json { "bump": { "prerelease": "alpha" } } ``` ```` #### Publish with specific access and tag ````md !simple-release/set-options ```json { "bump": { "prerelease": "beta" }, "publish": { "access": "public", "tag": "beta" } } ``` ```` ### Access Restrictions The command can only be used by users with permissions: - repository owner - organization member - collaborator ### Notes - The last comment with `!simple-release/set-options` command takes priority - JSON must be valid, otherwise the command will be ignored - Parameters apply only to the current release execution - The command can be updated by editing the comment or adding a new one </details> <!-- Please do not edit this comment. simple-release-pull-request: true simple-release-branch-from: release simple-release-branch-to: main --> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Summary
runAstSubprocess()timeout injectable via optionaltimeoutMsparameter (defaults toAST_SUBPROCESS_TIMEOUT_MS) so tests can exercise the timeout→kill→throw path deterministicallyutf-8-sig) and Ruby (r:bom|utf-8) serializers to guard against encoding regressions.ctsfiles withsourceType: "script"in the TypeScript AST branch, mirroring the existing.cjshandling for JavaScriptTest plan
.pyfixture, verifies the serializer parses it successfully.rbfixture, verifies the serializer parses it successfully.ctstest: verifies.ctsproducessourceType: "script"while.mtsproducessourceType: "module"bun run validatepasses (lint, typecheck, format, 1390 tests, 43/43 ADR checks, knip, build)Closes #453, closes #454, closes #455
https://claude.ai/code/session_01H7XPPVhN1t6HzH8F3xN4DP