Skip to content

fix(monitor): queue sweep admissions and stamp holder start on wall time - #18

Merged
Portll merged 1 commit into
mainfrom
port/sweep-admission-queue
Nov 27, 2026
Merged

Portll merged 1 commit into
mainfrom
port/sweep-admission-queue

Conversation

@Portll

@Portll Portll commented Nov 27, 2026

Copy link
Copy Markdown
Owner

A start derived from process.uptime() stops during sleep.

Consequences:

  • Every live permit holder then read as a reused pid and each arriving sweep broke the slot.

Fix:

Stamp performance.timeOrigin, act on a start mismatch only past a grace longer than the refresh interval, admit waiters in arrival order, coalesce same-scope arrivals, and await the lane child to keep the permit refreshing.

A start derived from process.uptime() stops during sleep. Every live
permit holder then read as a reused pid and each arriving sweep broke the slot.
Stamp performance.timeOrigin, act on a start mismatch only past a grace
longer than the refresh interval, admit waiters in arrival order, coalesce
same-scope arrivals, and await the lane child to keep the permit refreshing.
Comment thread monitor/sweep-queue.mjs
// The permits beside the queue, read the way the next acquirer will read them.
export function readSlots(reportsRoot, { prefix = 'sweep', kill, liveStart } = {}) {
let names;
try { names = readdirSync(reportsRoot).filter((n) => new RegExp(`^\\.${prefix}-slot-\\d+\\.lock$`).test(n)).sort(); }
@Portll
Portll merged commit ebb980f into main Nov 27, 2026
20 of 29 checks passed
@Portll
Portll deleted the port/sweep-admission-queue branch November 27, 2026 08:10
Portll added a commit that referenced this pull request Nov 27, 2026
Run CodeQL's `actions` extractor as a tenth lane, sast-codeql-actions,
over .github/workflows and action.yml in groups all and deep. The nine
language lanes never read a workflow file: a `run:` step that
interpolates an untrusted event field was reachable only through zizmor.

The lane uses build-mode none, needs no container and took 22s on a
three-finding canary. Its results carry no `level`; the rule default
supplies it. Coverage is recorded as unmeasurable because the extractor
publishes no file list.

Add the matching `actions` job to this repository's own CodeQL workflow
as a separate job, keeping the JavaScript job's name unchanged.

Refs: #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants