Unit tests for detecting the Docker socket, the running jar, the hostname and the state directory (v1.34.4) #107

Merged
mi merged 1 commits from mihoe/environment-probes into main 2026-10-04 12:23:50 +02:00
Owner

Third Mutation-CRAP refactoring: the environment probes.

  • DockerSocketLocator: seams for env, path existence, socket group; candidate holds the rule order (56 -> 5.1).
  • InitCommand.jarPathOf (runningJarPath 56 -> 6), HostingEnvironments.hostnameOf (readHostname 42 -> 2).
  • StateHome.of: the one XDG_STATE_HOME rule, used by metrics, nginx default, artifact store.
  • Nightly gate maxMutationCrap 57 -> 47 (highest left: BuildExecutor.runBuildCommands 46.55).

PR-doc: docs/prs/2026-10-04-PR#107-environment-probes.md

🤖 Generated with Claude Code

Third Mutation-CRAP refactoring: the environment probes. - `DockerSocketLocator`: seams for env, path existence, socket group; `candidate` holds the rule order (56 -> 5.1). - `InitCommand.jarPathOf` (runningJarPath 56 -> 6), `HostingEnvironments.hostnameOf` (readHostname 42 -> 2). - `StateHome.of`: the one XDG_STATE_HOME rule, used by metrics, nginx default, artifact store. - Nightly gate `maxMutationCrap` 57 -> 47 (highest left: BuildExecutor.runBuildCommands 46.55). PR-doc: `docs/prs/2026-10-04-PR#107-environment-probes.md` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
mi added 1 commit 2026-10-04 12:17:21 +02:00
DockerSocketLocator.locate and InitCommand.runningJarPath (56 each),
readHostname and stateHome (42) read the host directly. Their rules move
into candidate, jarPathOf, hostnameOf and StateHome.of, reached through
seams; the state-directory rule written out three times is one. Nightly
gate 57 -> 47.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi changed title from What Werkator asks the host is decided by rules with tests (v1.34.4) to Unit tests for detecting the Docker socket, the running jar, the hostname and the state directory (v1.34.4) 2026-10-04 12:23:28 +02:00
mi merged commit fadbcd305f into main 2026-10-04 12:23:50 +02:00
mi deleted branch mihoe/environment-probes 2026-10-04 12:23:50 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkator#107