Skip to content

refactor(roadmap): delete the interim git controls of the Jobs #6691

Closed

Description

@dan-petty

Problem

Until #3700, the agent phase runs in the same container as the App key, so the roadmap Jobs keep interim git controls from #2695. When the agent runs in its own container, with no App key, no token and no mount of the state folder, these controls protect nothing more. The owner decided on 2026-11-21 to delete them after #3700 (#3700 comment 7066447618).

Change

Delete, in one pull request:

  • OriginGit and its ref copying;
  • the git argument parser of _github_pin. Keep the in-process mint and renewal of the token, because the Service needs it;
  • the process sweeps and adopt_orphans;
  • the private GH_CONFIG_DIR;
  • the origin URL pin;
  • the symlink stop of implement_step.py. The refusal of publish (a new or changed mode 120000) replaces it.

Acceptance criteria

  • The listed code and its tests are gone.
  • The documents and specs that name them describe the three containers.

Dependencies

Source

Source: #3700

Alternatives check of 2026-11-21: not-applicable.
Class: refactor, no search.
Tool: none found.

Proposed design

Problem statement

The roadmap Jobs keep interim git controls from #2695 because the agent phase shares the App key container. After #3700 the agent phase runs in its own container with no App key, token or state mount, so these controls protect nothing. This change deletes the remaining controls and updates the runner dry run and specs. It defers the review-step git path and the cluster-dependent admission rule.

Acceptance criteria

Requirement: Token minting without git argument parsing

The process runner SHALL mint and renew the GitHub token in process and SHALL NOT parse git arguments to do so.

Scenario: GitHub token minting

  • WHEN the tests in tests/core/test_process.py and tests/core/test_subprocess_env_gh_kubectl.py run
  • THEN they pass and _github_pin has no git argument parser while the in-process mint and renewal remain.

Requirement: No orphan adoption or process sweeps

The roadmap Jobs SHALL NOT run process sweeps or call adopt_orphans.

Scenario: Process hardening tests

  • WHEN the tests in tests/core/test_process_hardening.py and tests/commands/test_roadmap_implement_phases.py run
  • THEN they pass and no roadmap command imports or calls adopt_orphans.

Requirement: Publish refuses symlinks

The implement step SHALL NOT run a separate symlink stop; the publish phase SHALL refuse a new or changed mode 120000 path.

Scenario: Symlink refusal

  • WHEN the tests in tests/roadmap/implement/test_roadmap_implement_phases.py and tests/roadmap/implement/test_roadmap_implement_submit.py run with a new or changed symlink
  • THEN publish refuses the path and the implement step has no separate symlink stop.

Requirement: Runner dry run shows three containers

The devops k8s run-job --template runner --dry-run command SHALL show only the three-container runner shape.

Scenario: Runner dry run

  • WHEN uv run devops k8s run-job --template runner --dry-run runs
  • THEN the output shows only the three-container runner and no one-container create.

Requirement: Runner spec describes three containers

The roadmap-implement-runner spec SHALL describe only the three-container runner shape.

Scenario: Runner spec check

  • WHEN uv run devops ci --check --only docs runs
  • THEN the check passes and the spec requirement describes only the three containers.

Requirement: Fix step specs drop orphan adoption

The roadmap-fix-checks and roadmap-fix-conflict specs SHALL NOT name adopt_orphans.

Scenario: Fix step spec check

  • WHEN uv run devops ci --check --only docs runs
  • THEN the check passes and neither spec names adopt_orphans.

Existing Tool Considered

The alternatives check of 2026-11-21 in the issue body gives not-applicable for a refactor with no search and names no tool. The change deletes code and builds no replacement, so it adds no code to keep or fix.

