chore: improve engineering excellence - #59
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: baa33468-0d83-443b-8f47-de96eb9c46e7
There was a problem hiding this comment.
Pull request overview
This PR tightens correctness and reliability around server JAR installation and container entrypoint configuration, and backs it up with targeted tests and CI enforcement consistent with an engineering-excellence hardening pass.
Changes:
- Make server JAR installs safer by downloading to a temp file, verifying checksums before replacing
server.jar, and backing up/restoring on failures. - Harden
entrypoint.shconfiguration substitution (escaping + newline rejection) and require an explicitRCON_PASSWORD, with a shell test added to CI. - Improve reliability/strictness in CI and backup logic (tighter tidy check; ensure tar input files are closed with error propagation).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/entrypoint_test.sh | Adds a shell test validating entrypoint.sh escaping for RCON password and MOTD. |
| README.md | Updates Java version messaging and makes RCON_PASSWORD explicitly required with guidance. |
| internal/server/fabric.go | Avoids silent rename failure by returning an error; factors out installer versions URL. |
| internal/server/fabric_test.go | Adds regression coverage to ensure existing server.jar is restored on Fabric rename failure. |
| internal/server/download.go | Makes JAR downloads atomic and introduces structured backup/restore behavior. |
| internal/server/download_test.go | Adds tests for atomic replacement and preservation of existing JAR on checksum failure. |
| internal/management/backup.go | Ensures file handles are closed and close errors are surfaced after tar copy. |
| entrypoint.sh | Requires RCON_PASSWORD, adds escaping/newline validation, and refactors server.properties templating into a function. |
| .github/workflows/dependency-check.yml | Makes go mod tidy drift a hard failure via git diff --exit-code. |
| .github/workflows/ci.yml | Expands path filters and runs ShellCheck + entrypoint configuration test in CI. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@copilot resolve the merge conflicts on this branch. |
…xcellence-audit # Conflicts: # internal/server/download.go # internal/server/download_test.go Co-authored-by: KevinTCoughlin <706967+KevinTCoughlin@users.noreply.github.com>
Co-authored-by: KevinTCoughlin <706967+KevinTCoughlin@users.noreply.github.com>
Resolved in 968ea40. Merged |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Summary
Validation
git diff --checkpassedHardware-, platform-, or live-infrastructure-dependent checks are documented in the changed project guidance where applicable.