Skip to content

fix(driver): enforce -uall on git status and add non-positive PID termination guards (#647) - #651

Merged
tommy-ca merged 1 commit into
mainfrom
feat/untracked-hygiene-and-pid-guards-647
Oct 20, 2026
Merged

tommy-ca merged 1 commit into
mainfrom
feat/untracked-hygiene-and-pid-guards-647

Conversation

@tommy-ca

Copy link
Copy Markdown
Owner

Refs #647.
Parent epic #645.

Summary

  1. Passed -uall to git status --porcelain -uall in scripts/drivers/omp.py and scripts/sync-antigravity-plugin.py. This prevents user repositories configured with status.showUntrackedFiles = no from silently hiding untracked files from isolation residue and sync checks.
  2. Added defensive non-positive PID guards (target_pid <= 1) in tests/test_cross_port_contracts.py to prevent signaling calling process groups or system init.
  3. Added regression test test_omp_isolation_residue_detects_untracked_files_with_show_untracked_files_no in tests/test_harness_drivers.py.
  4. Restamped durable evidence receipts in .audit/evidence/ for updated driver_revision and package_driver_revision.
  5. Verified 6-harness matrix and staleness checks.

…mination guards (#647)

- Pass -uall to git status in scripts/drivers/omp.py _isolation_residue.
- Pass -uall to git status in scripts/sync-antigravity-plugin.py publish check.
- Add non-positive PID guards (target_pid <= 1) to safe_terminate_process in tests/test_cross_port_contracts.py.
- Add test_omp_isolation_residue_detects_untracked_files_with_show_untracked_files_no in tests/test_harness_drivers.py.
- Restamp durable evidence receipts with updated driver and package revisions.
@tommy-ca

Copy link
Copy Markdown
Owner Author

Independent Verification Report: PR #651

Verdict: PASS+NOTES
Base Commit: a03ec555e6032bf41e271f77b0d34d8a7fc37565 (a03ec55 on main)
Head Commit: 8884e8ef64ac3690050acb7ebfe3013cf7272dde (8884e8e on feat/untracked-hygiene-and-pid-guards-647)
Refs: #647, Program #645


Diff & Contract Analysis

  1. Untracked File Hygiene (-uall enforcement):

    • scripts/drivers/omp.py: In _isolation_residue, git status now passes "-uall" (_git(repo, "status", "--porcelain", "-uall")). This ensures that even repositories configured with status.showUntrackedFiles = no correctly expose leaked untracked files, forcing tree_clean = False and preventing false isolation passes.
    • scripts/sync-antigravity-plugin.py: In source_tree_guard, git status now passes "-uall" (_git(source, "status", "--porcelain", "-uall", "--", *SYNCED_PATHS)), preventing publishing untracked or uncommitted assets when untracked file visibility is suppressed by git config.
  2. PID Termination Guards:

    • tests/test_cross_port_contracts.py: Added defensive non-positive PID boundary check (target_pid <= 1) in safe_terminate_process. This strictly prevents signalling process groups (PID 0), broadcast/all-accessible processes (PID -1), or system init (PID 1).
  3. Regression Tests:

    • Added test_omp_isolation_residue_detects_untracked_files_with_show_untracked_files_no to tests/test_harness_drivers.py, configuring status.showUntrackedFiles = no and asserting that untracked child residue properly marks tree_clean = False.
    • Contract test test_stop_cancel_requires_native_settlement_and_does_not_kill_unrelated_process verifies PID guards for 0, 1, and -1.
  4. Evidence Revisions:

    • driver_revision (f1c7568d98d9121022923552f0c10f43b27479de23f0013eafc857fe2206956a) and package_driver_revision (595f3ac6940ab9cb54c2e3e592d85c17ad32b99528052216f06bdd48ea96c293) correctly refreshed across all 5 host receipts and .audit/evidence/index.json.

Verification Execution Receipts

  • Pytest Suite:

    /home/tommyk/projects/pstack/.venv/bin/pytest -v tests/test_harness_drivers.py tests/test_cross_port_contracts.py
    ======================== 17 passed, 7 skipped in 1.18s =========================
    - tests/test_harness_drivers.py::test_omp_isolation_residue_detects_untracked_files_with_show_untracked_files_no PASSED
    - tests/test_cross_port_contracts.py::test_stop_cancel_requires_native_settlement_and_does_not_kill_unrelated_process PASSED
    
  • 6-Harness Matrix Doctor:

    /home/tommyk/projects/pstack/.venv/bin/python scripts/verify-portable.py doctor --host all
    ================ Verification Summary ================
    Host: grok         | Canonical: PASS | Adapter: PASS | Package: PASS | Runtime: UNTESTED | Status: PASS
    Host: codex        | Canonical: PASS | Adapter: PASS | Package: PASS | Runtime: UNTESTED | Status: PASS
    Host: omp          | Canonical: PASS | Adapter: PASS | Package: PASS | Runtime: UNTESTED | Status: PASS
    Host: opencode     | Canonical: PASS | Adapter: PASS | Package: PASS | Runtime: UNTESTED | Status: PASS
    Host: antigravity  | Canonical: PASS | Adapter: PASS | Package: PASS | Runtime: UNTESTED | Status: PASS
    Host: droid        | Canonical: PASS | Adapter: PASS | Package: PASS | Runtime: UNTESTED | Status: PASS
    ======================================================
    6-Harness Matrix Verdict: PASS
    
  • Harness & Boundary Invariant Levers:

    • python3 scripts/verify-harness.py -> PASS (22 playbooks + opening-a-pr, 24 principles)
    • python3 scripts/scan-host-boundary.py --check -> PASS (143 files scanned, 0 boundary leaks)
    • .venv/bin/python scripts/project-package.py --check -> PASS (all manifests & commands in sync)
    • openspec validate --changes --strict -> PASS (2 passed, 0 failed)
    • python3 scripts/canonical-index.py --check -> PASS (Conformance: PASS, 172 artifacts)
    • python3 scripts/canonical-index.py --drift -> PASS (0 commits ahead, CURRENT)
  • Staleness Check & Notes:

    • .venv/bin/python scripts/verify-portable.py check-staleness --host all

@tommy-ca
tommy-ca merged commit d527042 into main Oct 20, 2026
1 check passed
@tommy-ca
tommy-ca deleted the feat/untracked-hygiene-and-pid-guards-647 branch October 20, 2026 15:52
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