node-types-config-split: Split Node typings for tests #5

Open
std-bot wants to merge 1 commit from task/node-types-config-split into main
First-time contributor

Assigned idea

Benchmark authoring specification.

Summary: Author a deterministic TypeScript configuration change that keeps production source compilation free of ambient Node globals while preserving Node typings for tests.

Task intent: Upstream-facing work: adjust the repo TypeScript configuration so src files are compiled without implicit Node ambient types, while test files still compile with Node types available.

Benchmark plan: Construct a package where the solver edits TypeScript configuration only. Seed the repo at ce55d83a06ab77486561eedaef477b30663339f6, present the maintainer request, and require a source config plus a test config split. The package should include checks that compile src with the base config and tests with the test config.

Environment plan: The task environment should install the repo dependencies and run TypeScript commands in the materialized checkout. The environment/repo remains the upstream nizos/probity checkout; the benchmark package only adds verifier files outside the solver patch area.

Verifier plan: test_outputs.py should assert that tsconfig.json no longer exposes Node ambient types to src compilation, that a dedicated test TypeScript config exists for test/**/* with types including node, and that concrete commands such as npm install followed by npx tsc -p tsconfig.json --noEmit and npx tsc -p tsconfig.test.json --noEmit succeed.

Oracle plan: The oracle solution edits tsconfig.json to remove "types": ["node"] from the base config and restrict include to src//*, then adds tsconfig.test.json extending the base config with include covering test//* and compilerOptions.types set to ["node"].

Difficulty plan: Current coding systems may make an overbroad package or source rewrite, remove strict compiler options, or forget that tests still need Node typings. They may also pass one tsc command while leaving the other config invalid.

Repo patch scope: Expected upstream edits are limited to tsconfig.json and a new tsconfig.test.json at the repository top level.

Anti-leakage notes: Do not expose solver-facing benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present only the maintainer-facing TypeScript configuration request.

Approach: Use the existing strict ES2022 bundler configuration as the base for production source, then introduce a separate inherited config for tests that restores Node typings.

Verification: Verify with test_outputs.py checks over tsconfig.json and tsconfig.test.json plus successful npx tsc -p tsconfig.json --noEmit and npx tsc -p tsconfig.test.json --noEmit commands.

Risk: If the repo has test tooling hardcoded to tsconfig.json, the package must keep verification focused on TypeScript compile behavior and avoid requiring unrelated script changes.

Path rules: task package is tasks/; mutable upstream checkout is tasks//environment/repo; benchmark package files are under tasks//task; verifier/container environment belongs under tasks//task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest.

Agent context

Task slug: node-types-config-split
Branch: task/node-types-config-split

## Assigned idea Benchmark authoring specification. Summary: Author a deterministic TypeScript configuration change that keeps production source compilation free of ambient Node globals while preserving Node typings for tests. Task intent: Upstream-facing work: adjust the repo TypeScript configuration so src files are compiled without implicit Node ambient types, while test files still compile with Node types available. Benchmark plan: Construct a package where the solver edits TypeScript configuration only. Seed the repo at ce55d83a06ab77486561eedaef477b30663339f6, present the maintainer request, and require a source config plus a test config split. The package should include checks that compile src with the base config and tests with the test config. Environment plan: The task environment should install the repo dependencies and run TypeScript commands in the materialized checkout. The environment/repo remains the upstream nizos/probity checkout; the benchmark package only adds verifier files outside the solver patch area. Verifier plan: test_outputs.py should assert that tsconfig.json no longer exposes Node ambient types to src compilation, that a dedicated test TypeScript config exists for test/**/* with types including node, and that concrete commands such as npm install followed by npx tsc -p tsconfig.json --noEmit and npx tsc -p tsconfig.test.json --noEmit succeed. Oracle plan: The oracle solution edits tsconfig.json to remove "types": ["node"] from the base config and restrict include to src/**/*, then adds tsconfig.test.json extending the base config with include covering test/**/* and compilerOptions.types set to ["node"]. Difficulty plan: Current coding systems may make an overbroad package or source rewrite, remove strict compiler options, or forget that tests still need Node typings. They may also pass one tsc command while leaving the other config invalid. Repo patch scope: Expected upstream edits are limited to tsconfig.json and a new tsconfig.test.json at the repository top level. Anti-leakage notes: Do not expose solver-facing benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present only the maintainer-facing TypeScript configuration request. Approach: Use the existing strict ES2022 bundler configuration as the base for production source, then introduce a separate inherited config for tests that restores Node typings. Verification: Verify with test_outputs.py checks over tsconfig.json and tsconfig.test.json plus successful npx tsc -p tsconfig.json --noEmit and npx tsc -p tsconfig.test.json --noEmit commands. Risk: If the repo has test tooling hardcoded to tsconfig.json, the package must keep verification focused on TypeScript compile behavior and avoid requiring unrelated script changes. Path rules: task package is tasks/<slug>; mutable upstream checkout is tasks/<slug>/environment/repo; benchmark package files are under tasks/<slug>/task; verifier/container environment belongs under tasks/<slug>/task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest. ## Agent context Task slug: node-types-config-split Branch: task/node-types-config-split <!-- std-ts:idea-pr-body -->
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/node-types-config-split:task/node-types-config-split
git switch task/node-types-config-split

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff task/node-types-config-split
git switch task/node-types-config-split
git rebase main
git switch main
git merge --ff-only task/node-types-config-split
git switch task/node-types-config-split
git rebase main
git switch main
git merge --no-ff task/node-types-config-split
git switch main
git merge --squash task/node-types-config-split
git switch main
git merge --ff-only task/node-types-config-split
git switch main
git merge task/node-types-config-split
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
snorkel/root-repository-maintenance-e1fa0b0580dd4c!5
No description provided.