Skip to content

Harden Piranha utility mutation campaigns - #1

Merged
cryptosourusTex merged 6 commits into
mainfrom
codex/piranha-utility-20260714
Jul 21, 2026
Merged

Harden Piranha utility mutation campaigns#1
cryptosourusTex merged 6 commits into
mainfrom
codex/piranha-utility-20260714

Conversation

@cryptosourusTex

Copy link
Copy Markdown
Owner

Summary

  • add deterministic, CPC-aware utility mutation campaigns with stable candidate metadata and deduplication
  • add trusted static utility, capability, authority, and strict-Pareto gates before candidate execution
  • harden owned-sandbox execution against outside writes, secret reads, network access, child processes, hardlinks, symlinks, false-success tests, and unbounded resident memory
  • add the governed model-engine adapter and deterministic offline verifier
  • wire the utility engine through the portfolio/CLI surfaces and document the security model
  • make the Engine protocol correctly read-only and close the static-type gaps exposed by the release gate

Safety and behavior

The original source tree remains byte-identical. Candidate code is tested only in an owned sandbox and fails closed when required confinement evidence is unavailable. Promotion evidence comes from trusted metrics rather than candidate-supplied values.

Known limitation: macOS resident-memory enforcement is supervisory; hostile native code still belongs in a memory-capped VM or container.

Verification

  • 95/95 CPC-bearing files valid
  • 504 pytest tests passed
  • compileall passed
  • mypy passed across 89 source files
  • Ruff passed on changed files
  • PIRANHA-UTILITY-VERIFY: PASS
  • PIRANHA-MODEL-ENGINE-VERIFY: PASS
  • self-hosted logging mutation preserved tests and reduced source size while holding bytecode flat and reducing branch count

Workbench and others added 6 commits May 25, 2026 00:22
D1: ModelEngine (portfolio/model_engine.py) — a model-driven Engine that
delegates candidate generation to a pluggable proposer (in-process deterministic
for the verifier; real LLM CLI via ClaudeCodeEngine for production). Sits below
the sandbox/safety guards; writes only under ctx.workdir; never raises.
D2: make_engine('model', ...) + --engine choices {model,codex,claude-code} in
tools/piranha.py. No safety override added; non-shell engines require an explicit
--engine-command (no fake default).
D3: tools/piranha_model_verify.py — a deterministic, offline end-to-end verifier
(no sys.executable, no network) proving the planted improvement wins the champion,
a null variant is demoted (never champion) under the improvement gate, and S1-S4 +
blast-radius parity + source immutability + report-always-written all hold. Emits
'PIRANHA-MODEL-ENGINE-VERIFY: PASS'. Non-vacuous (sensitivity-probed: an escaping
write, a raising proposer, and a false-champion are all caught).

Also fixed the historical env-flaky shell-engine tests toward determinism by
quoting the (space-containing) interpreter path — no assertion weakened. Piranha
suite now 20/20 (+ verifier) green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cryptosourusTex
cryptosourusTex merged commit ea10115 into main Jul 21, 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.

2 participants