feat(api): add installation-scoped bulk agent pause/dry-run endpoint - #8144
Conversation
A hosted tenant with multiple repos under one installation had no way to pause/dry-run all of them at once -- only the strictly per-repo PUT /v1/repos/:owner/:repo/settings existed. Adds PUT /v1/app/ installations/:id/agent/bulk-settings, applying agentPaused/ agentDryRun across every currently-installed repo in the installation in one call. Reuses the existing /v1/app/installations* tenant-scoping (resolveAppInstallationScope / installationRecordInScope), so a tenant can never bulk-write another tenant's installation. Distinct from the global operator kill-switch, which stays untouched. Closes #7676.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8144 +/- ##
==========================================
- Coverage 92.03% 90.11% -1.92%
==========================================
Files 764 98 -666
Lines 77520 25151 -52369
Branches 23430 4702 -18728
==========================================
- Hits 71346 22665 -48681
+ Misses 5062 2214 -2848
+ Partials 1112 272 -840
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-23 04:53:11 UTC
Review summary Nits — 6 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
PUT /v1/app/installations/:id/agent/bulk-settings, applyingagentPaused/agentDryRunacross every currently-installed repo in a tenant's installation in one call — previously only strictly per-repo viaPUT /v1/repos/:owner/:repo/settings.resolveAppInstallationScope/installationRecordInScope): an operator can write any installation; a non-operator session only their own — enforced before any write.getGlobalAgentFrozenState), untouched by this.installation.agent_bulk_settings_updated), distinct from both per-repo edits (repo.settings_updated) and the kill-switch's own event.Closes #7676.
Test plan
test/integration/app-installations-selfservice.test.ts: auth/role rejection, invalid installation id / unknown installation / malformed body (incl. genuinely unparseable JSON) / unrecognized field, tenant-isolation (never lets tenant A touch tenant B's installation, enforced pre-write), applies across every installed repo and only those repos, partial-field updates preserve the other flag, no-op for zero-repo installations, operator bypass with its own audit event.npx tsc --noEmitnpm run ui:openapi:check/npm run ui:openapi:settings-parity— cleannpm run test:coverage(unsharded, full suite) — cleannpm audit --audit-level=moderate— 0 vulnerabilitiesnpm run engine-parity:drift-check/npm run manifest:drift-check— clean