Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(storage): make worktree cleanup work and show why it skipped #17563

Mergedmaria-rcksmerged 9 commits intomain fromrefs/pull/17563/headmerged by maria-rcks View on GitHub

Showing 26 changed files with 43 additions and 0 deletions (loading 23).

x
0 of 26 viewed, 26 left
41 additions and 0 deletionsapps/server/src/auth/RpcAuthorization.test.tsModified
View file
@@ -403,3 +403,44 @@
expect(handled).toBe(1);
}).pipe(Effect.scoped),
+​
+it.effect("denies manual cleanup before the handler without settings permission", () =>
+ Effect.gen(function* () {
+ const group = WsRpcGroup.omit(
+ ...[...WsRpcGroup.requests.keys()].filter(
+ (
+ tag,
+ ): tag is Exclude<
+ keyof typeof RPC_REQUIRED_SCOPES,
+ typeof WS_METHODS.serverRunStorageCleanup
+ > => tag !== WS_METHODS.serverRunStorageCleanup,
+ ),
+ );
+ let handled = false;
+ const client = yield* RpcTest.makeClient(group).pipe(
+ Effect.provide(
+ Layer.mergeAll(
+ group.toLayerHandler(WS_METHODS.serverRunStorageCleanup, () =>
+ Effect.sync(() => {
+ handled = true;
+ return {
+ trigger: "manual" as const,
+ startedAt: "2026-10-09T12:00:00.000Z",
+ finishedAt: "2026-10-09T12:00:00.000Z",
+ entries: [],
+ counts: { removed: 0, kept: 0, failed: 0 },