Skip to content

docs(openspec): plan #5484 Set the runner memory limit in the template - #5589

Merged
dan-petty merged 2 commits into
mainfrom
fix/5484-a-deploy-resets-the-runner-memory
Nov 14, 2026
Merged

dan-petty merged 2 commits into
mainfrom
fix/5484-a-deploy-resets-the-runner-memory

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #5484

A deploy renders ConfigMap devops-cli-config from k8s/devops/configmap.example.yaml and replaces only its service section. The template sets no roadmap.implement.max_memory_limit, so each deploy resets the limit to the code default 8Gi, the limit at which the kernel killed two runner Jobs on 2026-11-12 and 2026-11-13. This change sets 16Gi in the template with a comment that names the two kills, and keeps the default 8Gi for every other cluster. It names the smallest node that can run a runner Job in the description of the setting, states both values in the Size section of docs/CLUSTER.md, and regenerates docs/ENV_VARS.md. Tests render the example and read the field description. A person proves the live value after the merge.

Change: openspec/changes/5484-a-deploy-resets-the-runner-memory/

@devops-cli-service devops-cli-service Bot added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 14, 2026
@devops-cli-service
devops-cli-service Bot marked this pull request as ready for review November 14, 2026 01:35
@dan-petty

Copy link
Copy Markdown
Owner

