DiscordChatExporter/docs/plans/2026-06-04-061-refactor-scrape-lock-lib-plan.md
Copilot a88cd815f4 refactor(scrape): extract shared scrape-lock library
Centralize archive-root lock path, held checks, holder formatting, and
reclaim helpers in scripts/lib/scrape-lock.sh. Source it from the host
runner, lock status script, and operator wrappers to remove duplicated
logic. Update documents-scrape smoke fake repo to include the new lib.
2026-06-03 07:14:22 -05:00

1 KiB

title type status date origin
refactor: Shared scrape-lock library refactor active 2026-06-04 /lfg — lock path and gate logic duplicated across host runner, status script, validation, documents scrape

refactor: Shared scrape-lock library

Summary

Extract scripts/lib/scrape-lock.sh and source it from lock-related scripts to keep archive-root lock behavior consistent.

Requirements

ID Requirement
R1 lib/scrape-lock.sh provides resolve, held check, holder formatting, reclaim helpers
R2 scrape-lock-status.sh and run-discord-scrape-host.sh source the library
R3 run-documents-scrape.sh and run-operator-validation.sh use shared ensure_scrape_lock_available
R4 run-all-smokes.sh passes (21 smokes)

Implementation Units

U1. Library extraction

Files: scripts/lib/scrape-lock.sh, consumers listed above

U2. Smoke gate

Verification: DCE_MIN_FREE_MB=0 ./scripts/run-all-smokes.sh

Scope Boundaries

Deferred

  • Live KotOR catch-up on host