You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A second --resume of a crawl held by a live owner keeps crawling it #1026
Follow-up to #946. The crawl lease makes a second process that --resumes a crawl whose live owner already holds the lease only yield its heartbeat (the lease writer is a compare-and-set), but it keeps crawling. Two processes can then write one crawl at the same time.
This is not a deletion path (the lease keeps the crawl from being retired); it is duplicate work and interleaved writes to one crawl.
Acceptance Criteria
squirrel audit --resume (and crawl) on a crawl held by a live owner, fresh heartbeat on this host or another, does not continue crawling it as a second writer: it either starts a new crawl or stops with a message naming the owner pid and host
A crawl whose owner is gone (dead pid on this host, or stale heartbeat) is still resumed and takes the lease over, as today
A test covers two concurrent resumes of one crawl
Docs for --resume describe the behaviour; CHANGELOG has an entry
I would like to take this. I will trace the resume/lease handoff in both audit --resume and crawl, make a live owner prevent a second writer while preserving stale/dead-owner takeover, add a concurrent-resume regression, and update the resume docs plus changelog.
Implemented by commit 1966e24 and included in release batch #1149 / v0.0.134. The shipped change gates both audit --resume and crawl --resume, preserves stale and exited same-host takeover, adds the two-process claim regression, and updates the resume docs and changelog. This issue can be closed.
Accepted (2026-10-27): fixed by 1966e24 ("fix(crawler): gate concurrent crawl resumes"), first shipped in v0.0.134.
A live owner is not resumed as a second writer.crawlLease.claim() gates audit --resume and crawl --resume (apps/cli/src/controllers/audit.ts, controllers/crawl.ts). A claim that fails starts a new crawl and warns with the owner's pid and host (formatResumeClaimWarning, apps/cli/src/audit/crawl-lease.ts).
A gone owner is still taken over. A stale heartbeat or a dead same-host pid is claimed. packages/crawler/tests/crawl-lease.test.ts has "claim takes over a stale or same-host dead owner".
Concurrent test. "two concurrent same-host resumes cannot both claim one live crawl" runs a child process (tests/fixtures/crawl-lease-claim-child.ts).
Activity
WilliamK112 commentedon Oct 24, 2026
I would like to take this. I will trace the resume/lease handoff in both
audit --resumeandcrawl, make a live owner prevent a second writer while preserving stale/dead-owner takeover, add a concurrent-resume regression, and update the resume docs plus changelog.WilliamK112 commentedon Oct 27, 2026
Implemented by commit
1966e24and included in release batch #1149 / v0.0.134. The shipped change gates bothaudit --resumeandcrawl --resume, preserves stale and exited same-host takeover, adds the two-process claim regression, and updates the resume docs and changelog. This issue can be closed.nc9 commentedon Oct 27, 2026
Accepted (2026-10-27): fixed by 1966e24 ("fix(crawler): gate concurrent crawl resumes"), first shipped in v0.0.134.
crawlLease.claim()gatesaudit --resumeandcrawl --resume(apps/cli/src/controllers/audit.ts,controllers/crawl.ts). A claim that fails starts a new crawl and warns with the owner's pid and host (formatResumeClaimWarning,apps/cli/src/audit/crawl-lease.ts).packages/crawler/tests/crawl-lease.test.tshas "claim takes over a stale or same-host dead owner".tests/fixtures/crawl-lease-claim-child.ts).docs/cli/audit.mdx("Resume an interrupted crawl") anddocs/cli/crawl.mdx, and a CHANGELOG entry naming A second --resume of a crawl held by a live owner keeps crawling it #1026.Closing.