Skip to content

Implementation Plan: Define Owned Process-Group Cleanup and Evidence Contract - #4569

Merged
Trecek merged 24 commits into
developfrom
impl-define-owned-process-group-cleanup-plan-20260812-130507
Aug 13, 2026
Merged

Implementation Plan: Define Owned Process-Group Cleanup and Evidence Contract#4569
Trecek merged 24 commits into
developfrom
impl-define-owned-process-group-cleanup-plan-20260812-130507

Conversation

@Trecek

@Trecek Trecek commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implement one execution-layer OwnedProcessGroup lifecycle object for subprocesses that AutoSkillit directly creates as fresh POSIX process-group leaders. Managed runners and PTY cook create a new session; direct-TTY cook deliberately creates only a new process group so it can remain in the parent's terminal session. Ownership is a live capability in both cases: it exists only while the spawning controller retains the waitable, unreaped direct child and verifies pgid == pid; a stored PID/PGID or a previously checked process identity never authorizes killpg().

Requirements

REQ-OWN-001: The system must positively establish that a process group is owned before sending group-wide signals.

REQ-OWN-002: The ownership mechanism must prevent stale or reused process-group identities from authorizing cleanup.

REQ-EVD-001: Cleanup evidence must distinguish expected process disappearance from permission failures.

REQ-EVD-002: Cleanup results must not identify an inaccessible PID as a group member without evidence establishing membership.

REQ-EVD-003: ProcessCleanupResult.complete and access_denied_pids must have documented, tested semantics for incomplete or inaccessible observations.

REQ-CLN-001: The implementation must define whether cleanup guarantees termination of the verified owned group or reports only observed process termination.

REQ-TST-001: Tests must cover exited roots, partial enumeration, permission failures, stale or reused group identities, and group-wide signaling safeguards.

Closes #4550

Implementation Plan

Plan file: /home/talon/projects/generic_automation_mcp/.autoskillit/temp/make-plan/define_owned_process_group_cleanup_plan_2026-08-12_101818.md

🤖 Generated with Claude Code via AutoSkillit

@Trecek

Trecek commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator Author

Audit reconciliation: REQ-SCOPE-001 is a stale-base false positive

I investigated the sole blocking finding and did not revert the package
version, because doing so would create a real out-of-scope version change in
this PR. The audit used stale local develop at cb2f3cef7; the fetched PR
base and merge-base are 02327064e, which already contains 0.10.965.

Reproducible evidence:

  • Before remediation, local develop was cb2f3cef7, while
    origin/develop was 02327064e.
  • git merge-base HEAD origin/develop is 02327064e.
  • git merge-base --is-ancestor 02327064e origin/develop exits 0.
  • git log origin/develop..HEAD contains exactly the 10 feature commits and
    does not contain 02327064e.
  • git diff origin/develop...HEAD -- pyproject.toml src/autoskillit/.claude-plugin/plugin.json is empty.
  • GitHub reports PR Implementation Plan: Define Owned Process-Group Cleanup and Evidence Contract #4569 as 52 files, +2,028/-1,057; neither version file is
    in its changed-file list, and 02327064e is not in its PR commit list.
  • Both origin/develop and HEAD contain version = "0.10.965" in
    pyproject.toml and "version": "0.10.965" in plugin.json.

The audit's reported 62 files, +4,365/-1,522 are exactly reproduced by the
incorrect git diff develop...HEAD while local develop was stale. I
fast-forwarded the clean local develop checkout to 02327064e. The same
comparison now reports the correct 52-file, +2,028/-1,057 PR diff, with no
version-file changes.

Independent verification by a separate worker reached the same disposition:
02327064e belongs to origin/develop, not PR #4569, and REQ-SCOPE-001 should
be COVERED when audited against the PR base.

Verification after correcting the audit base:

  • git rebase origin/develop: already up to date
  • pre-commit run --all-files: PASS (including version consistency and
    uv lock --check)
  • task test-check: PASS — 36,545 passed, 586 skipped, 27 xfailed in 442.97s

Disposition: no branch rewrite or source commit is warranted. Please re-run
/audit-impl against origin/develop, the PR base, or merge-base 02327064e.

@Trecek
Trecek added this pull request to the merge queue Aug 13, 2026
Merged via the queue into develop with commit 2917aa1 Aug 13, 2026
4 checks passed
@Trecek
Trecek deleted the impl-define-owned-process-group-cleanup-plan-20260812-130507 branch August 13, 2026 03:58
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.

1 participant