Remote-safe: AI agent & automation read tools#443
Merged
Conversation
mocha06
requested review from
adriannoes and
gbrlcustodio
and removed request for
adriannoes
July 18, 2026 23:36
adriannoes
approved these changes
Jul 20, 2026
adriannoes
left a comment
Collaborator
There was a problem hiding this comment.
Summary
Marker-only change that meets #437: the 11 AI agent and automation read/validate tools get meta=REMOTE with matching REMOTE_SEED entries, and the drift-guard stays in lockstep. Local checkout on tip 3273efe ran the remote-profile tests and the full MCP non-integration suite green; CI lint and test are also green. No behavior change under the local profile.
What worked well
- Markers and seed updated together with a clear #437 comment; writes in the same modules stay unmarked.
- Stack hygiene is visible in the hunk:
get_available_ai_modelslands here, while org provider discovery stays for the next slice. - The PR body correctly notes that the E2E "76 exposed" table is end-of-stack (and may include #434 on the measurement branch), not this tip alone (tip seed is baseline plus these 11).
Review path
- Checked out the PR tip, ran ruff on touched files,
test_remote_profile.py, and the MCP unit suite; verified marker/seed lockstep (11 == 11). - Cross-checked sibling stack reviews (#444 to #447) and independent tracks (#434, #436): same chore shape, nothing to absorb as a finding here.
- Fan-out on
validate_ai_agent_behaviorsis pre-existing and capped; quotas belong under #309, not as a gate for this allowlist.
Merge this before the stacked follow-ons (#444 to #447) so the bases stay linear.
This was referenced Jul 20, 2026
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.
Closes #437. Part of migrating the default-deny remote profile to expose the read tools that meet the remote-safe criteria (milestone: Hosted-safe tool surface). Stacked on
dev.Motivation
Under
--profile remotethe server exposes only tools carryingmeta=REMOTE(tracked byREMOTE_SEED); many pure read tools that reach the API with the request-scoped bearer and are fully governed by API permissions were still withheld. This exposes the AI agent and AI automation read/log surface.Outcome
Marks 11 AI agent & automation read tools remote-safe:
get_ai_agent,get_ai_agents,get_ai_agent_logs,get_ai_agent_log_details,get_agents_usage,validate_ai_agent_behaviors,get_ai_automation,get_ai_automations,validate_ai_automation_prompt,get_ai_credit_usage,get_available_ai_models. Each tool carriesmeta=REMOTEand a matchingREMOTE_SEEDentry; the drift-guard test keeps the two in lockstep. No new tools, no behavior change under the local profile.Remote-profile validation
The remote-safe read migration (this PR is part of the stack #437→#441) was verified end-to-end by running the code in
--profile remote --transport httplocally — behaving as a deployed instance — and connecting an MCP HTTP client with a valid RS256 Keycloak bearer. Measured on an integration branch that also carried the in-flight provider-write work (#434), so the withheld count includes those write tools:--profile remote --transport httpexposed 76, withheld 106(default-deny)401(bearer required)tools/listwith a valid RS256 bearerget_organization,get_pipe,get_llm_providers,get_ai_agentscreate_card,create_llm_provider,delete_card,upload_attachment_to_card,execute_graphqlabsent — 0 leakedget_organizationexecuted (isError=false)The 76 remote-safe tools are the 23 pre-existing plus the 53 read tools this migration set (#437–#441) adds. Registration-time filtering is also covered by the
test_remote_profile.pydrift-guard andtest_on_exposes_seed_and_withholds_the_rest.