Repository navigation
Conversation
…'s faults A trigger can now call a backing server's advertised config extension (for example set-errors/v1 or set-latency/v1) with args, so a call to one tool, a point in virtual time or a state change can take another server down and a later trigger can bring it back by sending clearing args. - server_config action: service (a server's name, or * for every server), uri, args (templated like a tool action's), tolerate_unadvertised. Each server's outcome (applied, skipped or failed) follows apply_server_config; a name the gateway has no server for fails even when tolerated. - The gateway calls each server at its own address, read from its card, so the action still works once a bundle's lock has closed every route but /mcp. A broadcast tries every server before the action fails. - Each fire writes a server_config event to the env trajectory with each server's outcome. - Cards advertise the server_config trigger feature, and register_env_triggers refuses an older gateway that lacks it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…plied Greptile round 1 on #1009: - The client does not follow redirects, so a 3xx reply means the config handler never ran: any reply but 2xx now fails that server. - The reply excerpt and detail lengths are named class constants. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Faults (forced errors, latency) were set once, before the agent starts, so a task could not say "after the first send, mail is down for two hours". A trigger can now call a backing server's advertised config extension (such as
urn:agentenv:set-errors/v1) with aserver_configaction, and a later one clears it with clearing args (error_rate: 0.0).service(a name, or*for all),uri, templatedargs,tolerate_unadvertised. Action, state and time triggers, withdelay,barrierandunless.apply_server_config, except: a name the gateway has no server for fails even when tolerated (a typo), and a strict broadcast also fails on a cardless MCP server the env definition does not name./svcroutes, which a bundle's lock closes.server_configevent to the env trajectory.fetch_child_cardalso leaves out a card that is not a JSON object.Rollout
The gateway advertises a
server_configtrigger feature; the client'sregister_env_triggersrefuses such a trigger on a gateway without it. Existing triggers are unchanged. Rollback: revert; a task using the action is then refused at registration.Validation
Head
58cf1ad3f9623d765fe27f92ae77babbf4afd526. 46 new tests:tst/unit/env/gateway/triggers_server_config_socket_test.py: real loopback servers; anotes_savecall takes mail down and a time trigger 2h later restores it (sends[ok, fail, fail, ok]), also behind a stand-in guard that 404s every route but/mcp.tst/unit/env/gateway/triggers_server_config_test.py: outcome rules, failures and their events (a redirected reply fails:[redirected]fails on the old>= 400check), templating, state, unless, refused shapes.tst/unit/task_step/test_register_env_triggers.py: an older gateway is refused.With
src/reverted to main, 41 of the 46 fail (the other 5 are existing card-omission cases).Quality bar
Head
58cf1ad3f9623d765fe27f92ae77babbf4afd526. Quality profile: rigorous (eng-standards Q1-Q13).ruff check, unit tierpytest tst/unit packages/agentenv-protocol/tests)58cf1adorigin/mainfb5a5a658cf1ad58cf1ad58cf1ad58cf1ad58cf1adpr_gate.py check58cf1adRelaxations: none.
For the docs
The trigger page should cover the
server_configaction: its fields (serviceor*,uri, templatedargs,tolerate_unadvertised;serviceanduriare literal;verify,asandtoare refused), the per-server outcomes and the two differences fromapply_server_config, clearing by args, theserver_configtrajectory event, and theserver_configtrigger featureregister_env_triggerschecks.Not in this PR
reveal_toolsin an extension's reply; control tokens for computer children.invoke_extension(the setup step's path) still treats a 3xx reply as applied; a separate change.🤖 Generated with Claude Code
Confidence Score: 5/5

The PR appears safe to merge; no new actionable issues were found.Summary
Adds
server_configtrigger actions to arm or clear faults on backing servers and record each server's outcome.Diagram
sequenceDiagram participant T as Trigger engine participant G as Gateway participant S as Backing server T->>G: Run server_config G->>S: Read advertised extensions G->>S: Call config endpoint directly S-->>G: HTTP response G-->>T: Per-server outcomes T->>G: Record trajectory eventReviews (6) · Last reviewed commit: "fix(gateway): a redirected config call f..." · Reviewed by Greptile