-
Notifications
You must be signed in to change notification settings - Fork 11
[codex] align API and session-sync compliance boundaries #420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
skulidropek
merged 3 commits into
ProverCoderAI:main
from
skulidropek:codex/effect-ts-compliance
Jun 17, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| export const effectMigrationWarnings = [ | ||
| { | ||
| selector: "SwitchStatement", | ||
| message: "Effect migration blocker: use Match.exhaustive instead of switch." | ||
| }, | ||
| { | ||
| selector: "TryStatement", | ||
| message: "Effect migration blocker: use Effect.try / Effect.catch* instead of try/catch." | ||
| }, | ||
| { | ||
| selector: "AwaitExpression", | ||
| message: "Effect migration blocker: use Effect.gen / Effect.flatMap instead of await." | ||
| }, | ||
| { | ||
| selector: "FunctionDeclaration[async=true], FunctionExpression[async=true], ArrowFunctionExpression[async=true]", | ||
| message: "Effect migration blocker: use Effect.gen / Effect.tryPromise instead of async functions." | ||
| }, | ||
| { | ||
| selector: "NewExpression[callee.name='Promise']", | ||
| message: "Effect migration blocker: use Effect.async / Effect.tryPromise instead of new Promise." | ||
| }, | ||
| { | ||
| selector: "CallExpression[callee.object.name='Promise']", | ||
| message: "Effect migration blocker: use Effect combinators instead of Promise.*." | ||
| } | ||
| ] | ||
|
|
||
| export const effectPromiseRestrictedTypes = { | ||
| types: { | ||
| Promise: { | ||
| message: "Effect migration blocker: avoid Promise in public types. Use Effect.Effect<A, E, R>." | ||
| }, | ||
| "Promise<*>": { | ||
| message: "Effect migration blocker: avoid Promise<T>. Use Effect.Effect<T, E, R>." | ||
| } | ||
| } | ||
| } |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| // CHANGE: add API-local Effect-TS compliance lint profile. | ||
| // WHY: expose Effect migration blockers in the API package, which previously only ran baseline ESLint. | ||
| // QUOTE(TZ): "packages/api не защищён lint:effect" | ||
| // REF: user-request-2026-06-17-effect-compliance-api | ||
| // SOURCE: n/a | ||
| // FORMAT THEOREM: lint(api) = hard unsafe bypass errors + visible Effect migration blockers | ||
| // PURITY: SHELL | ||
| // EFFECT: eslint config | ||
| // INVARIANT: config does not alter runtime behavior. | ||
| // COMPLEXITY: O(1)/O(1) | ||
| import eslintComments from "@eslint-community/eslint-plugin-eslint-comments" | ||
| import globals from "globals" | ||
| import tseslint from "typescript-eslint" | ||
|
|
||
| import { effectMigrationWarnings, effectPromiseRestrictedTypes } from "../../eslint.effect-ts-shared.mjs" | ||
|
|
||
| export default tseslint.config({ | ||
| name: "api-effect-ts-compliance", | ||
| files: ["src/**/*.ts", "tests/**/*.ts"], | ||
| languageOptions: { | ||
| parser: tseslint.parser, | ||
| globals: { ...globals.node } | ||
| }, | ||
| plugins: { | ||
| "@typescript-eslint": tseslint.plugin, | ||
| "eslint-comments": eslintComments | ||
| }, | ||
| rules: { | ||
| "@typescript-eslint/ban-ts-comment": ["error", { | ||
| "ts-check": false, | ||
| "ts-expect-error": true, | ||
| "ts-ignore": true, | ||
| "ts-nocheck": true | ||
| }], | ||
| "@typescript-eslint/no-explicit-any": "error", | ||
| "@typescript-eslint/no-restricted-types": ["warn", effectPromiseRestrictedTypes], | ||
| "eslint-comments/disable-enable-pair": "error", | ||
| "eslint-comments/no-unlimited-disable": "error", | ||
| "eslint-comments/no-unused-disable": "error", | ||
| "eslint-comments/no-use": "error", | ||
| "no-console": "error", | ||
| "no-restricted-syntax": ["warn", ...effectMigrationWarnings] | ||
| } | ||
| }) |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.