You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a968a6e
Browse filesBrowse the repository at this point in the historyBrowse files
Degrade inferred OpenAPI action_id collisions instead of crashing the scan (#226)
A valid third-party OpenAPI spec (block/goose) crashed `agents-shipgate
scan` with `exit 2 / Config error: Duplicate action_surface action_id`.
The OpenAPI action_id is derived from METHOD + normalized path only —
the operationId is dropped — so two distinct operations whose paths
normalize identically (goose ships `GET /sessions/{session_id}` plus a
trailing-slash variant, each with its own operationId) collapse to one
action_id and hard-fail the duplicate-id guard.
Make this fail-soft, matching the symlink-loop (#212) and MCP-as-tools
(#214) precedent: a third-party spec must never crash a scan.
- build_action_surface_facts takes an optional `warnings` sink. On the
live scan path, collisions between purely INFERRED ids (e.g. OpenAPI
method+path normalization) are disambiguated deterministically (first
operation by tool_name keeps the bare id, the rest gain a
`#<operationId>` suffix, ordinal fallback on ties), the identity_hash is
refreshed, and one warning is recorded per collision.
- A collision that touches a manifest-authored action identity stays a
hard ConfigError on both paths — a declared id is a contract, never
silently rewritten. "Manifest-authored" means any action_surface
declaration that sets an explicit action_id component: `id`, `provider`,
or `operation` (all three feed build_action / _provider / _operation).
Without a sink the legacy ConfigError is preserved for all collisions,
so the redaction path's public-only ordinal disambiguator is untouched.
- Thread the warnings from Phase 5 into report.source_warnings (appended
last, so byte-stable for the common no-collision case). A source_warning
routes the release to review_required rather than crashing.
- Add network-free regression tests: inferred OpenAPI collisions degrade;
explicit collisions via `id` and via `provider`/`operation` still raise
on both the no-sink and warnings-sink paths; plus a full run_scan
integration test on the goose-shaped fixture.
0 commit comments