Skip to content

feat(evaluation): add seeded black-box chaos and load drill suite - #2991

Open
PsiACE wants to merge 1 commit into
oceanbase:masterfrom
PsiACE:feat/chaos-load-evaluation
Open

PsiACE wants to merge 1 commit into
oceanbase:masterfrom
PsiACE:feat/chaos-load-evaluation

Conversation

@PsiACE

@PsiACE PsiACE commented Dec 2, 2026

Copy link
Copy Markdown
Member

Which issue or RFC does this PR close?

None.

Rationale for this change

We need a repeatable way to test PowerContext Server under multi-agent load and controlled failures (model truncation, latency, rate-limit bursts, poison-pill scopes, worker crashes, and DB latency) without touching Server internals or relying on private local data.

What changes are included in this PR?

  • Add a black-box chaos and load suite under evaluation/performance/chaos/ with zero imports from src/powercontext/, interacting only through public HTTP APIs, /health/ready, /metrics, OpenAI-compatible HTTP traffic, OS process signals (psutil), and optional Toxiproxy.
  • Separate four independent axes so each failure mode can be tested in isolation:
    • Workload (corpus.py, workload.py): uses the repository's public locomo10.json corpus with deterministic --seed plans; supports both concurrent locust multi-agent load (including 60-worker / 200-scope presets) and sequential scripted runs.
    • Provider (provider.py): mitmproxy addon supporting synthetic (deep or shallow outputs across all 16 output schemas), record, and strict offline replay (HTTP 424 on miss).
    • Fault (fault.py): separate mitmproxy middleware loaded ahead of provider.py to inject delay, 429/503 bursts, truncation, malformed JSON, or poison-pill faults over any provider mode, plus psutil worker kills and optional Toxiproxy DB latency.
    • Runner & Oracle (runner.py, oracle.py, spec.py): runs a five-phase lifecycle (boot -> warmup -> fault -> poll-until-drained -> freeze & verify), freezes log offsets before shutdown so teardown noise does not pollute results, and checks three invariant layers (harness validity, HTTP/readiness/redaction safety, and post-drain recall/isolation/idempotency).
  • Add behavior tests in tests/evaluation/chaos/ and concise documentation in evaluation/performance/chaos/README.md (linked from evaluation/README.md and evaluation/performance/README.md).

Are there any user-facing changes?

None to the PowerContext Server or SDK. Adds a standalone evaluation command: uv run --locked python -m evaluation.performance.chaos.

How was this change tested?

Note: live runs used local SQLite and deterministic or loopback-recorded model responses; OceanBase split roles were not exercised live, and Toxiproxy was tested against a local HTTP mock.

AI usage statement

Implemented with Bub (codex:gpt-6.2-sol, high reasoning effort) and audited and verified with Antigravity.

This branch has not been deployed

No deployments
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