An agent vetted this plan before a merge (shepherd, 2026-11-14). Verdict: needs fix. Each point below blocks a correct build.

  1. Task 1.1 and the spec scenario 'The comment names the two kills' (specs/roadmap-service-deployment/spec.md) tell the step to write the names of the two killed runner Jobs in the template comment, and to assert them in a test. The plan and the issue do not give these names. The runner has no cluster access. Only one name is on GitHub: devops-cli-runner-20261113-140739-174d (comment on fix(roadmap): read the pod status to find an out-of-memory kill #3727, 2026-11-13). I found no name for the kill of 2026-11-12 in git, in GitHub or in Prometheus (no OOMKilled series in the last 3 days). So the step must invent a Job name, or it cannot meet the spec. Fix: write the two Job names in tasks.md and in the spec scenario, or change the requirement so the comment names only the two dates, fix(roadmap): a deploy resets the runner memory limit to 8Gi #5484 and fix(roadmap): read the pod status to find an out-of-memory kill #3727.
  2. docs/CLUSTER.md line 68 (Deadline) ends with 'The memory limit stays the 8 Gi of the template.' This paragraph is about the Jobs that the Service makes. The sentence came from feat(roadmap): extend the runner Job deadline on progress #3196, before feat(roadmap): size the runner Job resources from the plan #3193 made the limit a setting, and openspec/specs/roadmap-implement-job/runner-job/spec.md:200 states the same rule for Service Jobs. After this change the Service Jobs of this cluster get 16Gi, so the sentence gives a wrong value (AGENTS rule 8). The refined design in the issue body (requirement cluster-doc-limit) names the Size and the Deadline sections. The design rejects the Deadline edit because it says that the sentence is about cronjob-runner.yaml. That reason is not correct. Fix: add the Deadline sentence to group 4 and to its test, or remove the number from that sentence.

Points that do not block:

  • design.md says that the code default keeps 8Gi 'for every other cluster'. But k8s/devops is the product base that devops-cli ships (k8s/README.md:10). Each cluster that runs deploy-stack from this base also gets 16Gi. The template already holds homelab values (the DeepSeek ladder, the MCP URL), so the choice is acceptable, but the text must say this.
  • Group 1 lists 11 more test modules under Changes 'in case the new setting breaks one'. Scratch proof: I added max_memory_limit: 16Gi to the template in a detached worktree. All 12 listed modules, tests/config/test_k8s_devops_runtime.py, tests/roadmap/implement/test_roadmap_implement_size.py, tests/security/test_config_declarations.py and tests/docs passed (597 passed). No listed module breaks. The extra paths put the plan above 10 files, so the runner Job takes the 4 CPU / 6Gi row. You can remove them.
  • The scenario 'The rendered example holds the limit' expects the rendered config to hold 16Gi and the service.repos of the repository. Task 1.1 asserts only the limit.
  • Task 3.2 repeats task 3.1, and task 4.2 repeats the second half of task 4.1. Task 2.1 gives only a test name and no instruction.
  • Dependencies are out of date: docs(k8s): add the Kubernetes guideline and the capacity decisions #5492 is merged (3f08f8a) and fix(ci): Size narrowed test workers by collected tests #5547 is closed. The design says that 'a follow-up' takes the doubled values of feat(roadmap): make the attempt limits of the failing jobs settings #5440. That follow-up is chore(k8s): Add doubled attempt limits to the ConfigMap template #5583 (open, split from fix(roadmap): a deploy resets the runner memory limit to 8Gi #5484). Name chore(k8s): Add doubled attempt limits to the ConfigMap template #5583.
  • src/devops_cli/config/defaults.py:1052 says that the smallest node can allocate 15 Gi. The live node hawk allocates 12.8 GiB (13434336Ki). The comment is already wrong, and the plan does not touch defaults.py. Correct it, or record it in an issue.
  • The title of the current spec requirement 'The memory limit of a runner Job stays 8 Gi' (openspec/specs/roadmap-implement-job/runner-job/spec.md:200) can mislead after the template sets 16Gi. A MODIFIED delta can give it a better title.
  • k8s/devops/cronjob-runner.yaml keeps an 8Gi limit for devops k8s run-job, so a manual run can still be killed at 8Gi. The issue does not include this, but a reader can expect it.
  • The PR is not a draft (draft=false), but the task text says that the stage job opened it as a draft. The branch is 6 commits behind origin/main (merge base 7b27444). GitHub reports mergeable_state clean.
  • ASD-STE100: most of the text is correct. Some Feasibility and Security sentences have more than 25 words, for example the sentence that starts 'What crosses a trust boundary'.
  • Premise holds. The template sets no max_memory_limit. render_devops_configmap_content (src/devops_cli/k8s/configmap.py:57) replaces only the service block. deploy-stack renders k8s/devops of the current checkout by default (src/devops_cli/k8s/environment.py:146, stack_lifecycle.py:1501), and kustomization.yaml does not include the ConfigMap. The live ConfigMap holds max_memory_limit: 16Gi, and the code default is 8Gi (defaults.py:1054).
  • Security: no control becomes weaker and no threshold decreases. The admission policy does not pin the memory limit. The devops namespace has no LimitRange and no ResourceQuota. The schedulable nodes allocate 58.0 GiB (condor), 58.0 GiB (gemini) and 62.6 GiB (hog). hawk (12.8 GiB) is cordoned and unreachable. This agrees with the 'Runner placement' rule in k8s/README.md on main.
  • Groups 2 and 3 are correct. Scratch proof: I changed the description to 'smallest node that can run a runner Job'. Then devops docs check failed only on docs/ENV_VARS.md. devops docs generate with no option changed only docs/ENV_VARS.md, and after that docs check passed. 1390 tests in tests/config, tests/invariants, tests/docs, test_config_declarations and test_roadmap_implement_size passed. No snapshot or CI workflow holds the description text.
  • There are no model review points on the PR: 0 reviews and 0 comments. The stage comment is on the issue.

@dan-petty dan-petty added the verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix label Nov 14, 2026
@dan-petty
dan-petty force-pushed the fix/5484-a-deploy-resets-the-runner-memory branch from b00eac7 to 560a1f8 Compare November 14, 2026 13:46
@dan-petty

Copy link
Copy Markdown
Owner

An agent vetted this plan before a merge (2026-11-14). Verdict: ready.

Problems identified in the prior review have been resolved:

  1. In Task 1.1 and specs/roadmap-service-deployment/spec.md, the comment requirement and assertions now accurately reference the kill dates (2026-11-12, 2026-11-13) and issues (fix(roadmap): a deploy resets the runner memory limit to 8Gi #5484, fix(roadmap): read the pod status to find an out-of-memory kill #3727) without demanding a non-existent job ID for the earlier event.
  2. Group 4 now updates both the Size and Deadline sections of docs/CLUSTER.md to reflect the 16Gi template limit.
  3. Trimmed unnecessary test modules from Group 1 Changes to keep task scope tight.
  4. Rebased cleanly onto origin/main.

Checks: plan-check passed, local pre-push checks passed.

@dan-petty
dan-petty merged commit dc3fd43 into main Nov 14, 2026
22 checks passed
@dan-petty
dan-petty deleted the fix/5484-a-deploy-resets-the-runner-memory branch November 14, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/docs Type docs: a change to the documents verdict/fix-plan Verdict Needs fix of a plan: an open finding keeps the plan in draft until a fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant