Skip to content

refactor(dgw): tie test processes to their config - #2124

Draft
Benoît Cortier (CBenoit) with Copilot wants to merge 2 commits into
masterfrom
copilot/replace-start-dgw-function
Draft

Benoît Cortier (CBenoit) with Copilot wants to merge 2 commits into
masterfrom
copilot/replace-start-dgw-function

Conversation

Copilot AI commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

start_dgw returned a process independent of the handle owning its temporary configuration directory.
Replace the documented lifetime requirement with a compiler-enforced borrow.

  • Ownership: Add DgwConfigHandle::start() returning DgwProcess<'_>, with an explicit destructor that keeps the configuration borrowed through guard destruction.
  • Compatibility: Expose start_kill() and wait(); preserve configuration environment, null output, kill-on-drop, listener readiness, and timeout cleanup.
  • Migration: Replace all three callers and remove the free function.
  • Regression coverage: Enable doctests and add a compile-fail example rejecting premature configuration destruction.
let mut process = config_handle.start().await?;
process.start_kill()?;
process.wait().await?;

Co-authored-by: CBenoit <3809077+CBenoit@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor start_dgw function into DgwConfigHandle method refactor(dgw): tie test processes to their config Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants