node-types-config-split: Split Node typings for tests #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/node-types-config-split"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.