Repository navigation
Description
Problem
Checked: release/v0.2.25 at e9973c7 (every cited line is the same at 132ecc5), on 2026-10-03.
Owner direction (2026-10-03). "The git daemon is a stub that was meant to enable simple argocd integration." Its removal is its own item. Nothing in the repository reads from git:// (the only git:// text is a review-report test fixture, tests/test_review_report_summary.py:59 and :342), and Argo CD does not use it.
Argo CD does not use it. Every Application reads https://github.com/dan-petty/devops-cli.git (k8s/argocd/apps/root-app.yaml:12, infra-apps.yaml:12 and :36, llm-apps.yaml:12), as it has since 22bba04 (#38, v0.2.11). The daemon could not have served Argo CD's path anyway: it exports k8s/, which is not a repository.
What it does instead.
devops devcontainer post-startstarts it by default: step 7 (src/devops_cli/commands/devcontainer.py:1180-1183) readsDEVOPS_GIT_DAEMON_AUTOSTART, which defaults totrueand is set to"true"in both devcontainer configs.- It runs
git daemon --reuseaddr --detach --export-alloverk8s/andrepos/, or over the paths inDEVOPS_GIT_DAEMON_PATHS(:1221-1262). With no--listen, git daemon binds every address of the container on 9418. --export-allserves every clone under the gitignoredrepos/, private ones included, with no authentication, to anything that can reach the container's network.- Both devcontainer configs forward 9418 to the workstation (.devcontainer/devcontainer.json:74-82; template src/devops_cli/templates/devcontainer.json.j2:81, :108-111 and :113-122). In the template's non-minikube branch, 9418 is the only forwarded port, so every devcontainer devops-cli generates for another project forwards it too.
- Sharing clones between containers (feat(devcontainer): configure ollama extension for vllm 16gib service with gpt-oss:20b #722's "container repository synchronization") is what feat(repos): Add a gitea remote to every clone under repos/ #1090's Gitea remotes do, with authentication. Removing the daemon does not wait for them, because nothing uses it today.
- The pre-1.0 policy allows no obsolete shims (CLAUDE.md).
Every reference. Found with git grep -n -i -E 'git[ _-]?daemon|9418|DEVOPS_GIT_DAEMON' -- ':!CHANGELOG.md' ':!changelog.d' ':!docs/agent/tasks' ':!uv.lock':
- The code.
- src/devops_cli/commands/devcontainer.py:1180-1183: step 7 of post-start.
- devcontainer.py:1199-1262:
_git_daemon_pid_file,_is_git_daemon_runningand_start_git_daemon, withDEVOPS_GIT_DAEMON_PATHSread at :1231.
- The devcontainer template.
- src/devops_cli/templates/devcontainer.json.j2:45:
DEVOPS_GIT_DAEMON_AUTOSTART. - Template :81 and :108-111: 9418 in the minikube branch.
- Template :113-122: the non-minikube branch, which forwards only 9418.
- src/devops_cli/templates/devcontainer.json.j2:45:
- This repository's devcontainer. .devcontainer/devcontainer.json:45 and :74-82.
- The
bootstrap-gitopsdocstring. src/devops_cli/commands/argo.py:342 ("Bootstrap local GitOps project orchestration via ArgoCD and the Git daemon."), generated into docs/commands/argo.md:201 and docs/CLI_REFERENCE.md:1857. The command applies the root Application (argo.py:378-386) and never touched the daemon. - Docs. docs/DEVCONTAINER_USAGE.md:86-94: an example
forwardPortsandportsAttributeswith only 9418. - Argo CD's policy. k8s/argocd/networkpolicy.yaml:67 (the comment) and :81 (egress to 9418), and tests/test_k8s_network_policies.py:112-114, which asserts 9418 is open. The file is not applied in the homelab (feat(k8s): argo cd keeps the homelab cluster at the current release branch, with automated sync, prune and self-heal that never delete data #755 leaves it unsynced), but it would reopen the port when it is.
- Tests. tests/test_devcontainer.py:713-769 and :1244-1282 test the daemon. Lines :29, :158, :388, :434 and :916 switch it off.
- Agent instructions. AGENTS.md:412 ("local git daemons"). This is the only copy of the line; no generator template carries it.
- Not the daemon. tests/test_reference_extractor.py:562 and :581 use
git-daemon.pidonly as a file name that the domain extractor must not report. - History, which stays. CHANGELOG.md, changelog.d/961.md, and the task files for feat(devcontainer): configure ollama extension for vllm 16gib service with gpt-oss:20b #722 and fix(cli): argo ignores the namespace, and workspace, devcontainer, port-forward, tls, drift-report and label state handling #961.
Acceptance criteria
In the gate. Tests are offline and use structural tuple assertions. New tests add under 1 s, checked with uv run pytest tests/test_devcontainer.py tests/test_k8s_network_policies.py --durations=0.
- Daemon gone.
- Step 7 of post-start is deleted, along with
_git_daemon_pid_file,_is_git_daemon_runningand_start_git_daemon(devcontainer.py:1180-1183 and :1199-1262). The later steps are renumbered. - Nothing reads
DEVOPS_GIT_DAEMON_AUTOSTARTorDEVOPS_GIT_DAEMON_PATHS. - A post-start test with a recording
run_subprocessstub asserts that no call starts with["git", "daemon"], with neither variable set.
- Step 7 of post-start is deleted, along with
- Daemon tests gone. tests/test_devcontainer.py:713-769 and :1244-1282 are deleted, along with the five
DEVOPS_GIT_DAEMON_AUTOSTARTsetenv lines. - Devcontainer config.
- The template no longer sets
DEVOPS_GIT_DAEMON_AUTOSTART. The minikube branch drops 9418 fromforwardPorts(and the comma after11434) and fromportsAttributes. - The non-minikube branch (:113-122) is removed, leaving
{% if minikube %}…{% endif %}. - .devcontainer/devcontainer.json drops :45 and :74-82.
- A test renders the template with minikube on and off. Both outputs parse as JSON, and neither contains the variable or port 9418.
- The template no longer sets
- Argo CD's policy.
- k8s/argocd/networkpolicy.yaml:81 drops port 9418, and the comment at :67 drops "Git daemon 9418".
- tests/test_k8s_network_policies.py asserts 443 and 22 as before, and that 9418 is absent.
- Docs.
- Docstring. The
bootstrap-gitopsdocstring says what the command does: it applies the GitOps root Application. Regenerate docs/commands/argo.md and docs/CLI_REFERENCE.md withdevops docs generate, anddevops docs checkpasses. - DEVCONTAINER_USAGE.md. The example drops its
forwardPortsandportsAttributesblock. - AGENTS.md:412 drops "local git daemons". Edit the line in place, because it exists only there. Do not run
devops ai agentsin this PR: until docs(agents): instruction surfaces state only what is true, anddevops ai agentsnever overwrites AGENTS.md #840 lands, it rewrites AGENTS.md.
- Docstring. The
- Nothing left. The
git grepabove prints only tests/test_reference_extractor.py:562 and :581, and the new absence assertions (the template test and the Argo CD policy test, which name9418andDEVOPS_GIT_DAEMON_AUTOSTARTto assert they are gone). - Changelog.
changelog.d/<issue>.mdunder### Removed: the daemon, both variables and the port forward. It says that clones underrepos/are no longer served without authentication. CHANGELOG.md is not edited, anddevops pr check-readinesspasses. -
uv run devops cipasses within its 5-minute budget.
Checks a person runs (a rebuilt devcontainer):
- Pending a person, Daemon gone: after rebuilding the devcontainer,
ss -ltn | grep -c ':9418 'prints0, andpgrep -x git-daemonprints nothing. - Pending a person, No forward: VS Code's Ports view lists no 9418.
Key questions
- Does anything still use the daemon? Decided (owner, 2026-10-03): no. "The git daemon is a stub that was meant to enable simple argocd integration." Nothing in the repository reads from
git://, and Argo CD has read GitHub since v0.2.11. - Does the removal wait for Gitea? Decided (owner, 2026-10-03): it is its own item. Proposed: no dependency. feat(repos): Add a gitea remote to every clone under repos/ #1090 gives authenticated clone sharing through Gitea, but nothing relies on the daemon in the meantime.
- Keep an opt-in variable for anyone who wants it? Proposed: no. An opt-in would keep the code, tests and port forward that this item removes, and the pre-1.0 policy allows no obsolete shims. Anyone who needs a git daemon can still run
git daemonby hand. - Why also change Argo CD's policy file, which the homelab does not apply? Proposed: fix(k8s): deploy-stack applies the monitoring namespace perimeter #913's follow-up will apply it. The port should not come back with it, and the test should stop requiring it. Ports 22 and 443 stay: Argo CD may read repositories over SSH or HTTPS.
- What about the stale
/tmp/git-daemon.pid? Proposed: leave it.- Why it lingers.
/tmpis a volume shared across devcontainers (template :38). - Harmless. Nothing reads it; fix(cli): argo ignores the namespace, and workspace, devcontainer, port-forward, tls, drift-report and label state handling #961 stopped trusting it.
- No cleanup code. Cleanup code would be daemon code of its own.
rm -f /tmp/git-daemon.pidremoves it by hand.
- Why it lingers.
- Devcontainers generated before this change? Proposed: they keep their own devcontainer.json until they are regenerated. Without the post-start step, nothing starts the daemon after the next rebuild, and their 9418 forward points at nothing. The changelog tells their owners to drop the forward.
Strategic alignment
- Milestone: none; the roadmap tooling places it.
- Priority: P2. It removes an unauthenticated listener that serves private clones and is forwarded to the workstation, and dead code with its tests. Nothing depends on it.
- Value / Effort: Medium / Small. Deletions in one module, two JSON configs, a template, a policy file, three docs and their tests, plus one template rendering test.
- Depends on: nothing.
- Related:
- feat(k8s): the homelab runs gitea under argo cd as a read-write internal forge, served in-cluster over http and to workstations at https://git.<domain> through the cloudflare tunnel, with its admin secret pushed from the keyring #1081: the Gitea family's parent; this item is linked to it, not a child.
- feat(k8s): Point Argo CD to Gitea for git and PR dev images #1082: no longer carries this removal; it adds Gitea egress to the same Argo CD policy file and test. Whichever lands second rebases.
- feat(repos): Add a gitea remote to every clone under repos/ #1090: authenticated clone sharing through Gitea.
- feat(release): v0.1.12 #15 (0257861, v0.1.12): added the daemon. feat(devcontainer): configure ollama extension for vllm 16gib service with gpt-oss:20b #722 kept its port forward and fix(cli): argo ignores the namespace, and workspace, devcontainer, port-forward, tls, drift-report and label state handling #961 fixed its running check.
- feat(release): cut v0.2.11 release with DevSecOps hardening and GitHub management #38 (22bba04): moved Argo CD off
git://. - docs(agents): instruction surfaces state only what is true, and
devops ai agentsnever overwrites AGENTS.md #840: AGENTS.md is still regenerated until it lands. - fix(k8s): deploy-stack applies the monitoring namespace perimeter #913: its follow-up applies the Argo CD perimeter.
- Source: the owner, 2026-10-03.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 8, 2026
Placed in v0.2.31 on 2026-10-08 at the owner's request ("Populate 10 security and ci issues into each v0.2.30, v0.2.31, and v0.2.32 milestone"). This is a person's placement. Release theme: finding identity v2, URL credential masking, tests that leave no state, the Docker endpoint check and the Argo CD/OTel perimeters. Position 9 of 10 in the release's planned merge order. Its board Status is set to Ready, so the release-start fill keeps it.
dan-petty commentedon Oct 8, 2026
The '#913 follow-up' this item names is #1371 (v0.2.31), which applies
k8s/argocd/networkpolicy.yaml; whichever lands second rebases on the file. Found by the 2026-10-08 backlog review.fix(security): remove git daemon stub and port 9418 from devcontainer (…
dan-petty-bot commentedon Oct 9, 2026
What changed
#1477, merged into
release/v0.2.31as fb3bad1.13 file(s) changed.
How it was verified
Check runs at 734a08b:
Acceptance Criteria of
docs/agent/tasks/task-1122-remove-git-daemon.md:_git_daemon_pid_file,_is_git_daemon_runningand_start_git_daemon(src/devops_cli/commands/devcontainer.py). Later post-start steps are renumbered.DEVOPS_GIT_DAEMON_AUTOSTARTorDEVOPS_GIT_DAEMON_PATHS.run_subprocessstub asserts that no call starts with["git", "daemon"], with neither variable set (test_post_start_never_starts_git_daemon).tests/test_devcontainer.pyand the fiveDEVOPS_GIT_DAEMON_AUTOSTARTsetenv lines are deleted.DEVOPS_GIT_DAEMON_AUTOSTART. The minikube branch drops 9418 fromforwardPortsandportsAttributes.{% if minikube %}…{% endif %}..devcontainer/devcontainer.jsondropsDEVOPS_GIT_DAEMON_AUTOSTART,forwardPorts, andportsAttributes.test_devcontainer_template_contains_no_git_daemon).k8s/argocd/networkpolicy.yamldrops port 9418, and the comment drops "Git daemon 9418".tests/test_k8s_network_policies.pyasserts 443 and 22, and asserts that 9418 is absent.bootstrap-gitopsdocstring states what the command does (applies the GitOps root Application). Regenerateddocs/commands/argo.mdanddocs/CLI_REFERENCE.mdwithdevops docs generate, anddevops docs checkpasses.forwardPortsandportsAttributesblock.changelog.d/1122.mdrecords the removal under### Removed.CHANGELOG.mdanddocs/ROADMAP.mdare not edited.uv run devops cipasses.Pending a person:
ss -ltn | grep -c ':9418 'prints0, andpgrep -x git-daemonprints nothing.feat(release): v0.2.31 (#1490)