Skip to content

Clean up Open Knowledge test scratch directories (#5562) - #1976

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Oct 5, 2026
Merged

inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.

* [wip] claim work on test scratch directory cleanup

* fix: clean up Open Knowledge test scratch directories

* fix: close fixture cleanup gaps on skipped and failing tests

* test: cover script harness cleanup when construction fails

* test: target the harness disposer in cleanup failure coverage

* fix: contain installer staging and clean up failed harness setup

* test: exercise real fixture removal failure

* test: register the harness lifecycle suite and temp-dir helper in the lume-qa rot tier

The rot-tier census and harness-trigger checks failed because the new
lifecycle suite was neither rostered nor declared, and the shared temp-dir
helper it imports was missing from the harness trigger list.

* test: give createTempDirFactory the same name-prefix contract as withTempDir

makeTempDir now creates its directory under the system temp dir from a bare
name prefix, so a caller can no longer allocate a scratch directory relative
to the working directory by passing the prefix it would give withTempDir.
Callers drop their join(tmpdir(), ...) wrappers.

* test: require registered temp-dir cleanup to report every removal failure

Two of three registered removals fail with EACCES; the cleanup must report
both failures and finish the remaining removal before it settles. Fails on
the current helper, which settles on the first rejection.

* fix: settle registered temp-dir cleanup only after every removal finishes

The cleanup awaited Promise.all, so it settled on the first rm rejection,
left later removals running and dropped their failures. It now waits for
every removal, rethrows a single failure unchanged and raises an
AggregateError when more than one removal fails.

* test: require registered temp-dir cleanup to report a lone removal failure

The only failing-cleanup test locked two parents, so it reached the
AggregateError branch and never the single-failure rethrow. Deleting that
rethrow left the file green while a lone failed removal resolved cleanup
silently, because the remaining branch fires only for two or more
failures. The new test locks one parent and expects the original EACCES
error for the locked path; it fails both when the rethrow is deleted and
when a lone failure is wrapped in an AggregateError.

GitOrigin-RevId: a3f0e5ac6458ded971172c9cb2dcfc4cd8e77635
@inkeep-oss-sync
inkeep-oss-sync Bot merged commit 912b8dc into main Oct 5, 2026
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch October 5, 2026 05:25
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