Skip to content

features: each run stages its Features in a folder of its own - #55

Merged
aledbf merged 1 commit into
mainfrom
fix/features-folder-exclusive
Nov 9, 2026
Merged

aledbf merged 1 commit into
mainfrom
fix/features-folder-exclusive

Conversation

@aledbf

@aledbf aledbf commented Nov 9, 2026

Copy link
Copy Markdown
Member

main's parity job failed on 2026-11-07 (run) and 2026-11-08 (run) on a different read-configuration.features-configuration-local-feature-* case each time, with Go exiting 1:

stage feature h_0: lstat /tmp/devcontainercli-runner/container-features/20261108.01-1794141124816/.stage-0: no such file or directory

The features folder is <cacheFolder>/container-features/<cliVersion>-<ms> (TS createFeaturesTempFolder's name), made with MkdirAll. The parity cases run in parallel, so two Go runs started in the same millisecond shared the folder. Each fetched its Features into .stage-N, and the first one's realignFeatureDirs renamed .stage-0 and removed the leftover .stage-* folders, which included the other run's. TS writes straight into the consecutiveId folders, so in TS a shared name was harmless. The .stage- folders added in 16499ff made it fatal.

createFeaturesFolder now creates the folder with Mkdir, so a run either gets the folder to itself or gets ErrExist and moves on to the next millisecond. The compose path that built the same name by hand now calls it too.

Checked: TestCreateFeaturesFolderIsTheRunsAlone fails on main (50 calls inside one millisecond get the same folder) and passes here. task lint, go test ./internal/... and task mutate (53 refused, 0 survived) are green locally.

Not covered here: the set-up.after-failed-post-create-success and run-user-commands.hook-failure-error failures on #52. In those cases the run that failed was the TS up in setup_cmd, whose output goes to /dev/null.

🤖 Generated with Claude Code

The features folder is <cacheFolder>/container-features/<cliVersion>-<ms>,
TS createFeaturesTempFolder's name, made with MkdirAll. Two runs started in
the same millisecond shared it, and one run's realignFeatureDirs renamed
and removed the other's .stage- folders: "stage feature h_0: lstat
.../.stage-0: no such file or directory", which failed main's parity job
on 2026-11-07 and 2026-11-08. The folder is now created with Mkdir, and a
name another run holds moves to the next millisecond. The compose path
that made the folder by hand goes through the same function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 8c3cc70 into main Nov 9, 2026
29 of 33 checks passed
@aledbf
aledbf deleted the fix/features-folder-exclusive branch November 9, 2026 20:05
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