Skip to content

Commit 8006895

Browse files
committed
fix: remove duplicate assertSelectableAdapterType that shadowed async version
The sync version from upstream was duplicated alongside the fork's async version that includes the paperclip_runner rollout flag check. The sync version shadowed the async one, disabling the flag validation.
1 parent fbbac06 commit 8006895

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

server/src/routes/agents.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,30 +1607,6 @@ export function agentRoutes(
16071607
* A disabled adapter is one this instance cannot run — most often because a
16081608
* declarative registry (PAPERCLIP_ADAPTERS) curated it out, which
16091609
* reconcileAdapterAvailability turns into a disabled type at boot. Registered
1610-
* but disabled still passes assertKnownAdapterType, so an agent could be
1611-
* created on it and then fail EVERY run at lease time with
1612-
* `Adapter "..." is not in the configured adapter registry` — an error that
1613-
* arrives minutes later, in a run log, with no way back to the choice that
1614-
* caused it. Refuse at selection time instead, and name what can be chosen.
1615-
*
1616-
* Existing agents on a now-disabled adapter are deliberately untouched
1617-
* (listEnabledServerAdapters documents the same rule: hidden from selection,
1618-
* still functional for agents that already use them).
1619-
*/
1620-
function assertSelectableAdapterType(type: string | null | undefined): string {
1621-
const adapterType = assertKnownAdapterType(type);
1622-
const disabled = new Set(getDisabledAdapterTypes());
1623-
if (!disabled.has(adapterType)) return adapterType;
1624-
const available = listServerAdapters()
1625-
.map((a) => a.type)
1626-
.filter((t) => !disabled.has(t))
1627-
.sort();
1628-
throw unprocessable(
1629-
`Adapter "${adapterType}" is not available on this instance. `
1630-
+ `Available adapters: ${available.length > 0 ? available.join(", ") : "(none configured)"}`,
1631-
);
1632-
}
1633-
16341610
async function assertAgentDefaultEnvironmentSelection(
16351611
companyId: string,
16361612
environmentId: string | null | undefined,

0 commit comments

Comments
 (0)