Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?
evaluation/performance/chaos/with zero imports fromsrc/powercontext/, interacting only through public HTTP APIs,/health/ready,/metrics, OpenAI-compatible HTTP traffic, OS process signals (psutil), and optional Toxiproxy.corpus.py,workload.py): uses the repository's publiclocomo10.jsoncorpus with deterministic--seedplans; supports both concurrentlocustmulti-agent load (including 60-worker / 200-scope presets) and sequentialscriptedruns.provider.py): mitmproxy addon supportingsynthetic(deeporshallowoutputs across all 16 output schemas),record, and strict offlinereplay(HTTP 424 on miss).fault.py): separate mitmproxy middleware loaded ahead ofprovider.pyto inject delay, 429/503 bursts, truncation, malformed JSON, or poison-pill faults over any provider mode, pluspsutilworker kills and optional Toxiproxy DB latency.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).tests/evaluation/chaos/and concise documentation inevaluation/performance/chaos/README.md(linked fromevaluation/README.mdandevaluation/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?
uv run --locked prek run --files evaluation/README.md evaluation/performance/README.md evaluation/performance/chaos/README.md evaluation/performance/chaos/*.py tests/evaluation/chaos/*.py(all passed)uv run --locked ty check evaluation/performance/chaos tests/evaluation/chaos(passed)uv run --locked pytest tests/evaluation/chaos -q(70 passed)--seed 42:control(4 families, deep synthetic): exit 0, all applicable invariants passed.kill-worker: exit 0, killed one spawned worker child and verified recovery and drain.record -> replay(scripted, loopback mock upstream): exit 0, 23 requests replayed offline with zero HTTP 424 misses.10 agents x 4 scopes = 40 scopes,16 workers): exit 0, all 40 scope keys matched the seed plan and returned searchable Topic Memory hits.truncation) and fix(runtime): add hysteresis to background discovery degradation #2983 (scale-window1-60w): confirmed fix(server): return redacted 503 for invalid inference output #2982 eliminates the HTTP 500s and raw-output log leaks under truncation, and fix(runtime): add hysteresis to background discovery degradation #2983 eliminates/health/ready503 drops under discovery timeouts.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.