Key questions

  • Does the review step still use OriginGit at this commit?: Yes. src/devops_cli/commands/roadmap_step_review.py:36 imports OriginGit and origin_url, line 40 builds OriginGit, and SECURITY.md:54 says the withdraw of the review step still uses it. [sources: src/devops_cli/commands/roadmap_step_review.py:36, src/devops_cli/commands/roadmap_step_review.py:40, SECURITY.md:54]
  • How should the proposal handle the review step's use of OriginGit?: Defer the deletion of OriginGit, origin_url and the private GH_CONFIG_DIR to a separate issue. The review step is not on the phase model, and this issue defines no safe replacement for its withdraw. (best practice) [sources: src/devops_cli/commands/roadmap_step_review.py:36, SECURITY.md:54, src/devops_cli/roadmap/implement/git_isolation.py:162]
    • Rejected: Delete OriginGit in this issue and migrate the review step. The issue gives no replacement safe git path for the review step withdraw.
    • Rejected: Keep OriginGit for the review step and delete only the Job uses. The body asks to delete OriginGit; keeping it leaves the issue open.
    • Chosen: Defer OriginGit and its related controls. The review step still needs them, and the rest of the deletion can proceed.
  • Which GH_CONFIG_DIR is the private one that the Jobs use?: The private one is in src/devops_cli/roadmap/implement/git_isolation.py, with the OriginGit path. The general GH_CONFIG_DIR in src/devops_cli/core/process.py and src/devops_cli/devcontainer/devcontainer_plans.py stays. [sources: src/devops_cli/roadmap/implement/git_isolation.py, src/devops_cli/core/process.py, src/devops_cli/devcontainer/devcontainer_plans.py]
  • What replaces the symlink stop in implement_step.py?: The publish phase refuses a new or changed mode 120000 path. [sources: SECURITY.md:54]
  • Should the runner dry-run change and its spec update land in this pull request?: Yes. Keep the dry-run change and the spec requirement change together. (best practice) [sources: src/devops_cli/commands/k8s/cluster_jobs.py, openspec/specs/roadmap-implement-runner/spec.md]
    • Chosen: Change the dry run and the spec in this pull request. The reply asks for both in the same PR, and the spec would otherwise describe a shape the code no longer makes.
    • Rejected: Change only the dry run and leave the spec for later. The spec would keep the one-container requirement after the code drops it.
  • Should the admission policy branch wait for the cluster to drop one-container runner Jobs?: Yes. Defer the admission policy change until no one-container runner Job is left in the cluster. (best practice) [sources: k8s/devops/roadmap-service/admissionpolicy.yaml]
    • Rejected: Delete the admission rule in this pull request. A one-container runner Job that is still in the cluster can need the rule on UPDATE.
    • Chosen: Defer the admission rule until the cluster has no one-container runner Job. The cluster state is outside the roadmap, and the code deletions can proceed without it.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#3700

Moved to new items

#6786, #6787

Activity

  1. added
    type/refactor
    source/agent
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 21, 2026
  2. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 21, 2026
  4. dan-petty commented on Nov 22, 2026

    @dan-petty
    OwnerAuthor

    Two more items for this deletion. Each one exists only while the cluster can still hold the one-container runner CronJob. The review of #6732 (head 78d4f50) found them.

    • Policy: in k8s/devops/roadmap-service/admissionpolicy.yaml, the first rule admits the one-container runner shape on UPDATE. Delete that branch when no one-container runner Job is left in the cluster.
    • Dry run: devops k8s run-job --template runner --dry-run shows the create of the one-container runner first, under "the CronJob holds one container". The template in git makes only the three containers. Delete the one-container create from dry_run_job in src/devops_cli/commands/k8s/cluster_jobs.py. Change the requirement "The dry run shows each shape of the runner template under its condition" in openspec/specs/roadmap-implement-runner/spec.md in the same PR.
  5. added
    status/ready
    and removed
    status/new
    on Nov 22, 2026
  6. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.

  7. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 22, 2026
  8. removed
    status/in-review
    on Nov 22, 2026
  9. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-22 21:17 UTC

  10. dan-petty commented on Nov 23, 2026

    @dan-petty
    OwnerAuthor

    Live check after #6790: the three-container runner Jobs work with the interim controls deleted. Both Jobs ran on runner images that hold the merge commit 8f363e6.

    Job Image prepare agent publish Result
    implement dan-petty/homelab#335 (devops-cli-implement-devops-cli-4530-6ef6a6, 2026-11-23 02:04 UTC) v0.197.0 exit 0, 3 min 38 s exit 0, 14 min 5 s exit 0, 1 min 5 s publish pushed feat/4530-expose-the-argo-workflows-ui-behind and opened draft #6835. The step stopped at group 2 on the test-first rule ("A behavior group changed no test file")
    fix-checks #6835 (devops-cli-fix-checks-devops-cli-4530-9c07015e3f, 04:05 UTC) v0.198.0 exit 0, 49 s exit 0, 3 min 8 s exit 0, 16 s failed: the model changed no file for Static Analysis

    No container logged a git, token, credential or read-only folder error. Both results are outcomes of the model and the plan, not of the deleted controls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/refactorvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions