MCPcopy
hub / github.com/coder/mux / acknowledgeUser

Method acknowledgeUser

src/node/services/workspaceGoalService.ts:2441–2462  ·  view source on GitHub ↗
(workspaceId: string)

Source from the content-addressed store, hash-verified

2439 }
2440
2441 async acknowledgeUser(workspaceId: string): Promise<GoalRecordV1 | null> {
2442 assert(workspaceId.trim().length > 0, "acknowledgeUser requires workspaceId");
2443 return this.fileLocks.withLock(workspaceId, async () => {
2444 const current = await this.readGoalFile(workspaceId);
2445 if (!current) {
2446 await this.pushSnapshot(workspaceId, null);
2447 return null;
2448 }
2449 if (current.requireUserAcknowledgmentSinceMs == null) {
2450 await this.pushSnapshot(workspaceId, current);
2451 return current;
2452 }
2453
2454 const next = this.applyMutableFields(current, {
2455 workspaceId,
2456 requireUserAcknowledgmentSinceMs: null,
2457 });
2458 await this.writeGoal(workspaceId, next);
2459 await this.pushSnapshot(workspaceId, next);
2460 return next;
2461 });
2462 }
2463
2464 async requireUserAcknowledgmentForCrashRecovery(
2465 workspaceId: string,

Calls 6

readGoalFileMethod · 0.95
pushSnapshotMethod · 0.95
applyMutableFieldsMethod · 0.95
writeGoalMethod · 0.95
withLockMethod · 0.80
assertFunction · 0.50

Tested by

no test coverage detected