Stop auth database writer before runtime test cleanup #359

Closed
opened 2026-11-05 00:42:37 +00:00 by kayg · 5 comments
Owner

The runtime test loopback_https_port_initializes_auth_with_the_server_database intermittently fails removing its temporary SQLite directory with DirectoryNotEmpty after 779 tests pass. Auth starts a recovery-clock background checkpoint task; determine whether teardown aborts it without joining, reproduce on the unmodified test, and make cleanup wait for the writer before closing/removing the database. Do not retry or ignore the removal error.

The runtime test `loopback_https_port_initializes_auth_with_the_server_database` intermittently fails removing its temporary SQLite directory with `DirectoryNotEmpty` after 779 tests pass. Auth starts a recovery-clock background checkpoint task; determine whether teardown aborts it without joining, reproduce on the unmodified test, and make cleanup wait for the writer before closing/removing the database. Do not retry or ignore the removal error.
Author
Owner

Start: branch j88i-runtime-db-teardown, base 01ee7103a4ea3221cdff4fcfd59195fcc1f77032. Investigating the registered recovery-clock checkpoint task and reproducing the original teardown failure before changing code.

Start: branch `j88i-runtime-db-teardown`, base `01ee7103a4ea3221cdff4fcfd59195fcc1f77032`. Investigating the registered recovery-clock checkpoint task and reproducing the original teardown failure before changing code.
Author
Owner

Finding: the supplied compute01 gate failed loopback_https_port_initializes_auth_with_the_server_database at its remove_dir_all cleanup with DirectoryNotEmpty (779 passed, 1 failed). In this checkout, Auth::new starts the recovery checkpoint task; Clock stores only an AbortHandle, and Drop calls abort() without awaiting task termination. The targeted test passed once locally on the baseline, so the reported gate failure remains the red result; the code confirms teardown has no join before pool close/removal.

Finding: the supplied compute01 gate failed `loopback_https_port_initializes_auth_with_the_server_database` at its `remove_dir_all` cleanup with `DirectoryNotEmpty` (779 passed, 1 failed). In this checkout, `Auth::new` starts the recovery checkpoint task; `Clock` stores only an `AbortHandle`, and `Drop` calls `abort()` without awaiting task termination. The targeted test passed once locally on the baseline, so the reported gate failure remains the red result; the code confirms teardown has no join before pool close/removal.
Author
Owner

Progress: rebased the job branch onto current origin/dev 54ca981778d472f53aac186cf51ce45fb07a56f4 and synced the two-file patch to the compute01 worktree. Both VMs were at capacity; compute01 had the shorter queue and more disk, so verification will run there through build-slot using the same worktree target for quick and fast.

Progress: rebased the job branch onto current `origin/dev` `54ca981778d472f53aac186cf51ce45fb07a56f4` and synced the two-file patch to the compute01 worktree. Both VMs were at capacity; compute01 had the shorter queue and more disk, so verification will run there through `build-slot` using the same worktree target for quick and fast.
Author
Owner

Finish: commit/head 3c0ffdde25f4f07c0297408c1945a8b6e3790c10 on j88i-runtime-db-teardown, pushed to origin/j88i-runtime-db-teardown.

Focused compute01 test output:

running 1 test
test runtime::tests::loopback_https_port_initializes_auth_with_the_server_database ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 543 filtered out; finished in 0.29s

Full verification gate not run per the owner's scope correction; review can run it.

Finish: commit/head `3c0ffdde25f4f07c0297408c1945a8b6e3790c10` on `j88i-runtime-db-teardown`, pushed to `origin/j88i-runtime-db-teardown`. Focused compute01 test output: ``` running 1 test test runtime::tests::loopback_https_port_initializes_auth_with_the_server_database ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 543 filtered out; finished in 0.29s ``` Full verification gate not run per the owner's scope correction; review can run it.
Author
Owner

J256 housekeeping, authorized by kayg. Closing: The recovery checkpoint task is joined before test database cleanup, resolving the reported teardown race. The focused runtime test passes and the matching fix is integrated.

Merged on dev: 2a4f29de4e.

Rechecked all comments and issue timestamps immediately before closure; no activity in the last 12 hours. Audit: #369.

J256 housekeeping, authorized by kayg. Closing: The recovery checkpoint task is joined before test database cleanup, resolving the reported teardown race. The focused runtime test passes and the matching fix is integrated. Merged on dev: https://git.kayg.org/kayg/infraternal/commit/2a4f29de4ed888e203e2210780745f2070346d5a. Rechecked all comments and issue timestamps immediately before closure; no activity in the last 12 hours. Audit: #369.
kayg closed this issue 2026-11-05 17:48:45 +00:00
Sign in to join this conversation.
No labels
launch-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal#359
No description provided.