Phase E5: interactive stream pipeline - #46
Conversation
|
Droid finished @txmed82's task —— View job The interactive runner change to apply the pinned stream preprocessing looks coherent and is backed by strong new E2E tests. One blocking issue remains in the new test predictor: it returns a live history list, creating a self-referential structure that will crash JSON hashing/serialization. |
|
|
||
| class Predictor: | ||
| def predict(self, item: dict[str, Any]) -> dict[str, Any]: | ||
| return {"turn": item.get("turn"), "history": item.get("history", [])} |
There was a problem hiding this comment.
[P0] Avoid self-referential interactive history in _HISTORY_ECHO
In _HISTORY_ECHO, returning item.get("history") hands back the runner’s live history list; the runner then appends an entry whose output is this prediction, which makes prediction["history"] point back to the list that contains prediction (a cycle). That will break canonical JSON hashing/serialization (for example digest(list(trial.trajectory)) and json.dumps(...) when writing job artifacts), causing the test run to crash.
| return {"turn": item.get("turn"), "history": item.get("history", [])} | |
| return {"turn": item.get("turn"), "history": list(item.get("history", []))} |
There was a problem hiding this comment.
Fixed (list copy). Noted follow-up: kernel-side cycle guard at trajectory hash time so a hostile agent cannot crash digesting; out of scope here.
What: interactive turns go through the same pinned stream preprocessing; history carries agent-visible composed turns (secret-drop proven over two turns); trace/verifier keep raw evidence. Restriction lifted.
Why: interactive imaging+tool workflows couldn't use modality adapters.
Verify: full suite green; new E2E + secret-drop tests; ruff + format + mypy clean. CI + review pending.