8bdf9698 - Surface the vendor's actual output from a lane run - #40
Conversation
|
EN: DE: DetailsThis PR replaces #37 (closed) after a CONTRIBUTING.md finding that #37's commit subjects were missing the required trailing period; fixing that in place would have meant amend+force-push on already-reviewed, already-pushed commits, so the branch was rebuilt cleanly instead. The 4 review passes span both PRs:
A "vendor output could leak a secret into Mergeable ( |
`agent lane run` genuinely invokes grok/codex against a real diff, but the CLI only printed a one-line STATUS/rc summary and discarded the vendor's actual stdout/stderr. By the time launch() returns, the tmux pane it was captured from is already killed, so nothing downstream (gate record --evidence, a human watching the run) could ever see what the vendor found. Both call sites (agent lane run and the agent run one-step chain) now print result.stdout/stderr before the summary line via a shared _print_lane_result helper. The --no-tmux runner captures raw vendor subprocess output, unlike the tmux path whose capture-pane already drops escape sequences, so a misbehaving vendor process could otherwise inject ANSI/C1 control sequences into the terminal. _sanitize_lane_output strips C0/C1/DEL control bytes (keeping tab/newline/CR) before printing either stream.
The sanitizer tests only exercised a few representative escape bytes, so an off-by-one edit to the control-char regex's range boundaries could slip through unnoticed. Add a boundary test asserting every edge of each stripped range is actually stripped and \t/\n/\r survive. Also assert stdout-before-summary ordering in the cmd_lane print test, matching the equivalent cmd_run test, so a regression that reordered cmd_lane's output specifically would be caught.
|
EN: DE: |
7716c36 to
31efc83
Compare
|
EN: DE: Details
|
|
EN: DE: |
EN:
agent lane rungenuinely invokes grok/codex against a real diff, but the CLI only ever printed a one-line STATUS/rc summary and threw away the vendor's actual output. By the timelaunch()returns, the tmux pane it was captured from is already killed, so nothing downstream (gate record --evidence, a human watching the run) could ever see what the vendor found. Fixed both call sites (agent lane runand theagent runone-step chain) to printresult.stdout/result.stderrbefore the summary line, and sanitize that output (strip C0/C1/DEL control bytes) before printing since the--no-tmuxpath captures raw vendor subprocess output unlike the tmux path's already-escape-freecapture-pane.DE:
agent lane runruft grok/codex tatsächlich mit einem echten Diff auf, aber die CLI hat bisher nur eine einzeilige STATUS/rc-Zusammenfassung ausgegeben und die eigentliche Vendor-Ausgabe verworfen. Sobaldlaunch()zurückkehrt, ist die tmux-Pane, aus der sie stammt, bereits beendet — nichts Nachgelagertes (gate record --evidence, ein Mensch, der zusieht) konnte je sehen, was der Vendor gefunden hat. Beide Aufrufstellen (agent lane runund dieagent run-Ein-Schritt-Kette) geben jetztresult.stdout/result.stderrvor der Zusammenfassungszeile aus und sanitisieren diese Ausgabe (C0/C1/DEL-Kontrollbytes entfernt), da der--no-tmux-Pfad rohe Vendor-Subprocess-Ausgabe erfasst, anders als der tmux-Pfad, dessencapture-panebereits escapefrei ist.Details
Replaces #37, rebuilt cleanly off the current
developtip with a single commit and a CONTRIBUTING.md-compliant subject line (the commits on #37 were missing the required trailing period; fixing that in place would have meant amend+force-push on already-pushed, already-reviewed commits, which is not done here even for a message-only fix — see #37 for that PR's original review history).Found while manually driving a diagnostic
reviewtask againstRealUnitCH/web#27's real diff through Jonny Luca's dfxai instance: the grok quality lane ran for real (STATUS=complete) but produced no retrievable findings anywhere. Traced tocmd_lane/cmd_runinmain.pynever touchingresult.stdout.Full local suite green: 446 passed, 1 skipped (agent-core integration test, needs that package importable).