Skip to content

Harden PytestPilot execution and repair attempts - #1

Merged
godkunzzz3 merged 1 commit into
mainfrom
agent/pytestpilot-safety-hardening
Jul 26, 2026
Merged

Harden PytestPilot execution and repair attempts#1
godkunzzz3 merged 1 commit into
mainfrom
agent/pytestpilot-safety-hardening

Conversation

@godkunzzz3

Copy link
Copy Markdown
Owner

What changed

  • add explicit Local and Docker execution backends with network, filesystem, privilege, CPU, memory, pids, file-size, output, environment, and timeout controls
  • enforce fresh source revisions at mutation time with path-bound SHA-256 read tokens and editable-path checks
  • isolate every repair attempt in an independent Git worktree and only copy back a candidate after focused and full pytest pass
  • record attempt patches, baseline commits, introduced failures, and selection state
  • document the threat model and provide a minimal sandbox image

Why

Pytest previously ran inside the host permission boundary, source-read policy was only audited after mutation, and failed attempts polluted later attempts. These changes turn the three policies into runtime boundaries and keep failed patches away from the user's working tree.

Validation

  • .venv/bin/python -m pytest tests -q: 903 passed, 2 skipped
  • benchmark infrastructure tests: 37 passed
  • git diff --check: passed
  • Python compileall: passed

Known environment limitation

A real Docker smoke could not be run on the development host because the Docker CLI was not installed. Docker argument construction and boundary configuration are covered by focused tests.

@godkunzzz3
godkunzzz3 marked this pull request as ready for review July 26, 2026 06:38
@godkunzzz3
godkunzzz3 merged commit f78529f into main Jul 26, 2026
2 checks passed
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