Repository navigation
chore: add hadolint linting for Containerfiles (#122) - #124
Merged
Merged
Conversation
- Replace alpine:latest with alpine:3.21 - Add hadolint ignore directive for DL3018 - Merge apk add and mkdir into a single RUN layer Refs: #122
This was referenced Feb 21, 2026
c-vigo
added a commit
that referenced
this pull request
Feb 21, 2026
…#136) ## Description Install tmux in the container image so that autonomous worktree agents can run in detached tmux sessions that survive Cursor session disconnects. Without tmux, `just worktree-start` fails the prerequisite check and autonomous TDD workflows cannot complete. ## Type of Change - [ ] `feat` -- New feature - [ ] `fix` -- Bug fix - [ ] `docs` -- Documentation only - [x] `chore` -- Maintenance task (deps, config, etc.) - [ ] `refactor` -- Code restructuring (no behavior change) - [x] `test` -- Adding or updating tests - [ ] `ci` -- CI/CD pipeline changes - [ ] `build` -- Build system or dependency changes - [ ] `revert` -- Reverts a previous commit - [ ] `style` -- Code style (formatting, whitespace) ### Modifiers - [ ] Breaking change (`!`) -- This change breaks backward compatibility ## Changes Made - **Containerfile**: Add `tmux` to the `apt-get install` block alongside existing system dependencies - **tests/test_image.py**: Add `"tmux": "3.3"` to `EXPECTED_VERSIONS` dict - **tests/test_image.py**: Add `test_tmux_installed` — verifies tmux apt package is installed - **tests/test_image.py**: Add `test_tmux_version` — verifies `tmux -V` returns expected version - **tests/test_image.py**: Add `test_tmux_detached_session_survives` — creates a detached session, verifies it in `tmux list-sessions`, confirms the background process is running via PID check - **CHANGELOG.md**: Add entry under `## Unreleased` → `### Added` ## Changelog Entry ### Added - **tmux installed in container image for worktree session persistence** ([#130](#130)) - Add `tmux` to the Containerfile `apt-get install` block - Enables autonomous worktree agents to survive Cursor session disconnects ## Testing - [x] Tests pass locally (`just test-image`) — 35 passed, 0 failed - [x] Manual testing performed (describe below) ### Manual Testing Details ``` $ just test-image ======================== 35 passed in 77.95s (0:01:17) ========================= ``` All 3 new tmux tests pass: - `test_tmux_installed` — confirms `host.package("tmux").is_installed` - `test_tmux_version` — confirms `tmux -V` contains `3.3` - `test_tmux_detached_session_survives` — creates detached session, verifies via `tmux list-sessions` and PID liveness check ## Checklist - [x] My code follows the project's style guidelines - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have updated the documentation accordingly (edit `docs/templates/`, then run `just docs`) - [x] I have updated `CHANGELOG.md` in the `[Unreleased]` section (and pasted the entry above) - [x] My changes generate no new warnings or errors - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [x] Any dependent changes have been merged and published ## Additional Notes - The `hadolint-docker` pre-commit hook (added in #122/#124) was skipped locally via `SKIP=hadolint-docker` because it requires a Docker daemon and the project uses Podman. Issue #122 has been reopened with a comment describing the problem. CI will run hadolint independently. - TDD compliance: failing tests committed first (`9cfceed`), then implementation (`5358f40`), then changelog (`caebb7b`). Refs: #130
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add hadolint static analysis for all Containerfiles in the repository. Hadolint enforces Dockerfile best practices (pinned base image tags, consolidated
RUNlayers, shellcheck for inlineRUNscripts) and integrates seamlessly via pre-commit.Type of Change
feat-- New featurefix-- Bug fixdocs-- Documentation onlychore-- Maintenance task (deps, config, etc.)refactor-- Code restructuring (no behavior change)test-- Adding or updating testsci-- CI/CD pipeline changesbuild-- Build system or dependency changesrevert-- Reverts a previous commitstyle-- Code style (formatting, whitespace)Modifiers
!) -- This change breaks backward compatibilityChanges Made
.pre-commit-config.yaml: Addhadolint-dockerhook pinned to SHA346e4199e4baca7d6827f20ac078b6eee5b39327(v2.9.3). Runs againstContainerfileandtests/fixtures/sidecar.Containerfile.tests/fixtures/sidecar.Containerfile: Pin base image tag, consolidateRUNlayers, add# hadolint ignore=DL3018for apk packages where pinning individual versions would be brittle.Changelog Entry
Added
hadolinthook to.pre-commit-config.yaml, pinned by SHA (v2.9.3)RUNlayers, shellcheck for inline scriptstests/fixtures/sidecar.Containerfileto pass hadolint with no warningsTesting
just test)Manual Testing Details
uv run pre-commit run --all-files— exits clean with no warnings.just build no_cache && just testpassed locally.Checklist
docs/templates/, then runjust docs)CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
The
Containerfile(main image) already passed hadolint without changes. Only the sidecar fixture required fixes.Refs: #122