permission-order X1 fails when TMPDIR is inside a dot-directory (auto preset refuses the fixture read)

Open Beginner friendly
#7,007 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
testing

Research direction

Start with test/characterization/permission-order.test.ts and inspect the X1 fixture setup and how it chooses its temporary directory. The issue says the fixture should live somewhere the auto preset approves regardless of TMPDIR, or the test should set its own TMPDIR. Run the listed Vitest command with TMPDIR inside a dot-directory and confirm X1 passes.

Written by the indexing model from the issue text.

Description

Summary

test/characterization/permission-order.test.ts "X1: permission vs PreToolUse order > runs a call that both the hook and the auto preset allow" fails when TMPDIR points inside a dot-directory (for example ~/.run-tmp/<run>). It passes with the default /tmp and with a plain home subdirectory. Agent lanes on the shared Linux runners are told not to use /tmp (a separate policy), and ~/.run-tmp/... is a common choice, so the test goes red on those runs.

Reproduction (base v2026.11.18-2 = 2c28cd8c, built with npm run build)

cd packages/coding-agent
TMPDIR=$HOME/.run-tmp/x npx vitest --run test/characterization/permission-order.test.ts   # 1 failed | 4 passed
env -u TMPDIR npx vitest --run test/characterization/permission-order.test.ts            # 5 passed
TMPDIR=$HOME/plaintmp npx vitest --run test/characterization/permission-order.test.ts     # 5 passed

Actual

expected 'The user rejected permission to use t…' to contain 'keep me'
+ ... Permission required for bash (cat), and there is no UI to ask, so the call did not run. ... Under the auto preset, allow rules do not widen what it approves ...

Reading

The fixture file the test cats lives under TMPDIR. The auto preset does not approve a read whose path crosses a dot-directory, so the call needs a prompt there, and with no UI it is refused. The product behaviour looks intended; the test is what depends on the environment. Hosted CI uses /tmp and stays green (main was SUCCESS at 5634be278a).

Expected

X1 creates its fixture in a directory whose path the auto preset approves regardless of TMPDIR (or sets its own TMPDIR), so it passes on any runner.

Related

#4489 (the test's origin), code-yeongyu/senpi#7006 (where it showed up as a base red).

Dominant language
TypeScript
Stars
521
Forks
167
Avg merge
23h 39m
Merged PRs (30d)
692

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from code-yeongyu/senpi

All issues in code-yeongyu/senpi

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.