Skip to content

story-153: A copy of this repository made for a test carries a git directory of its own - #311

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

jerodw merged 5 commits into
mainfrom
story/story-153

Conversation

@jerodw

@jerodw jerodw commented Sep 16, 2026

Copy link
Copy Markdown
Owner

In a worktree .git is not a directory. It is a one-line file — gitdir: /path/to/real/.git/worktrees/<name> — and copy_repository copied it verbatim. So the copy's git was the repository being copied: anything in the copy that read git read the original's refs and objects, and anything that wrote git would have written them.

The module makes that copy precisely so it can mutate coordinator source and run pytest inside it, and its own docstring says why: "the repository this suite is running from is the one being validated." The copy is the entire safety argument. In a worktree it copied everything except the part that mattered.

Every story runs in a worktree, so the suite met the pointer case on every run the harness made of it. In a developer's main checkout .git is a real directory and the copy is genuine, which is why it passed there and why nobody had noticed.

A clone, not a copy

git clone --no-checkout from the source, with the working tree laid over it. A clone resolves the gitdir: pointer itself, so nothing here spells git's worktree layout — the case is handled by asking git rather than by this test knowing how git writes a worktree down.

Two consequences of cloning rather than copying are handled rather than discovered. A clone checks out HEAD's tree, and what the nested pytest runs must see is the working tree — uncommitted edits included — so the clone is made without a checkout and the source's tree is laid over it. And a clone carries none of its source's local config, so a commit made inside it has no identity to use; the runs that need one are given an explicit one rather than inheriting whatever the machine has.

What holds it

The assertion that bites is the one that could only fail from a worktree: the copy's resolved git directory is inside the copy. That is now asserted directly rather than inferred from the copy having succeeded.

A note on this run

It escalated once, at the tester, on tester agent process failed twice a second apart — an agent process that would not start rather than a turn that went wrong, and unrelated to the work. The resume picked up at the tester and finished.

Its inspection is also the first to exercise story-152's accounting in both directions. On the escalated attempt: 3 routed, 2 acted on by the verdict, 1 filed as a brief. On the final attempt: 1 routed, 0 acted on, 1 filed. That second case is exactly the one that silently lost findings before story-152 — the verifier passed over it, and it became a brief instead of disappearing.

Planned from the brief filed under 304.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NJzpgnY9aJ7K2godyjrJJR

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
…rectory of its own

Implemented by the l5 harness story workflow.
@jerodw
jerodw merged commit 688f476 into main Sep 16, 2026
3 checks passed
@jerodw
jerodw deleted the story/story-153 branch September 16, 2026 20:28
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