Skip to content

agent: state that traffic binding is off when the switch is off - #453

Merged
BaaRai merged 1 commit into
BaaRai:mainfrom
NikolayGusev-astra:fix/finding-traffic-guidance-disabled
Nov 21, 2026
Merged

BaaRai merged 1 commit into
BaaRai:mainfrom
NikolayGusev-astra:fix/finding-traffic-guidance-disabled

Conversation

@NikolayGusev-astra

Copy link
Copy Markdown

Problem

With agent_traffic_binding off (the default), findingWorkflowTools removes bind_finding_traffic from every agent's toolset and strips traffic_refs / evidence_hint_id from the report_finding and hint schemas — but returns no guidance at all.

The text the agents still read promises the binding path:

  • prove_goal description: "…bind at least one verified traffic_ref matching the finding's asset via bind_finding_traffic…"
  • report_finding error path (agent/tools.go): "Already-registered findings can be bound later via bind_finding_traffic."
  • findingTrafficGuidance in agent/finding_recorder.go — which is currently referenced nowhere.

So on a default deployment an agent chases a tool that is not in its toolset.

Evidence (v0.7.0, live run against a local target)

A worker transcript, in order:

thinking: OK the Bash calls are just echo. The tool bind_finding_traffic must be invoked as a tool. Let me call…
tool_use Bash {"command": "true"}
thinking: … grep the transcripts … strings /app/artex | grep traffic_ref

It burned minutes probing the binary and transcripts for a tool it could not call. The task registered findings with poe_level 3, traffic_count 0, and closed 0 of its goals; a second run with the switch on bound traffic and closed 4 of 6 goals.

Behaviour change

When the switch is off, the assembly now returns a standing note (triggered by the same tools as the enabled branch: report_finding / add_hint / add_task_hint / prove_goal / goal_met) that says: binding is off, the tool and the parameters are absent, findings stay recorded but unverified and cannot close a goal, and an operator can enable binding or bind manually. The note avoids the literal traffic_refs on purpose, so the existing assertion (guidance must not mention the stripped parameter) stays true.

No schema, tool-list or enabled-path change.

What was tested

  • go test ./agent/ -count=1 — ok
  • red on the planted break (guidance forced to ""): TestFindingWorkflowSharedAssemblyAndSwitch fails with "disabled deployment must state that binding is off"
  • scripts/verify.sh --go-only — all packages ok (agent, server, intercept, egress, …)

Adjacent to #444 (evidence_hint_id handling); no overlap.


Noticed while running ARTEX as a platform against a live target with a local OpenAI-compatible model; the deployment used the defaults, which is exactly the path this fixes.

@NikolayGusev-astra
NikolayGusev-astra force-pushed the fix/finding-traffic-guidance-disabled branch from 593642f to 62a89cf Compare November 21, 2026 17:36
… is off

With agent_traffic_binding disabled (the default) findingWorkflowTools strips
bind_finding_traffic from every agent toolset and removes traffic_refs /
evidence_hint_id from the report_finding and hint schemas, but the tool
descriptions keep promising the binding path: prove_goal says a finding closes
a goal once a traffic_ref is bound, and the report_finding error path says
already-registered findings can be bound later via bind_finding_traffic. An
agent then chases a tool that is not in its toolset.

Observed on a live run (v0.7.0, local OpenAI-compatible model): a worker spent
minutes on it — "the tool bind_finding_traffic must be invoked as a tool", a
bare Bash true, then grepping the transcripts and the strings of the binary.
The task registered findings with poe_level 3, zero bound traffic, and closed
no goal; a run with the switch on bound traffic and closed 4 of 6 goals.

Fix: attach binding-off notes to the same tools the capture-off notes ride on
(report_finding, add_hint / add_task_hint, prove_goal) in the disabled branch,
so the standing guidance stays empty — the contract the PG test asserts — while
the agent is told the tool and the parameters are absent, that findings stay
unverified, and that an operator can enable binding or bind manually.

Test: agent/finding_workflow_test.go asserts the notes exist on the tools and
name the absent tool; red on the planted break, green with the fix. Verified
against the PostgreSQL-dependent server test that CI runs
(TestFindingWorkflowAutoHintToPlannerAndSetting) and go test ./agent/ ./server/.
@NikolayGusev-astra
NikolayGusev-astra force-pushed the fix/finding-traffic-guidance-disabled branch from 62a89cf to 55e2a4d Compare November 21, 2026 17:58
@BaaRai

BaaRai commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Thanks, the idea is right and this is the missing half of #448. CI is red on server.TestFindingWorkflowAutoHintToPlannerAndSetting in both go and go-stable: that test asserts the assembled system prompt, and the new disabled guidance changes it. go test ./agent does not run it, so run go test ./server with Postgres. Update that test to expect the new note and keep the enabled path unchanged, and it can go in.

@BaaRai
BaaRai merged commit a4a2ee4 into BaaRai:main Nov 21, 2026
5 checks passed
@BaaRai

BaaRai commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Thanks @NikolayGusev-astra, merged. Moving the notes onto the tool descriptions keeps the standing guidance empty and tells the agent on the tool it can actually see. CI green.

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