Bot wiring — installations, scopes and resource audit
Studio Integrations → Bot wiring (tab=wiring) reads the existing forge integrations, schedules, inbound webhooks and trigger subscriptions. The repository and bot groupings link to the same /repos/:key page, with installation and optional bot query parameters. Bot Home links to the bot-filtered inventory. No second wiring store or execution resolver is added.
Repository-first navigation and search
Ordinary Integrations visits start at Bot wiring. The repository selector in Bot wiring and Repositories uses the same per-user/team context as the sidebar; "All repositories" restores the overview. Filtering uses connection + full repository name, never a basename or provider alone. Linked schedules and webhooks use installation/webhook IDs; subscriptions with only a repo name remain in the explicit team overview. Account settings remain team-wide and collapsed, with per-connection counts instead of a second prominent repo list. OAuth/App returns and the manual setup anchor keep their accounts destination. An initial repository-inventory failure hides scoped lists, not team accounts or connection setup. A failed background refresh keeps the last known scope with an explicit warning and preserves mounted forms and their drafts. The interface labels and messages are English.
Bots and Marketplace share catalogSearch: exact title/name, prefix, substring, then description/tags. Search results are flat so category or team/catalog buckets cannot override relevance. Marketplace fetches the complete permitted matching list before ranking; explicit Popular, Recent and Name sorts remain available. Without a search, existing browse groupings remain.
Identity and scope
Team, connection, repository and installation identify the context. A stale installation link must not silently open its replacement. RepoDetail refuses an explicit installation ID that no longer matches; its selector never falls back to another ID. A bot filter changes the reading, not the scope of shared settings. Forms remount at installation/team boundaries; per-bot forms also remount on bot changes. The inventory normalizes null or omitted bot/event lists to empty lists: connector-ingress webhooks legitimately have no direct bot list. This does not invent a binding; default-bot and wildcard webhook rules still participate in the bot filter.
launch_varsandroutingbelong to the integration and affect its bots. Variable writes keep the existing drop-pin refusal and explicit replacement gesture; they do not resend the bot list. Routing preserves pending org approval and warning responses.bot_triggers[bot]belongs to the issue lane of one bot on one installation, not its PR-review lane. Its variables override shared ones on that lane. PATCH sends only that bot entry; other bot entries are kept by the server.labels: nullfollows the manifest,[]accepts any label.- The secret satellite reads setup metadata, restricted to the exact installation/webhook IDs plus team/bot defaults. It omits personal and subscription sources, which belong to other launch contexts. No values, suffixes or fingerprints are displayed.
- Schedules, webhooks and subscriptions remain individually addressable, including ones without a repository. Their management links filter by the resource ID; a same-name repository is not an installation identity.
The surcharge counter counts declared variable keys, top-level routing keys and per-bot trigger entries. It does not count effective differences or claim to resolve model funding. Pool, label and concurrency declarations are listed separately. Technical JSON editors reuse existing validated commands; this lot does not add a generic editor for every backend policy.
Audit
GET /api/teams/{id}/audit?target=forge_integration&target_id=… intersects target kind and ID with the existing team/admin gate before pagination, in both memory and Mongo. Mongo uses a tenant/resource/recent compound index so a short or empty resource history does not scan the tenant’s whole log. The same optional filters work on existing org and platform routes without weakening their gates. The resource satellite loads on expansion, paginates, and renders only action, actor and timestamp. It rejects an unscoped page from an older server instead of displaying it.
The journal is best-effort, with existing retention and writers. It shows recorded operations, not a transactional ledger, a complete before/after history, or a run's sealed configuration. A missing store/failing inventory is unavailable, never evidence of no activity. Subscription routes currently emit no control-plane audit rows, so the inventory explicitly marks their audit unavailable instead of offering an empty history.
Proof
The reference scenario uses Revi on two fictitious repositories: both axes lead to exact installation links; A's draft cannot become B's write; shared and issue-lane scopes remain explicit; read-only users get no save action; save failures survive collapsing the satellite. Audit tests interleave tenants, kinds and IDs before paging. No production bot launch is needed.
