Skip to content

Report SAFE run_python files under sent, like a real delivery - #272

Merged
iamwavecut merged 1 commit into
mainfrom
fix/run-python-safe-sent
Oct 20, 2026
Merged

iamwavecut merged 1 commit into
mainfrom
fix/run-python-safe-sent

Conversation

@iamwavecut

Copy link
Copy Markdown
Owner

Problem

After #271, the production SAFE virtual dialog produced a clean reply ("Готово, вот диаграмма."), but only through the fallback model. The tool result said "the chat received sales_chart.png", while its data still listed the file as send_withheld. Gemma read that field as unfinished work and called a nonexistent send_files tool twice ({"file_ids":["sales_chart.png"]}). The turn then fell back to Qwen.

Real deliveries report the files under sent, so SAFE mode did not show the model what it sees in a real chat.

Change

  • withhold_delivery runs fill sent exactly as a real delivery does; the send_withheld field is gone. The tool_mode: "SAFE" marker, which the SAFE toolbox adds, already tells operators that nothing left the sandbox. This follows the other SAFE tools: draw_api reports delivered: true.
  • The doc comment and the design doc are updated.

The English chart labels in the earlier test runs come from the virtual dialog's debug user, whose context carries <locale>en</locale>. They are not a model error.

Verification

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test -p openplotva-app (1434 passed), -p openplotva-dialog (106)

After the deploy, the production SAFE virtual dialog will repeat the chart request and a follow-up edit.

Deployment risk

Only SAFE runtime virtual dialogs change; real chats are unaffected. Rollback: revert this commit.

After #271 the SAFE result said the chat received the chart, but its
data still carried send_withheld. Gemma read that as unfinished work and
called a nonexistent send_files tool twice before the turn fell back to
Qwen. A withheld delivery now fills sent exactly as a real one does;
tool_mode SAFE already tells operators that nothing left the sandbox.
@github-actions

Copy link
Copy Markdown
Messages
📖 Danger checked 3 changed file(s).

Generated by 🚫 dangerJS against 0313c80

@iamwavecut
iamwavecut merged commit c2d542a into main Oct 20, 2026
12 checks passed
@iamwavecut
iamwavecut deleted the fix/run-python-safe-sent branch October 20, 2026 17:47
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.

1 participant