Repository navigation
fix(storage): skip the full startup permission walk after one clean pass (#878) #885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import { execFileSync } from "node:child_process"; | ||
| import { createHash, randomUUID } from "node:crypto"; | ||
| import { readdirSync, readFileSync, rmSync } from "node:fs"; | ||
| import { readdirSync, readFileSync, rmdirSync, rmSync } from "node:fs"; | ||
| import { join } from "node:path"; | ||
| import { isPidAlive, readProcessStartTime } from "./rpc-utils"; | ||
| import { | ||
|
|
@@ -136,5 +136,10 @@ export function withStorageFileMutex<T>(directory: string, work: () => T, timeou | |
| return result; | ||
| } finally { | ||
| rmSync(ownPath, { force: true }); | ||
| try { | ||
| rmdirSync(directory); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This cleanup can make a contender fail with Prompt for AI agents |
||
| } catch { | ||
| // Do not remove a live contender's ticket. | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3:
lockednow removes only the fixed${path}.tmp, so a legacy random-name fence temp can remain indefinitely when startup is certified. Sweep legacy names on certified startup or invalidate the permission marker when this format changes.Prompt for AI agents