fix: validate recording completion and clean AT-SPI transports #1

Closed
opencode-agent wants to merge 0 commits from fix/recording-stop-atspi-20261031 into main

Summary

  • Preserve the recorder's native exit status while tightening completion validation. PipeWire 1.6.9 returns exit 1 after a normal SIGINT; accept that path only after our requested signal, without current-job diagnostics, and with a complete nonempty PCM WAV. Reject unexpected exits, signal termination, timeouts and invalid artifacts. Clarify CLI, MCP and SDK semantics.
  • After an accepted stop and confirmed namespace exit, remove dead direct AT-SPI transport sockets. Preserve live listeners, symlinks, HOME, logs and other runtime data. Perform cleanup before artifact delivery so delivery failures cannot skip it.
  • When an accessibility provider implements GetRole but omits GetRoleName, fall back to the standard role name only for the structured UnknownMethod error. Preserve other errors, provider names, role IDs and password masking.

Validation

Verified against current main (c9cbe182061f2a060d75647ed5969dfaa04f2e79):

  • cargo fmt --check
  • TMPDIR=/tmp/persist cargo nextest run --bin hakoniwa --no-fail-fast: 179 passed.
  • cargo clippy --all-targets -- -D warnings
  • cargo nextest run --test stop_regressions --no-capture, with HAKONIWA_BIN pointing to the final Nix package: 3 passed. Covers real recordings, refused-stop preservation, dead socket removal, live/symlink/data preservation and cleanup despite delivery failure.
  • yarn workspace @hakoniwa/sdk typecheck and yarn workspace @hakoniwa/sdk test: 35 tests passed.
  • yarn lint: passed with six existing warnings in unchanged files.
  • yarn docs:check and yarn docs:build: passed.
  • Final Nix product exercised through its own private stdio MCP in a strict downstream sandbox: microphone and speaker recordings produced valid nonzero PCM; normal stop removed three real AT-SPI sockets while retaining HOME and logs.
  • Real Slint/AccessKit GUI: MCP read the Chinese welcome tree and invoked the Exit action successfully; application exited 0 and transport sockets were removed. Downstream GUI environment/accessibility setup remains project-local and is not part of this PR.

Scope and follow-up

The initiating long-lived MCP process can still retain an outer bwrap zombie until that MCP process exits. This independently observed child-reaping issue is not fixed here. No physical-hardware or full-desktop-suite coverage is claimed. This PR does not switch an existing deployment.

Commit 9779867070e90e3a111f0dd9f1ea44acf9138890 is signed; local verification reports a good signature. No PR template was present in the repository.

## Summary - Preserve the recorder's native exit status while tightening completion validation. PipeWire 1.6.9 returns exit 1 after a normal SIGINT; accept that path only after our requested signal, without current-job diagnostics, and with a complete nonempty PCM WAV. Reject unexpected exits, signal termination, timeouts and invalid artifacts. Clarify CLI, MCP and SDK semantics. - After an accepted stop and confirmed namespace exit, remove dead direct AT-SPI transport sockets. Preserve live listeners, symlinks, HOME, logs and other runtime data. Perform cleanup before artifact delivery so delivery failures cannot skip it. - When an accessibility provider implements GetRole but omits GetRoleName, fall back to the standard role name only for the structured UnknownMethod error. Preserve other errors, provider names, role IDs and password masking. ## Validation Verified against current main (`c9cbe182061f2a060d75647ed5969dfaa04f2e79`): - `cargo fmt --check` - `TMPDIR=/tmp/persist cargo nextest run --bin hakoniwa --no-fail-fast`: 179 passed. - `cargo clippy --all-targets -- -D warnings` - `cargo nextest run --test stop_regressions --no-capture`, with `HAKONIWA_BIN` pointing to the final Nix package: 3 passed. Covers real recordings, refused-stop preservation, dead socket removal, live/symlink/data preservation and cleanup despite delivery failure. - `yarn workspace @hakoniwa/sdk typecheck` and `yarn workspace @hakoniwa/sdk test`: 35 tests passed. - `yarn lint`: passed with six existing warnings in unchanged files. - `yarn docs:check` and `yarn docs:build`: passed. - Final Nix product exercised through its own private stdio MCP in a strict downstream sandbox: microphone and speaker recordings produced valid nonzero PCM; normal stop removed three real AT-SPI sockets while retaining HOME and logs. - Real Slint/AccessKit GUI: MCP read the Chinese welcome tree and invoked the Exit action successfully; application exited 0 and transport sockets were removed. Downstream GUI environment/accessibility setup remains project-local and is not part of this PR. ## Scope and follow-up The initiating long-lived MCP process can still retain an outer bwrap zombie until that MCP process exits. This independently observed child-reaping issue is not fixed here. No physical-hardware or full-desktop-suite coverage is claimed. This PR does not switch an existing deployment. Commit `9779867070e90e3a111f0dd9f1ea44acf9138890` is signed; local verification reports a good signature. No PR template was present in the repository.
fix: validate recording completion and clean AT-SPI transports
All checks were successful
Project build / Nix release package (pull_request) Successful in 1m35s
Documentation CI / Documentation check/build/publish (pull_request) Successful in 40s
Project build / Nix release package (push) Successful in 6s
Documentation CI / Documentation check/build/publish (push) Successful in 35s
9779867070
opencode-agent closed this pull request 2026-10-30 16:57:10 +00:00
All checks were successful
Project build / Nix release package (pull_request) Successful in 1m35s
Documentation CI / Documentation check/build/publish (pull_request) Successful in 40s
Project build / Nix release package (push) Successful in 6s
Documentation CI / Documentation check/build/publish (push) Successful in 35s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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
gjz010-harness/hakoniwa!1
No description provided.