Skip to content

test(fuzz): Contract Mutation & Adversarial Fault Injection Testing Suite #20

Description

@sdageltc

Summary & Motivation

To guarantee that letitloop remains mathematically indestructible against rogue workers, file system corruptions, and flaky external commands, we want to build a formal Adversarial Fault Injection & Mutation Testing Suite.


Proposed Fault Injection Scenarios

  1. Out-of-Bounds File Mutation:
    • A mock worker attempts to modify files in parent directories (../../etc/passwd or ../sibling_module). Verifies scope.py blocks/detects the violation 100% of the time.
  2. Zombie Process Leakage:
    • A mock worker forks child background processes that refuse SIGTERM. Verifies supervisor cleans them up.
  3. Simulated State Journal Corruption:
    • Injects truncated JSON or random byte noise into journal.jsonl mid-turn. Verifies apply_checkpoint and WAL recovery reconstruct valid state without crashing.
  4. Deterministic Infinite Loop Simulation:
    • A mock worker produces identical non-divergent outputs across retries. Verifies failure.py 3-strike impossibility triggers deterministically on Strike 3.

Acceptance Criteria

  • All fault injection suites execute under 5 seconds with zero external dependencies.
  • 100% test pass rate demonstrating resilient fail-closed behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureCore control loop and system architectureenhancementNew feature or requestgood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions