[PR #4442] [CLOSED] [Other] Stop is only stopped when the run's folder is really gone #5051

Closed
opened 2026-11-07 16:32:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4442
Author: @xvcezrqpbxtpzblrt
Created: 10/28/2026
Status: ❌ Closed

Base: main ← Head: host/timeskip-stop-027


📝 Commits (1)

  • 51224fe [Other] Stop is only 'stopped' when the run's folder is really gone

📊 Changes

2 files changed (+36 additions, -6 deletions)

View changed files

📝 apps/host/server/timeskip.mjs (+31 -5)
📝 apps/host/tests/timeskip-real.test.mjs (+5 -1)

📄 Description

## Problem

Stopping a Time-skip run reported success even when the run's folder was still there. existsSync returns false on a permission error, so "could not be deleted" read as "deleted": the copies of the person's files stayed on disk while the interface said the run had stopped.

Result

  • The removal is verified: only ENOENT counts as gone. If the folder is still there after eight seconds, stop() raises, and the route answers with the error instead of a cheerful "stopped".
  • A folder that comes back after the first removal (a job still writing when it was ended) is removed again until it stays gone.

Validation

node --test tests/timeskip-real.test.mjs → 7 pass, 0 fail, three runs in a row (Windows). The stop case went from failing after 7.9 s to passing in about 0.9 s.

Limits

  • The end-to-end case is skipped when STRATA_HARNESS_DIR is not set; the pure logic and the code path are what the test covers here.
  • The folder can still be held by another program (an editor, an antivirus); then Stop now says so instead of pretending.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4442 **Author:** [@xvcezrqpbxtpzblrt](https://github.com/xvcezrqpbxtpzblrt) **Created:** 10/28/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `host/timeskip-stop-027` --- ### 📝 Commits (1) - [`51224fe`](https://github.com/Niko1221/Strata/commit/51224fe60ebfee8dddbb6665794ccbf1efc55508) [Other] Stop is only 'stopped' when the run's folder is really gone ### 📊 Changes **2 files changed** (+36 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `apps/host/server/timeskip.mjs` (+31 -5) 📝 `apps/host/tests/timeskip-real.test.mjs` (+5 -1) </details> ### 📄 Description ## Problem Stopping a Time-skip run reported success even when the run's folder was still there. `existsSync` returns false on a permission error, so "could not be deleted" read as "deleted": the copies of the person's files stayed on disk while the interface said the run had stopped. ## Result - The removal is verified: only `ENOENT` counts as gone. If the folder is still there after eight seconds, `stop()` raises, and the route answers with the error instead of a cheerful "stopped". - A folder that comes back after the first removal (a job still writing when it was ended) is removed again until it stays gone. ## Validation `node --test tests/timeskip-real.test.mjs` → 7 pass, 0 fail, three runs in a row (Windows). The stop case went from failing after 7.9 s to passing in about 0.9 s. ## Limits - The end-to-end case is skipped when `STRATA_HARNESS_DIR` is not set; the pure logic and the code path are what the test covers here. - The folder can still be held by another program (an editor, an antivirus); then Stop now says so instead of pretending. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:32:18 +07:00
Sign in to join this conversation.
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
Niko1221/Strata#5051
No description provided.