Skip to content

Phase E5: interactive stream pipeline - #46

Merged
txmed82 merged 2 commits into
mainfrom
feat/phase-e-streams
Sep 9, 2026
Merged

Phase E5: interactive stream pipeline#46
txmed82 merged 2 commits into
mainfrom
feat/phase-e-streams

Conversation

@txmed82

@txmed82 txmed82 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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.

@factory-droid

factory-droid Bot commented Sep 9, 2026

Copy link
Copy Markdown

Droid finished @txmed82's task —— View job


Security Review

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.

Comment thread tests/test_multi_modality_contracts.py Outdated

class Predictor:
def predict(self, item: dict[str, Any]) -> dict[str, Any]:
return {"turn": item.get("turn"), "history": item.get("history", [])}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
return {"turn": item.get("turn"), "history": item.get("history", [])}
return {"turn": item.get("turn"), "history": list(item.get("history", []))}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@txmed82
txmed82 merged commit 30b6f1d into main Sep 9, 2026
8 checks passed
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.

2 participants