You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 61bb2ee
Browse filesBrowse the repository at this point in the historyBrowse files
feat: HTTP evidence source for the observer (closes#18) (#20)
Adds a third evidence-source type so the planner can see live HTTP
state (eval endpoints, health dashboards, third-party scoring APIs) in
the same observation bundle that already carries file and shell output.
Design
- `evolution_kernel/config.py`: `EvidenceSource` gains HTTP-only fields
(`url`, `method`, `headers`, `timeout`). `_parse_evidence_sources`
validates the new `type: http` shape with friendly errors.
- `evolution_kernel/observer.py`: new `_collect_http()` uses stdlib
`urllib.request` only (single-dep rule preserved — still only PyYAML).
Captures `status`, `body` (64 KiB cap, `truncated` flag), and a
sorted list of `(name, value)` headers so the ledger is stable for
diffing. Non-2xx responses still record the body so a planner can
react to 4xx/5xx instead of silently retrying. URLError / TimeoutError
/ OSError land in `error` instead of raising.
Tests (16 new, all green)
- `tests/test_pr7b.py`:
- 8 config parsing tests (defaults, headers map, missing/blank URL,
bad timeout, non-positive timeout, bad headers shape, unknown type).
- 6 `_collect_http` tests against a `http.server.ThreadingHTTPServer`
on `127.0.0.1` in a daemon thread: 200 capture, 500-with-body,
custom request headers, body truncation flag, connection-refused
error, blank URL.
- 2 E2E tests: `collect_observation` happy path and
`Governor.run_once` writing the HTTP response into the run's
`observation.json`.
Whole suite: 99 passed (was 83).
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
> 📋 **Illustrative scenario.** The numbers below describe what a complete, well-targeted overnight run on the GSM8K case looks like — they are a design narrative, not a checked-in artifact in this repo. For runs anyone can reproduce today, see [`evidence/`](evidence/) and [`examples/demo_target`](examples/demo_target).
106
+
105
107
### $34. One night. An 8B model that runs on a MacBook — from 51.8% to 96.2% on elementary math. Zero weight changes.
106
108
107
109
> Qwen3-8B-Instruct is a general-purpose model with no math-specific training. Its weights are frozen throughout. Evolution Kernel evolves only the solver harness — prompt strategies, tools, and sampling logic. After one overnight run, the same model sits 2.8 points behind GPT-5.5. That means every child can have a free, local, always-on, privacy-safe math tutor.
@@ -248,6 +250,7 @@ flowchart LR
248
250
| Goal evaluator — stops when mission is "won" | ✅ |
0 commit comments