Skip to content

Fix reset_workflow_status#11

Merged
daniel-thom merged 1 commit intomainfrom
fix/workflow-status
Jun 9, 2025
Merged

Fix reset_workflow_status#11
daniel-thom merged 1 commit intomainfrom
fix/workflow-status

Conversation

@daniel-thom
Copy link
Copy Markdown
Collaborator

The parameter has_detected_need_to_run_completion_script needed to be reset when reset_workflow_status was called.

The parameter has_detected_need_to_run_completion_script needed to be
reset when reset_workflow_status was called.
@daniel-thom daniel-thom force-pushed the fix/workflow-status branch from fc1a24a to 19a44d7 Compare June 9, 2025 13:29
@codecov-commenter
Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@daniel-thom daniel-thom merged commit f518c9a into main Jun 9, 2025
3 checks passed
@daniel-thom daniel-thom deleted the fix/workflow-status branch June 9, 2025 13:49
github-actions Bot pushed a commit that referenced this pull request Jun 9, 2025
daniel-thom added a commit that referenced this pull request Apr 19, 2026
Fixes Copilot review comments on PR #271:

- Pass raw DB path to `torc-server --database`; torc-server itself prefixes
  `sqlite:`, so the previous `sqlite:<path>` argument would become
  `sqlite:sqlite:<path>` (#5).
- Drain torc-server stderr in a dedicated thread rather than piping and
  ignoring it or inheriting the fd (#2). Inheriting shares the fd with the
  child, which prevented Output::wait from returning when process::exit
  orphaned the server.
- Keep draining torc-server stdout for the lifetime of the child. Previously
  the drainer exited after the port handshake, leaving the pipe buffer able
  to fill (#7).
- `wait()` after `kill()` on every early-return path in
  `start_standalone_server` so zombies aren't left behind on Unix (#8).
- Correct the misleading SAFETY comment on the `unsafe set_var` call in main
  (#3).

Tie the torc-server subprocess lifetime to the torc client via a
parent-death pipe, so standalone cleanup no longer depends on `Drop`:

- torc-server gains a hidden `--shutdown-on-stdin-eof` flag; when set, a
  blocking thread reads stdin and signals graceful shutdown on EOF. The
  existing Ctrl+C handler and the new trigger are composed in a shared
  `build_shutdown_future` used by both the HTTP and HTTPS branches.
- `StandaloneServer` now owns the child's stdin write end; when the torc
  client terminates by any means (normal return, `process::exit`, signal,
  crash), the kernel closes the pipe, torc-server sees EOF, and it shuts
  down. `Drop` still kills the child for the fast path.
- Added integration test for the process::exit path.

Test/portability fixes:

- Use `std::env::join_paths` for PATH construction in the test helper (#9).
- Gate the `ps`-based shutdown test with `#[cfg(unix)]` (#6).
- Fix misleading comment in the commands-file fixture: indented `#` lines
  are stripped after `trim()` (#10).
- Drop unused `torc_server_binary_path` import and placeholder (#11).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

2 participants