deploy: bind Agent Runtime updates to recorded resource identity
@asrujana-44 ci sta già lavorando.
Dal 14/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Summary
Agent Runtime updates are selected by display_name on the v1.3.1 source baseline. A display name is not a unique resource identity, so an update can target an arbitrary same-name Reasoning Engine.
Baseline: 5a306f8956cb1eeae69f9709de0e4d61b44e11e7 (v1.3.1).
Reproduction
- Deploy an
agent_runtimeproject and keep its generateddeployment_metadata.json. - Create a second Reasoning Engine in the same project/location with the same display name.
- Run
agents-cli deployagain. - Separately, remove the metadata file and repeat with 0, 1, and 2 same-name resources.
Actual behavior
The baseline lists by display name and uses the first match. With duplicate names, selection depends on list order and a mutation may be sent to the wrong resource.
Expected behavior
- If
deployment_metadata.json.remote_agent_runtime_idexists, fetch exactly that resource by ID. - Before mutation, validate its project number, location, deployment target, resource name, and actual display name.
- Reject stale or inconsistent metadata.
- Only without usable metadata: create for 0 matches, update for exactly 1 match, and reject 2+ matches before any create/update API call.
- Revalidate after acquiring the local deployment-operation claim so a concurrently changed target cannot be mutated.
Minimal fix
Resolve the target in one shared selector that prefers the recorded resource ID and fails closed on every mismatch. Treat display-name lookup only as the metadata-free fallback and require it to be unambiguous. Atomically update metadata only after a successful mutation.
Reference implementation and regressions: fork Batch 4 branch.
Verification evidence
- Targeted identity/lifecycle suite: 35 tests passed under a fresh reviewer; full local suite: 92 passed.
- Multiple same-name case asserted zero calls to create/update/identity-create.
- Disposable isolated GCP project acceptance:
- create returned one recorded resource ID;
- update retained the same resource ID;
- after temporarily removing metadata and creating a second same-name resource, the CLI rejected before mutation;
- cleanup found 0 Reasoning Engines and 0 unfinished operations;
- project lifecycle was confirmed as
DELETE_REQUESTED.
ruff check src tests,ty check src, build, and Python 3.11/3.13 installed-wheel smoke tests passed.
- Lingua principale
- Python
- Stelle
- 6k
- Fork
- 670
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di google/agents-cli
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
google/agents-cli#86 ·
-
google/agents-cli#91 · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
google/agents-cli#85 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
google/agents-cli#84 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
google/agents-cli#83 · 2 commenti · 1 reazione ·
Tutte le issue di google/agents-cli
Issue simili
-
area: harness bug status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Human-Agent-Society/reef#625 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
learningequality/kolibri#15351 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Name consistency Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eellak/triplestore#65 · 1 commento ·