Skip to content

fix(roadmap): scratch files in the checkout fail the step's own ruff and mypy run, and nothing removes them #3092

Description

@dan-petty

What happened

The implement prompt forbids scratch files outside .data/agent/scratch/ (#3007), yet the agent still wrote them in the checkout root, and the step then stopped on its own files:

That is 4 of the 13 stops of 2026-11-01. A prompt rule does not hold.

What should happen

  • Before the step runs its checks, it lists the untracked files of the checkout. A file that is not in the Changes: paths of the group, not under the change folder, and not a new test file in a mirrored test path of the group, is a stray file.
  • The step deletes a stray file and tells the agent in its next message, and the trace records the name. It never passes a stray file to ruff, mypy or git add.
  • The ruff and mypy runs take only the paths of the group and the files the agent changed that are tracked or in the group.
  • The prompt keeps the rule and says that the step deletes a stray file.

Acceptance criteria

  • A step whose agent writes tmp_test_x.py in the root finishes its checks without that file, and the file is gone from the commit and from the tree.
  • A new test file in a mirrored path of the group is kept.
  • The agent is told which files were removed.
  • A replay test with a stub model covers the stray file and a legal new test.

Related: #3027, #3007 (the prompt rule), #3053 (repair rounds).

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 1, 2026
  2. dan-petty commented on Nov 1, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P1-High. The defect caused 4 of 13 step stops in one day and discards completed work each time.
    • Value: High. Each occurrence wastes an agent run and delays delivery of the intended change.
    • Effort: Medium. It needs untracked-file listing, classification against group paths, deletion, agent notification, restricted ruff and mypy invocations, and a replay test.
    • Related: fix(roadmap): the implement step tells the agent to keep scratch files out of the checkout #3006, which asks for a different change. Both address scratch files in the checkout, but #3006 adds a prompt rule while the candidate adds detection, deletion, and path restriction logic in the step.
  3. added
    priority/p1-high
    owner/agent
    status/in-review
    and removed
    status/new
    on Nov 1, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 1, 2026
  5. added a commit that references this issue on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p1-highscope/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions