fleetd #664: run the daemon from run/fleetd.jar, not target/ #679

Closed
agent wants to merge 0 commits from worker/664-c12e95-3 into main
Member

Implements the agreed design (option 2b): separate the daemon's runtime jar path from Maven's build output.

  • scripts/redeploy-fleetd.sh: new BUILD_JAR (target/fleetd.jar) vs JAR (run/fleetd.jar); removed stage_built_jar/JAR_STAGED entirely; the swap now reuses swap_staged_jar (mv $BUILD_JAR onto $JAR, same filesystem, only after the old daemon is confirmed gone); new report_jar_state() prints the built and running jars as two separately labelled hash+mtime facts for --check; drain_gate_refusal() rewritten for behavioral accuracy under the new layout.
  • scripts/test-redeploy-fleetd.sh: updated fixtures/literals that referenced the old path or global, added test_report_jar_state_{agrees,differs,both_absent}, removed the two now-nonexistent-function tests.
  • deploy/fleetd.service, deploy/dev.ltms.fleetd.plist: ExecStart/plist path now run/fleetd.jar.
  • fleetd/pom.xml: comment above finalName updated; finalName itself untouched.
  • .claude/skills/fleets-status/SKILL.md: pgrep pattern now run/fleetd.jar.
  • .claude/skills/redeploy-fleetd/SKILL.md, CLAUDE.md: docs updated to the new path/behavior.
  • fleetd/.gitignore: added run/.

Option 2a (preloading drain classes) was not implemented, per the ticket.

Build: mvn clean install green in my own worktree — Tests run: 1928, Failures: 0, Errors: 0, Skipped: 0, BUILD SUCCESS. Verified a built runtime jar's inode/mtime/hash are unchanged across a full clean+install. Verified every process-locator pattern with a positive control (a simulated java process). Never ran scripts/redeploy-fleetd.sh itself, and never touched the live daemon.

Also found but out of scope, not fixed: scripts/rename-checkout.sh has the same shape (a PATTERN/JAR built from target/$JAR_NAME) — a one-off historical migration tool, not named by the ticket.

Not done (lead-only, per the brief): the wiki page checks — wiki/ is uninitialized in a worker worktree.

Implements the agreed design (option 2b): separate the daemon's runtime jar path from Maven's build output. - `scripts/redeploy-fleetd.sh`: new `BUILD_JAR` (`target/fleetd.jar`) vs `JAR` (`run/fleetd.jar`); removed `stage_built_jar`/`JAR_STAGED` entirely; the swap now reuses `swap_staged_jar` (mv $BUILD_JAR onto $JAR, same filesystem, only after the old daemon is confirmed gone); new `report_jar_state()` prints the built and running jars as two separately labelled hash+mtime facts for `--check`; `drain_gate_refusal()` rewritten for behavioral accuracy under the new layout. - `scripts/test-redeploy-fleetd.sh`: updated fixtures/literals that referenced the old path or global, added `test_report_jar_state_{agrees,differs,both_absent}`, removed the two now-nonexistent-function tests. - `deploy/fleetd.service`, `deploy/dev.ltms.fleetd.plist`: ExecStart/plist path now `run/fleetd.jar`. - `fleetd/pom.xml`: comment above `finalName` updated; `finalName` itself untouched. - `.claude/skills/fleets-status/SKILL.md`: pgrep pattern now `run/fleetd.jar`. - `.claude/skills/redeploy-fleetd/SKILL.md`, `CLAUDE.md`: docs updated to the new path/behavior. - `fleetd/.gitignore`: added `run/`. Option 2a (preloading drain classes) was not implemented, per the ticket. Build: `mvn clean install` green in my own worktree — Tests run: 1928, Failures: 0, Errors: 0, Skipped: 0, BUILD SUCCESS. Verified a built runtime jar's inode/mtime/hash are unchanged across a full clean+install. Verified every process-locator pattern with a positive control (a simulated java process). Never ran scripts/redeploy-fleetd.sh itself, and never touched the live daemon. Also found but out of scope, not fixed: scripts/rename-checkout.sh has the same shape (a PATTERN/JAR built from target/$JAR_NAME) — a one-off historical migration tool, not named by the ticket. Not done (lead-only, per the brief): the wiki page checks — wiki/ is uninitialized in a worker worktree.
agent added 1 commit 2026-10-03 21:06:58 +02:00
fleetd #664: run the daemon from fleetd/run/fleetd.jar, not target/
CI / shell-tests (pull_request) Failing after 8s
CI / contract (pull_request) Successful in 1m4s
CI / build (pull_request) Failing after 2m58s
a134eccc57
Separate Maven's output path (target/fleetd.jar) from the daemon's runtime
path (run/fleetd.jar), so a clean/install in the main clone can no longer
reach the jar a running daemon holds open. redeploy-fleetd.sh now swaps the
built jar onto the runtime path with a same-filesystem mv, only after the
old daemon is confirmed gone; --check reports the built and running jars
as two separately labelled hash+mtime facts. Updates every process-locator
pattern and runtime-path reference found by git grep, with a positive
control added for both running_pid()'s PATTERN and fleets-status's pgrep
pattern. fleetd/run/ is gitignored.
ltms closed this pull request 2026-10-03 21:14:02 +02:00
Some checks are pending
CI / shell-tests (pull_request) Failing after 8s
CI / contract (pull_request) Successful in 1m4s
CI / build (pull_request) Failing after 2m58s

Pull request closed

Sign in to join this conversation.