feat(clients): sessions+registry+optimize+armor: close gaps, loud list truncation, shared Gemini adapter
sessions: operations get/list/cancel/delete/wait for engine, session, memory and serving profile; servingProfiles CRUD. registry: ListResult with truncated flag, v1alpha twins, gateway/policy operations, authz IAM, deny policy update, boundary patch/bindings. optimize: make_gemini_model over models::VertexModel (DirectModel removed), generateSyntheticData, online evaluator operations, trace/log writers. armor: SecurityAdmin for all SCC v2 methods (attack exposure excluded), documented agent threat categories, floor settings fixed to location global after live run. check_discovery.py of all four enforce coverage. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -111,6 +111,21 @@ ENUM_VALUES = [
|
||||
]
|
||||
|
||||
|
||||
# Coverage: every Discovery method with one of these id prefixes must be a
|
||||
# table row or be listed in EXCLUDED with its reason.
|
||||
COVERED = [
|
||||
('aiplatform', 'v1', ['aiplatform.projects.locations.evaluat',
|
||||
'aiplatform.projects.locations.generate',
|
||||
'aiplatform.projects.locations.onlineEvaluators']),
|
||||
('cloudtrace', 'v1', ['']),
|
||||
('cloudtrace', 'v2', ['']),
|
||||
('logging', 'v2', ['logging.entries']),
|
||||
]
|
||||
EXCLUDED = {
|
||||
'logging.entries.tail': 'server-streaming RPC with no end; this module has no unbounded stream (hard caps rule)',
|
||||
}
|
||||
|
||||
|
||||
def fetch(url):
|
||||
with urllib.request.urlopen(url, timeout=60) as r:
|
||||
return json.load(r)
|
||||
@@ -156,6 +171,12 @@ def main():
|
||||
want_query = sorted(k for k, v in m.get('parameters', {}).items() if v['location'] == 'query')
|
||||
if sorted(x for x in query_csv.split(',') if x) != want_query:
|
||||
errors.append('%s: query params differ from discovery' % rpc_id)
|
||||
declared = {(r[3], r[4], r[0]) for r in rows}
|
||||
for svc, ver, prefixes in COVERED:
|
||||
for m in methods(docs[(svc, ver)]):
|
||||
if any(m['id'].startswith(p) for p in prefixes) and (svc, ver, m['id']) not in declared \
|
||||
and m['id'] not in EXCLUDED:
|
||||
errors.append('discovery method %s is not in the table' % m['id'])
|
||||
for svc, ver, schema, fields in SCHEMA_FIELDS:
|
||||
s = docs[(svc, ver)]['schemas'].get(schema)
|
||||
if s is None:
|
||||
|
||||
Reference in New Issue
Block a user