Skip to content

fix(roadmap): a deploy resets the runner memory limit to 8Gi #5484

Closed

Description

@dan-petty

Problem Description

On 2026-11-12 and on 2026-11-13 the kernel killed a runner Job at its memory limit of 8Gi (request 6Gi). After the second kill, the live ConfigMap devops-cli-config got roadmap.implement.max_memory_limit: 16Gi. Git does not hold this value:

  • k8s/devops/configmap.example.yaml does not set roadmap.implement.max_memory_limit.
  • devops k8s deploy-stack --stack devops renders the ConfigMap from that template. It takes only the service settings from the active config (render_active_devops_configmap in src/devops_cli/k8s/configmap.py).
  • The code default DEFAULT_ROADMAP_IMPLEMENT_MAX_MEMORY_LIMIT in src/devops_cli/config/defaults.py is 8Gi, and docs/CLUSTER.md "Size" gives the same default.

So the next deploy-stack removes the value, and the runner Jobs go back to the limit that failed. The Go-live check of docs/CLUSTER.md runs deploy-stack after each change of the template.

Also, 16Gi is above the allocatable memory of <parked-node> (12.8 GiB). The description of the setting says that the limit must fit the smallest node of the cluster. That node is cordoned now (#5143), and the placement of the runner Jobs is a separate item.

Reproduction Steps

  1. kubectl -n devops get cm devops-cli-config -o jsonpath='{.data.devops-cli\.yaml}' | grep max_memory_limit prints max_memory_limit: 16Gi.
  2. grep -n max_memory_limit k8s/devops/configmap.example.yaml prints nothing.
  3. Read render_devops_configmap_content in src/devops_cli/k8s/configmap.py: it replaces only the service block of the template.

Expected vs Actual Behavior

Expected: git holds the memory limit that the runner Jobs use, and a deploy keeps it.

Actual: only the live ConfigMap holds 16Gi. A deploy sets the limit back to 8Gi.

Proposed Solution

  1. Set roadmap.implement.max_memory_limit: 16Gi in k8s/devops/configmap.example.yaml, with a comment that names the two kills. Or raise the code default, and record why.
  2. Change the default in docs/CLUSTER.md "Size" to match.
  3. Change the description of the setting: the limit fits the smallest node that can run a runner Job, not every node of the cluster.
  4. The doubled values of feat(roadmap): make the attempt limits of the failing jobs settings #5440 are also only in the live ConfigMap. Put each value that must stay into the template in the same way, or name it in feat(roadmap): make the attempt limits of the failing jobs settings #5440.

Acceptance Criteria

  • A test proves that the rendered ConfigMap holds max_memory_limit: 16Gi.
  • uv run devops docs check passes with the new default text.
  • Live proof after the merge: after devops k8s deploy-stack --stack devops, the live ConfigMap still holds 16Gi.

Existing Tool Considered

The ConfigMap template and deploy-stack are the existing controls. No new tool. Cost to build (estimate): 50,000 tokens and 30 minutes.

Related

docs/K8S_PERFORMANCE.md (#5444), gap "The runner memory limit of 16Gi is not in git". #3727 (classify an out-of-memory kill), #5440 (attempt limits as settings).

Source: #5444

Proposed design

Problem statement

A deploy renders ConfigMap devops-cli-config from k8s/devops/configmap.example.yaml. That template does not set roadmap.implement.max_memory_limit, and the render replaces only the service section. The code default 8Gi in DEFAULT_ROADMAP_IMPLEMENT_MAX_MEMORY_LIMIT therefore reaches the runner Jobs after each devops k8s deploy-stack --stack devops, and the 16Gi that the live ConfigMap holds after two out-of-memory kills is lost. The change puts 16Gi in the template with a comment, corrects the description of the setting, and keeps the code default 8Gi for every other cluster.

Acceptance criteria

Requirement: template-memory-limit

The example ConfigMap MUST set roadmap.implement.max_memory_limit to 16Gi, with a comment that names the two kills.

Scenario: The rendered ConfigMap holds the limit

  • WHEN A test renders the template k8s/devops/configmap.example.yaml with one repository and the GitHub App settings.
  • THEN The rendered devops-cli.yaml holds roadmap.implement.max_memory_limit: 16Gi.

Requirement: render-keeps-roadmap-settings

The render MUST replace only the service section of the template config and MUST keep every other setting as the template writes it.

Scenario: A roadmap setting survives the render

  • WHEN A test renders a template that sets roadmap.implement.max_memory_limit: 16Gi with another repository.
  • THEN The rendered config holds 16Gi and the new service.repos.

Requirement: setting-description

The description of roadmap.implement.max_memory_limit MUST name the smallest node that can run a runner Job as the bound of the limit.

Scenario: The description names the node that runs the Jobs

  • WHEN A test reads the field description of the setting from the settings model.
  • THEN The text names the smallest node that can run a runner Job, and it names no other bound.

Requirement: cluster-doc-limit

Each section of docs/CLUSTER.md that states the memory limit MUST give the code default 8Gi and the 16Gi that the template sets.

Scenario: The cluster document states both values

  • WHEN A test reads the Size and Deadline sections of docs/CLUSTER.md, and runs uv run devops docs check.
  • THEN Both sections name roadmap.implement.max_memory_limit, the default 8Gi and the template's 16Gi, and the docs check exits 0.

Existing Tool Considered

No alternatives check has run on this item. The change needs no new tool: the existing controls are the ConfigMap template k8s/devops/configmap.example.yaml and devops k8s deploy-stack --stack devops, and the render already keeps every template setting that is not service. Cost to build the code instead, as the issue estimates: 50,000 tokens and 30 minutes.

Key questions

  • Why does the next deploy remove the runner memory limit?: render_active_devops_configmap renders devops-cli-config from k8s/devops/configmap.example.yaml, and render_devops_configmap_content replaces only the service section. The template sets no roadmap.implement.max_memory_limit, so the Service reads the code default 8Gi of DEFAULT_ROADMAP_IMPLEMENT_MAX_MEMORY_LIMIT. A value that a person patches into the live ConfigMap is in no template, so the next deploy removes it. [sources: src/devops_cli/k8s/configmap.py:124, src/devops_cli/k8s/configmap.py:57, src/devops_cli/config/defaults.py:1054, k8s/devops/configmap.example.yaml, docs/CLUSTER.md]
  • Does the render keep a roadmap section of the template?: Yes. render_devops_configmap_content reads the config of the template, sets config["service"], and writes the whole config again. A roadmap.implement value in the template survives the render. The render writes the YAML again, so the template's comment stays in git and never reaches the cluster. [sources: src/devops_cli/k8s/configmap.py:57, src/devops_cli/k8s/configmap.py:124]
  • Does the settings load accept 16Gi?: Yes. The setting takes a whole number of Gi, not below 6Gi, and 16Gi meets both bounds. The render validates the config with Settings before the deploy applies it, so a value outside the bounds fails the deploy and never reaches the cluster. [sources: src/devops_cli/config/settings.py:1443, docs/CLUSTER.md, src/devops_cli/k8s/configmap.py:57]
  • Where does the 16Gi value live: the template or the code default?: Set roadmap.implement.max_memory_limit: 16Gi in k8s/devops/configmap.example.yaml, and keep the code default 8Gi. (best practice) [sources: k8s/devops/configmap.example.yaml, src/devops_cli/config/defaults.py:1054, src/devops_cli/k8s/configmap.py:124]
    • Chosen: Set the value in the example ConfigMap template. The value belongs to this cluster, and the deploy renders the template. The code default stays the product default.
    • Rejected: Raise the code default to 16Gi. It pushes a 16Gi limit into every cluster, also one whose nodes cannot allocate it, and it changes the documented default.
    • Rejected: Patch the live ConfigMap only. The next deploy-stack removes the patch. That is the defect.
  • What should the description of the setting say?: The limit fits the smallest node that can run a runner Job, not every node of the cluster. The allocatable memory of that node bounds the limit, and dan-petty/homelab#356 holds the placement of the runner Jobs. (best practice) [sources: src/devops_cli/config/settings.py:1443, docs/CLUSTER.md]
    • Chosen: Name the smallest node that can run a runner Job. That node carries the Jobs. A node that cannot run one does not bound the limit.
    • Rejected: Keep "the smallest node of the cluster". The parked node is cordoned and runs no runner Job, so its 12.8 GiB bounds nothing.
    • Rejected: Name no node. The bound is the reason for the value, and a reader needs it.
  • Does 16Gi fit the node that runs the Jobs?: No. The parked node allocates 12.8 GiB, and 16Gi is above it. The issue records that node as cordoned, and dan-petty/homelab#356 holds the placement of the runner Jobs as a separate item. The setting does not change the scheduling of a Job, because the memory request sets that. [sources: docs/CLUSTER.md, k8s/devops/cronjob-runner.yaml]
  • How does a person prove that the live ConfigMap keeps 16Gi after a deploy?: After the merge, a person runs devops k8s deploy-stack --stack devops from a checkout of main, then reads kubectl -n devops get cm devops-cli-config -o jsonpath='{.data.devops-cli\.yaml}' | grep max_memory_limit and expects 16Gi. The Go-live check of docs/CLUSTER.md gives the same commands. This proof is a gate after the merge and no part of the pull request. [sources: docs/CLUSTER.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    on Nov 13, 2026
  2. added
    type/bug
    scope/roadmap
    status/new
    value/high
    effort/low
    on Nov 13, 2026
  3. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
    • Priority: P1-High. The next deploy-stack will reset the limit to 8Gi and re-trigger OOM kills on runner Jobs.
    • Related: feat(roadmap): make the attempt limits of the failing jobs settings #5440, which asks for a different change. Both address values held only in the live ConfigMap, but the candidate fixes the memory limit while dan-petty/devops-cli#5440 fixes attempt limits.
  4. added
    priority/p1-high
    on Nov 13, 2026
  5. added
    status/ready
    and removed
    status/new
    on Nov 14, 2026
  6. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at ffce5d9 (see proposed design in issue body).

    Moved to new items: #5583.

  7. added
    owner/service
    on Nov 14, 2026
  8. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Staged: branch fix/5484-a-deploy-resets-the-runner-memory, draft pull request #5589. The pull request plans the item and closes no issue.

    The task groups, with the tokens of the inputs of each step, for a budget of 64000 tokens:

    1. Put the runner memory limit in the example ConfigMap: 20391 tokens
    2. Name the node that bounds the limit in the setting description: 29515 tokens
    3. Regenerate the environment variable table from the new description: 16934 tokens
    4. State both limits in the Size line of the cluster document: 21958 tokens

    The runs of the planner and the review made 35 model request(s), and used 2490189 input tokens and 72000 output tokens. The tool calls, in order:

    1. search_code({"text":"max_memory_limit"})
    2. read_file({"path":"src/devops_cli/config/settings.py","start_line":1400,"end_line":1470})
    3. search_code({"text":"smallest node of the cluster"})
    4. read_file({"path":"docs/CLUSTER.md","start_line":55,"end_line":80})
    5. search_code({"text":"8Gi"})
    6. search_code({"text":"**Deadline.**"})
    7. search_code({"text":"memory:"})
    8. read_file({"path":"k8s/devops/cronjob-runner.yaml"})
    9. search_code({"text":"ENV_VARS.md"})
    10. read_file({"path":"tests/k8s/test_k8s_configmap.py","end_line":80})
    11. search_code({"text":"configmap.example.yaml"})
    12. search_code({"text":"def check"})
    13. search_code({"text":"docs check"})
    14. list_files({"directory":"tests/k8s"})
    15. read_file({"path":"tests/k8s/test_k8s_configmap_keys.py"})
    16. read_spec({"capability":"roadmap-service-deployment"})
    17. read_spec({"capability":"roadmap-implement-job/runner-job"})
    18. read_spec({"capability":"roadmap-implement-job/runner-job","requirement":"The memory limit is a setting that holds the largest request"})
    19. read_spec({"capability":"roadmap-implement-job/runner-job","requirement":"The memory limit of a runner Job stays 8 Gi"})
    20. search_code({"text":"The memory limit of every runner Job"})
    21. read_file({"path":"tests/config/test_roadmap_job_limit_settings.py"})
    22. search_code({"text":"model_fields[\""})
    23. search_code({"text":".description"})
    24. read_file({"path":"tests/roadmap/implement/test_roadmap_implement_size.py","start_line":95,"end_line":160})
    25. read_file({"end_line":30,"path":"tests/roadmap/implement/test_roadmap_implement_size.py","start_line":1})
    26. read_file({"path":"k8s/devops/configmap.example.yaml","start_line":300,"end_line":400})
    27. read_file({"path":"k8s/devops/configmap.example.yaml","start_line":200,"end_line":260})
    28. read_file({"path":"k8s/devops/configmap.example.yaml","start_line":120,"end_line":200})
    29. read_file({"end_line":60,"path":"src/devops_cli/roadmap/implement/implement_size.py","start_line":1})
    30. read_file({"end_line":1060,"path":"src/devops_cli/config/defaults.py","start_line":1045})
    31. search_code({"text":"MIN_MEMORY_LIMIT_GI"})
    32. references({"name":"configmap.example.yaml"})
    33. read_file({"end_line":290,"path":"tests/config/test_k8s_devops_runtime.py","start_line":185})
    34. read_file({"end_line":175,"path":"tests/k8s/test_k8s_configmap.py","start_line":120})
    35. search_code({"text":"The model tiers of each step class"})
    36. read_file({"end_line":50,"path":"tests/docs/test_docs.py","start_line":1})
    37. search_code({"text":"class RoadmapImplementConfig"})
    38. read_file({"path":"src/devops_cli/k8s/configmap.py","start_line":45,"end_line":135})
    39. read_file({"path":"src/devops_cli/config/settings.py","start_line":1425,"end_line":1470})
    40. read_file({"path":"src/devops_cli/config/defaults.py","start_line":1045,"end_line":1062})
    41. search_code({"text":"smallest node of the cluster"})
    42. search_code({"text":"docs generate"})
    43. references({"name":"configmap.example.yaml"})
    44. read_file({"path":"tests/k8s/test_k8s_configmap_keys.py","start_line":1,"end_line":45})
    45. read_file({"path":"docs/CLUSTER.md","start_line":40,"end_line":80})
    46. read_file({"path":"src/devops_cli/roadmap/implement/implement_size.py","start_line":70,"end_line":95})
    47. search_code({"text":"deploy-stack"})
    48. search_code({"text":"max_memory_limit"})
    49. read_file({"path":"tests/roadmap/implement/test_roadmap_implement_size.py","start_line":100,"end_line":140})
    50. read_file({"path":".tuicrignore","start_line":1,"end_line":25})
    51. read_file({"path":"tests/config/test_k8s_devops_runtime.py","start_line":190,"end_line":225})
    52. search_code({"text":"ENV_VARS.md"})
    53. references({"name":"k8s/devops/configmap.example.yaml"})
    54. search_code({"text":"class RoadmapImplementConfig"})
    55. read_file({"path":"tests/roadmap/implement/test_roadmap_implement_size.py","start_line":1,"end_line":30})
    56. read_spec({"capability":"roadmap-implement-job/runner-job"})
    57. read_spec({"capability":"roadmap-service-deployment"})
    58. read_spec({"capability":"roadmap-implement-job/runner-job","requirement":"The memory limit of a runner Job stays 8 Gi"})
    59. read_spec({"capability":"roadmap-implement-job/runner-job","requirement":"The memory limit is a setting that holds the largest request"})
    60. search_code({"text":"max_memory_limit"})

    Tool calls: list_files=1 (empty=0), read_file=26 (empty=2), read_spec=8 (empty=0), references=3 (empty=0), search_code=22 (empty=0)

    The stage job read the open pull requests and their files in 1 GraphQL request(s).

  9. 14 remaining items

  10. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Stopped at checks.

    Failure class: conflict.
    Action taken: none.
    Action left: wait: wait for a person.

    Step Status Attempts Tokens in/out Last failing command
    group 1 done 1 1112898/5578 -
    group 2 done 1 1061038/6862 pytest on base: tests/roadmap/implement/test_roadmap_implement_size.py
    group 3 done 1 315780/1860 -
    group 4 done 1 1081463/7871 -
    checks stopped 1 0/0 -

    Reason:

    The pull request has a merge conflict with the default branch.
    

    Last message of the agent (a claim that no check verified): none.

    The item is Blocked, and the job will not run it. Fix the cause. Then comment implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits of roadmap.implement.digest_clears_per_class and roadmap.implement.digest_clears_per_item allow it.
    The push of the commits that passed failed too.
    The rebase onto origin/main stopped.
    git rebase origin/main failed: Rebasing (1/5) Rebasing (2/5) Rebasing (3/5) Rebasing (4/5) Rebasing (5/5) error: could not apply cb2f682... docs(openspec): archive the change (#5484) hint: Resolve all conflicts manually, mark them as resolved with hint: "git add/rm <conflicted_files>"
    Conflicted files:

    • openspec/specs/roadmap-service-deployment/spec.md
  11. added
    status/blocked
    and removed
    status/in-progress
    on Nov 14, 2026
  12. removed
    status/blocked
    owner/service
    on Nov 14, 2026
  13. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-runner-20261114-162346-189b ended: succeeded.
    Image digest: sha256:b3e80ac3d4a7a2fc5646844181961fab09db7c5418d704de95bccb8eec295121

    The last lines of its log:

    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: git grep -c <masked> -- docs/CLUSTER.md
    Tool call: run_command, program git, ok.
    Tool call: edit_file, ok.
    Tool call: edit_file, ok.
    Tool call: run_command, started: uv run devops ci test tests/config/test_k8s_devops_runtime.py ...
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: uv run devops ci docs 2>&1 ...
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: uv run ruff check tests/config/test_k8s_devops_runtime.py
    Tool call: run_command, started: git diff --stat
    Tool call: run_command, program git, ok.
    Tool call: run_command, program uv, ok.
    Tool call: read_file, ok.
    Tool call: edit_file, ok.
    Tool call: edit_file, ok.
    Tool call: run_command, started: uv run devops openspec check 2>&1 ...
    Tool call: run_command, started: git diff docs/CLUSTER.md
    Tool call: run_command, program git, ok.
    Tool call: run_command, program uv, ok.
    Tool call: run_command, started: git status --porcelain && git log ...
    Tool call: run_command, program git, refused.
    Tool call: run_command, started: git status --porcelain
    Tool call: run_command, started: git log --oneline -3
    Tool call: run_command, program git, ok.
    Tool call: run_command, program git, ok.
    Tool call: run_command, started: git show --stat HEAD
    Tool call: run_command, started: git show HEAD -- docs/CLUSTER.md | ...
    Tool call: run_command, program git, ok.
    Tool call: run_command, program git, ok.
    The checks of pull request dan-petty/devops-cli#5708 still run after 39 s.
    The checks of pull request dan-petty/devops-cli#5708 still run after 79 s.
    The checks of pull request dan-petty/devops-cli#5708 still run after 119 s.
    The checks of pull request dan-petty/devops-cli#5708 still run after 159 s.
    The checks of pull request dan-petty/devops-cli#5708 still run after 199 s.
    The checks of pull request dan-petty/devops-cli#5708 still run after 238 s.
    The checks of pull request dan-petty/devops-cli#5708 still run after 278 s.
    The checks of pull request dan-petty/devops-cli#5708 still run after 318 s.
    Failure class conflict. Action left: wait.
    ✓ Took 0 item(s) to a ready pull request, stopped 1.
    
  14. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-14 21:08 UTC

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/lowpriority/p1-highscope/roadmapsource/agenttype/bugvalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions