inference.py:
- Add log_start/log_step/log_end emitting [START]/[STEP]/[END] to stdout
with flush=True β required by hackathon Phase 2 evaluator
- Strip all testing bloat: Bedrock wrapper, thinking model detection,
Kimi/Nemotron-legacy/fallback provider code, AgentAction Pydantic schema
- Standard OpenAI client path only (temperature=0, max_tokens=1024)
- Keep: system prompt, observation builder, action parser, diagnosis memory
server/simulator.py:
- CASCADING_LATENCY now remediable via restart_service and scale_service
- rebalance_traffic param aliasing (accepts region/service_id/target)
- arrival_rate floor (20% of base) prevents rebalance spam from starving a region
- tune_config diagnostic hint shows exact key and example value
server/propagation.py:
- Reset service_time_local and arrival_rate to baseline each propagation tick
for non-failing services β fixes permanent SLO ceiling after upstream heals
- Circuit breaker: cooldown_ticks 5β3, half_open_success_threshold 3β2
- β¦
Fix /reset to accept empty/null body for hackathon validatorβ
Validator sends POST /reset with no body or null body. Changed from
typed ResetRequest parameter to raw Request parsing, so any body
(empty, null, {}, or full JSON) works and defaults to task_id=easy.
Fix propagation recovery and config key visibilityβ
- propagation.py: services without direct failures now use propagation_error_rate
alone (not max with historical rate), so cascaded errors clear when upstream heals
- simulator.py: inspect_logs for config failures always appends a diagnostic line
naming the exact broken config key so agents can identify it reliably
- simulator.py: tune_config accepts fuzzy key matching (substring) as fallback
so agents don't need to guess the exact key string
Fix HTTP endpoint statefulness and response formatβ
- server/app.py: replace SDK's stateless HTTP /reset, /step, /state with
our own stateful routes using a singleton environment. SDK's routes
create a new env per request which breaks multi-step episodes. WebSocket
sessions (used by hackathon evaluation) work natively via the SDK.
- server/environment.py: no-op close() to prevent SDK from destroying state
- inference.py: fix response unwrapping (observation nested in response),
fix step request format (action wrapped in action key)
openenv validate passes. All 37 tests pass. Full HTTP loop verified:
reset β step β step β state β grader all work correctly.
- tests/test_simulator.py: 22 tests for determinism, SLO scoring, all
action types, termination logic, and observation helpers
- tests/test_grader.py: 5 tests for score bounds, partial credit,
determinism, and resolved bonus
- tests/test_propagation.py: 10 tests for queueing theory (Little's Law,
retry amplification) and circuit breaker state machine
- Fix: episodes no longer terminate as "resolved" when SLO=1.0 but
injected failures haven't been remediated (resource leaks, gradual
failures now properly degrade over time before resolution)
All 37 tests pass.
Add core simulation engine, environment, grader, and app wiringβ