Second review of the night's own code: a stray clears when a later removal works (N2), the start-up check never removes this process's own copy (N3), one copy per destination at a time (N4), RunTier2 refuses during a restore for every caller (N5), the import refusal no longer advises removal (N9); red-proved, race-clean; README; REPORT; unreleased
gates / gates (push) Successful in 1m40s

This commit is contained in:
2026-10-22 22:45:42 +02:00
parent 943c517550
commit 9d9e4041c9
9 changed files with 341 additions and 62 deletions
@@ -23,6 +23,7 @@ func withSeams(t *testing.T, root string, img string, run func(args []string) ([
oldRoot, oldImg, oldRun, oldLog, oldDocker := tier2CappedRoot, tier2SelfImage, tier2RunCapped, tier2Logf, tier2Docker
// The copy's lifecycle commands (rm -f by name) never reach Docker from a test (they would act on the host).
tier2Docker = func(context.Context, ...string) ([]byte, error) { return nil, nil }
tier2RetryOff = true
tier2CappedRoot = root
tier2SelfImage = func() string { return img }
tier2RunCapped = func(_ context.Context, args []string) ([]byte, int, error) {
@@ -32,6 +33,7 @@ func withSeams(t *testing.T, root string, img string, run func(args []string) ([
tier2Logf = func(string, ...any) {}
t.Cleanup(func() {
tier2CappedRoot, tier2SelfImage, tier2RunCapped, tier2Logf, tier2Docker = oldRoot, oldImg, oldRun, oldLog, oldDocker
tier2RetryOff = false
})
return rec
}