Skip to content

story-151: A copy of this repository made for a test carries what the test needs and not what the runs left behind - #306

Merged
jerodw merged 5 commits into
mainfrom
story/story-151
Sep 16, 2026
Merged

jerodw merged 5 commits into
mainfrom
story/story-151

Conversation

@jerodw

@jerodw jerodw commented Sep 16, 2026

Copy link
Copy Markdown
Owner

The suite was getting slower every week rather than merely being slow, and this fixture was why. repo_copy copied the whole repository excluding only .venv, __pycache__ and .pytest_cache — so it carried .harness/logs and .harness/runs, measured at 915 MB and 797 MB, and .venv310, another 32 MB the pattern missed because it named .venv alone. About 1.75 GB copied to run tests whose subject is source, tests and a bounded range of history.

It cost 19.48 s of module setup in a --durations=40 run of the whole suite — the most expensive fixture measured, above every test in the suite but four. And both of those directories grow with every story that runs, so it got slower without a line of test code changing.

The exclusion is asked of git, not written down

ignored_paths runs git ls-files --others --ignored --directory --exclude-standard -z and excludes what git reports. So a directory added to .gitignore later is left behind here with nobody editing this module — which is the property that matters, because the list that was there had already drifted once by naming .venv while the repository carried .venv310.

--directory collapses a wholly-ignored directory to one entry, which is what keeps it from enumerating every file under .harness/runs. -z asks for the NUL-separated form git does not quote, so a path carrying an unusual byte arrives as itself.

What still comes along

.git, because every assertion the copy is made for bounds itself at its own story's commit range and cannot resolve one without it — and the tracked source and tests, because a subprocess pytest run inside the copy imports them.

A finding this run raised about itself, and did not act on

The Inspector routed a finding to this story on both attempts and the verifier acted on neither, so both were lost rather than fixed or filed. They are recovered by hand:

  • #304 — in a worktree .git is a file naming the real git directory, and the copy carries that pointer rather than a git directory of its own. The suite meets this on every run the harness makes, since every story runs in a worktree. Filed as its own brief; it is not introduced by this change and is not fixed by it.
  • The first attempt's finding was about the same area and is superseded by that one.

That they had to be recovered by hand is #302.

Planned from the brief filed under 296.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NJzpgnY9aJ7K2godyjrJJR

…t the test needs and not what the runs left behind
The run escalated and this commit is a holding place for what it left in the working tree, so the work survives a checkout of another branch. It is not a decision about that work: the story did not finish and nothing here has been accepted or reviewed.

Escalation reason: tester agent process failed; tester has exhausted its max_self_routes budget of 1

To put these changes back in the working tree:
    git reset --mixed HEAD~2
The run escalated and this commit is a holding place for what it left in the working tree, so the work survives a checkout of another branch. It is not a decision about that work: the story did not finish and nothing here has been accepted or reviewed.

Escalation reason: tester agent process failed; tester has exhausted its max_self_routes budget of 1

To put these changes back in the working tree:
    git reset --mixed HEAD~2
… test needs and not what the runs left behind

Implemented by the l5 harness story workflow.
@jerodw
jerodw merged commit 3b93501 into main Sep 16, 2026
3 checks passed
@jerodw
jerodw deleted the story/story-151 branch September 16, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant