Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
priority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it must
Description
Context & Rationale
PortForwardDaemonManager defaults its state file to the relative path .data/k8s/port_forwards.json (src/devops_cli/k8s/port_forward_daemon.py:16, used at :75). A relative path resolves against the current directory. So devops k8s port-forward-status run from a subdirectory reads a different, usually missing, file and reports no forwards, and port-forward-stop cannot find the forward it should stop. Other .data paths resolve through resolve_data_path (src/devops_cli/core/repo.py:194-200), which places them under the main worktree.
Scope & Deliverables
- Deliverable: the default state file resolves through
resolve_data_pathwhen the manager is constructed. An explicitly passedstate_fileis used as given. - Acceptance criteria:
- The test suite leaves no
.data/k8s/port_forwards.jsonin the project. Todaytests/test_k8s.pywrites one there, with pid 1 entries for the argocd, grafana, prometheus and jaeger forwards;stop_forwardsskips pids of 1 or less, but the file escapes fix(test): tests never write to the project config, data or tracked files #749's guarantee that tests never write to the project data. Resolving the state file under the data root brings it under the tests' isolated data directory. - A forward record saved with the working directory at the repo root is listed by a manager constructed with the working directory in a subdirectory.
- The symlink guard (port_forward_daemon.py:78-80) still refuses a symlinked state file.
- Tests spawn no kubectl and touch no network.
- The test suite leaves no
- Key questions:
- Resolve at construction or at import? At construction (proposed), so a changed working directory and test fixtures are honoured.
- Migrate existing state files? No (proposed). In the usual case the old relative path, taken from the repo root, is the same file.
- Constraint: no change to how forwards are started or stopped.
Strategic Alignment
- Milestone: Backlog
- Depends on: none
Metadata
Metadata
Assignees
Labels
priority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 3, 2026
Merged into #1036: the port-forward state file is the same cwd-relative
.datadefault as the durable store. #1036 now resolves both, plus docs ingest, through one data-directory helper with an invariant test, and it carries this item's criteria and constraints.