[object Object]

← back to Designer Wallcoverings

enrich-full.py: lock-guard exits 75 (busy) not 0, so supervise.sh retries instead of false-concluding completion when a sibling holds the lock

e830c243aa1dad67dccf69c5b8d74594664fa919 · 2026-07-01 14:48:25 -0700 · Steve

Files touched

Diff

commit e830c243aa1dad67dccf69c5b8d74594664fa919
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Jul 1 14:48:25 2026 -0700

    enrich-full.py: lock-guard exits 75 (busy) not 0, so supervise.sh retries instead of false-concluding completion when a sibling holds the lock
---
 onboarding/sangetsu-lilycolor/scripts/enrich-full.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/onboarding/sangetsu-lilycolor/scripts/enrich-full.py b/onboarding/sangetsu-lilycolor/scripts/enrich-full.py
index bf20bc6c..f9b424c5 100644
--- a/onboarding/sangetsu-lilycolor/scripts/enrich-full.py
+++ b/onboarding/sangetsu-lilycolor/scripts/enrich-full.py
@@ -223,9 +223,13 @@ def main():
     try:
         fcntl.flock(_lock_fh, fcntl.LOCK_EX | fcntl.LOCK_NB)
     except OSError:
+        # Exit NON-zero (busy) so a supervisor treats this as "retry later", not
+        # completion. A clean exit(0) here would make supervise.sh's "rc==0 + no
+        # new rows" check false-conclude the job is done while a sibling run holds
+        # the lock. 75 = EX_TEMPFAIL (try again).
         print(f"[guard] another enrich-full.py is already running for "
-              f"{os.path.basename(out_path)} — exiting without stacking.", flush=True)
-        sys.exit(0)
+              f"{os.path.basename(out_path)} — exiting busy (retry later).", flush=True)
+        sys.exit(75)
     _lock_fh.write(str(os.getpid()) + "\n"); _lock_fh.flush()
     globals()["_ENRICH_LOCK_FH"] = _lock_fh  # keep ref alive so lock persists
 

← 8beec0f6 recover: single supervised local-cache Lily enrichment (Henr  ·  back to Designer Wallcoverings  ·  merge-staging: read canonical enrichment-full-063026A.final. 2eb75f4c →