normalize-types-hook-glob: Normalize TypeScript hook glob #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/normalize-types-hook-glob"
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: Fix the Lefthook pre-commit TypeScript hook glob so it consistently matches js, ts, jsx, and tsx files without embedded spaces.
Task intent: Make an ordinary upstream configuration fix in
lefthook.yml: align thepre-commit.commands.types.globpattern with the existing lint glob so staged JSX and TSX files trigger the type-check hook correctly.Benchmark plan: Construct the task package around a small repository maintenance change. The prompt should point contributors to the Lefthook pre-commit configuration and ask them to correct the TypeScript hook file glob, not to rewrite hooks or change commands. The expected patch should be limited to replacing
*.{js,ts, jsx, tsx}with*.{js,ts,jsx,tsx}inlefthook.yml.Environment plan: Use the upstream repo checkout at commit
c97bcc1c9a965026404ec7197fe6934ae25d5c3aas the environment/repo. The task/environment only needs normal text editing and optionally Node tooling if already available; verification should not depend on installing new packages because the target behavior is a static Lefthook YAML configuration fix.Verifier plan:
test_outputs.pyshould readlefthook.yml, parse or regex-check thepre-commit.commands.types.globvalue, and assert it is exactly*.{js,ts,jsx,tsx}. It should also assert the lint glob remains*.{js,ts,jsx,tsx}, thetypescommand remainsnpx tsc, and no extra pre-commit command blocks were added. A concrete verifier command can bepython test_outputs.pyfrom the repo root.Oracle plan: The oracle solution is a minimal edit to
lefthook.ymlchanging only thetypesglob from*.{js,ts, jsx, tsx}to*.{js,ts,jsx,tsx}. No source code or package metadata changes are needed.Difficulty plan: Current coding systems may over-edit by changing the
npx tsccommand, adding package scripts, reformatting unrelated YAML, or assuming the space-containing glob is harmless. The verifier should reward the precise configuration correction and reject broad unrelated hook rewrites.Repo patch scope: Expected upstream edit scope:
lefthook.ymlonly, specificallypre-commit.commands.types.glob.Anti-leakage notes: Do not expose solver-facing benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present this only as a normal repository maintenance request.
Approach: Inspect
lefthook.yml, compare the lint and types pre-commit globs, and normalize the types glob by removing the embedded spaces inside the brace expansion.Verification: Run
python test_outputs.py; it should confirmlefthook.ymlcontainsglob: "*.{js,ts,jsx,tsx}"for both lint and types while preservingrun: npx tscfor the types command.Risk: The main risk is that Lefthook glob parsing may tolerate some whitespace in some contexts, making the bug subtle. Keeping the verifier focused on exact configuration consistency avoids ambiguity.
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: normalize-types-hook-glob
Branch: task/normalize-types-hook-glob
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.