fix(shared-ols): watcher exec bit (CI 6313), coalesce floor-window edits, harden test #63

Merged
jknapp merged 2 commits from fix/ols-watcher-test-2026-11-24 into trunk 2026-11-24 16:30:24 +00:00
2 Commits
Author SHA1 Message Date
shadowdaoandClaude Sonnet 5.5 432741d6a4 fix(shared-ols): watcher uses monotonic $SECONDS, stamps restart attempts, no fork per drained event
- floor wait was based on wall-clock date: a backward clock step could stretch
  the deferral far past FLOOR; $SECONDS is monotonic and bounds it to FLOOR.
- $(date) forked on every drained event; under unrelated churn that burned CPU
  for up to FLOOR seconds. Builtin $SECONDS needs no fork.
- last_restart is stamped on every attempt so a failing lswsctrl is limited to
  one try per FLOOR instead of retrying on each event.
- IFS= read -r so path names with leading/trailing whitespace are not trimmed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-24 08:29:18 -08:00
shadowdaoandClaude Sonnet 5.5 b395a198b1 fix(shared-ols): watcher executable bit, coalesce floor-window edits, harden test
CI run 6313 Shell-Checks failed "plain site docRoot .htaccess triggers (+0)":
the watcher was tracked as mode 100644 (the image chmods it, a bare CI
checkout does not), so `env ... ols-htaccess-watcher.sh` died with
"Permission denied" and no case ever restarted. Not a watcher logic bug.

- watcher: mode 100755
- watcher: an edit inside the FLOOR window is deferred to the end of the
  window (one coalesced restart, bounded by FLOOR) instead of dropped
- test: assert executable bit, launch via bash, kill children before parent
  (leaked inotifywait/subshell from earlier sections), add floor/coalesce cases

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-24 08:17:13 -08:00