Repository navigation
Description
Problem Description
The item time limit of the implement job is equal to the Job deadline ceiling, with no margin. In the live ConfigMap devops-cli-config on 2026-11-13, roadmap.implement.item_time_limit_seconds is 14,400 and roadmap.implement.deadline_ceiling_seconds is 14,400. The admission policy roadmap-service-jobs refuses a Job deadline above 14,400 s (CONST_ROADMAP_IMPLEMENT_DEADLINE_CAP_SECONDS), so the doubling of the limits on 2026-11-13 stopped the item limit at the ceiling.
The rule of nested time limits (ARCHITECTURE.md, section 6, "Nested Time Limits") asks for each inner limit to be shorter than the limit around it, with a margin. With equal values, the Job deadline can end the pod before the item limit writes its stop and its comment. The attempt then ends as stopped with no named limit.
The settings check does not catch this. src/devops_cli/config/settings.py (the model check of the implement settings) refuses only item_time_limit_seconds > deadline_ceiling_seconds, so an equal value passes.
Reproduction Steps
- Read the live values:
kubectl get configmap devops-cli-config -n devops -o jsonpath='{.data}'and finditem_time_limit_secondsanddeadline_ceiling_seconds. - Load the settings with
item_time_limit_secondsequal todeadline_ceiling_seconds. The check accepts them.
Expected vs Actual Behavior
Expected: the item limit stops an item with a clean exit and a diagnostic before the Job deadline can end the pod. The settings check refuses an item limit that is not below the ceiling by a fixed margin.
Actual: the two limits are equal, and the check accepts equal values.
Fix:
- Add a margin constant, and refuse
item_time_limit_seconds + margin > deadline_ceiling_secondsin the settings check. Test the check first. - Set the live
roadmap.implement.item_time_limit_secondsbelow 14,400 by that margin in the manifest of the ConfigMap, and apply the live ConfigMap before the image with the new check rolls (a tightened setting changes the live ConfigMap first).
Environment Diagnostics
devops-cli 0.129.1. The live ConfigMap was read on 2026-11-13.
Logs, Traces, or Terminal Output
Found while writing the agentic workflow spec (#5443, gap G14).
Source: #5443
Dependencies
- chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches for a cross-field time-limit validator and for Job-deadline margin tooling found no tool that supplies this rule; pydantic offers model validators but no margin, so the change stays project code.
Lacks:
- Cross-field margin rule between item limit and deadline ceiling
- Refusal of equal limits with a named constant
- Raised 15000 s admission cap in the Job policy
Proposed design
Problem statement
Do not lower the implement item limit. The item waits on #6521. The implement item limit equals the Job deadline ceiling. The Job can end the pod before the item limit writes its stop and comment. The settings check accepts equal values. Raise the deadline ceiling and the admission cap to 15000 s. Keep the item limit at 14400 s. Add a 600 s margin check.
Acceptance criteria
Requirement: Implement item limit margin
The implement settings model SHALL refuse an item limit that is within the deadline margin of the Job deadline ceiling.
Scenario: Equal limits refused
- WHEN
tests/roadmap/implement/test_roadmap_implement_deadline_settings.pyloads settings withitem_time_limit_secondsequal todeadline_ceiling_seconds - THEN the test sees a
ValidationErrorthat names the item limit, the margin and the deadline ceiling.
Requirement: Margin boundary accepted
The implement settings model SHALL accept an item limit that is exactly one margin below the Job deadline ceiling.
Scenario: Value at margin accepted
- WHEN
tests/roadmap/implement/test_roadmap_implement_deadline_settings.pyloads settings withitem_time_limit_seconds = deadline_ceiling_seconds - CONST_ROADMAP_IMPLEMENT_DEADLINE_MARGIN_SECONDS - THEN the test loads the settings with no
ValidationError.
Requirement: Margin constant
The code SHALL define CONST_ROADMAP_IMPLEMENT_DEADLINE_MARGIN_SECONDS as 600 and use it in the implement settings check.
Scenario: Constant value and use
- WHEN
tests/roadmap/implement/test_roadmap_implement_deadline_settings.pyreadsCONST_ROADMAP_IMPLEMENT_DEADLINE_MARGIN_SECONDSand loads settings withdeadline_ceiling_seconds = 15000anditem_time_limit_seconds = 14400 - THEN the constant is 600 and the settings load with no
ValidationError.
Requirement: Default deadline ceiling
The default implement deadline ceiling MUST be 15000 s.
Scenario: Default ceiling value
- WHEN
tests/roadmap/implement/test_roadmap_implement_deadline_settings.pyloads implement settings withitem_time_limit_seconds = 14400and no explicit deadline ceiling - THEN the test sees
deadline_ceiling_seconds == 15000and noValidationError.
Requirement: Admission policy cap
The roadmap-service admission policy MUST allow a Job deadline of 15000 s for the implement job.
Scenario: K8s admission policy validates
- WHEN
uv run devops ci --check --only k8sruns - THEN the k8s check passes with the 15000 s cap in
k8s/devops/roadmap-service/admissionpolicy.yaml.
Requirement: Pending a person after the merge
The live ConfigMap devops-cli-config MUST hold 14400 for roadmap.implement.item_time_limit_seconds and 15000 for roadmap.implement.deadline_ceiling_seconds before the new image rolls.
Scenario: Live values read
- WHEN
kubectl get configmap devops-cli-config -n devops -o jsonpath='{.data.roadmap\.implement\.item_time_limit_seconds},{.data.roadmap\.implement\.deadline_ceiling_seconds}'runs before the rollout - THEN the command prints
14400,15000.
Existing Tool Considered
The alternatives check of 2026-11-23 in the issue body records verdict none with no tool. It covers no part of the need; the block lists the lacks. The change builds a small pydantic validator and one admission-policy value instead. Cost: about 6000 tokens to build, under 1000 tokens to keep, under 1000 tokens to fix, and under 3 hours elapsed.
Key questions
- Which side moves to create the margin?: Raise the default deadline ceiling and the admission cap to 15000 s. Keep the item limit at 14400 s. The owner soft-cap rule does not allow a lower cap for the implement job, which passed 14 of 42 attempts over 7 days. (best practice) [sources: docs/roadmap/job-success.md, k8s/devops/roadmap-service/admissionpolicy.yaml:251-255, src/devops_cli/config/defaults.py:1108]
- Chosen: Raise the deadline ceiling and admission cap. Keeps the item limit at 14400 s, so the cap of a job under 80% does not go down.
- Rejected: Lower the item limit to 13800 s. Lowers the cap of the implement job, which the owner soft-cap rule does not allow while it passes under 80%.
- Rejected: Use a 300 s margin. Leaves less room for the stop comment than the 600 s margin.
- What margin separates the item limit from the Job deadline ceiling?: Use 600 s as
CONST_ROADMAP_IMPLEMENT_DEADLINE_MARGIN_SECONDS. The check refusesitem_time_limit_seconds + 600 > deadline_ceiling_seconds. (best practice) [sources: ARCHITECTURE.md, src/devops_cli/config/settings.py, src/devops_cli/config/constants.py]- Chosen: 600 s margin. Leaves 10 min for the item limit to write its stop and comment, and stays small against the 4-hour limit.
- Rejected: 300 s margin. Leaves only 5 min, which gives less room for the stop comment.
- Rejected: Reuse the stage job margin. Couples the implement item limit to an unrelated stage job setting.
- Which repository files hold the ceiling, the cap and the check?:
src/devops_cli/config/defaults.pyholds the default ceiling.src/devops_cli/config/constants.pyholds the admission cap.src/devops_cli/config/settings.pyholds the model check.k8s/devops/roadmap-service/admissionpolicy.yamlholds the policy.k8s/devops/configmap.example.yamlholds the item limit at 14400. [sources: src/devops_cli/config/defaults.py:1108, src/devops_cli/config/constants.py:4090, src/devops_cli/config/settings.py:1706, k8s/devops/roadmap-service/admissionpolicy.yaml:251-255, k8s/devops/configmap.example.yaml:298] - Does the new condition reject equal values?: Yes. With margin 600, equal values of 14400 give 14400 + 600 > 14400. The model raises a
ValidationError. [sources: src/devops_cli/config/settings.py, src/devops_cli/config/constants.py]
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 13, 2026
Both work on the implement job time limits in the same ConfigMap, but #5440 makes constants into settings while the candidate adds a margin validation rule and lowers the live item limit.devops-cli-service commentedon Nov 17, 2026
Alternatives check: none
Reason: Two searches on nested timeout margins and settings-level timeout validation returned only generic web-platform timeout documentation (WebDriver session timeouts,
setTimeout, HTTP 504/408), no library or tool that enforces a margin between an inner item limit and an outer Job deadline. The need is a project-internal pydantic settings check (item_time_limit_seconds + margin > deadline_ceiling_seconds) plus a lower value in the project's own ConfigMap manifest, so no external tool covers it.Tool: none found
Lacks:
roadmap.implement.item_time_limit_secondsvalue in the ConfigMap manifestSearches run:
Sources:
Checked on 2026-11-17. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at 955013e (see proposed design in issue body).
dan-petty commentedon Nov 19, 2026
New evidence from the Service config review of 2026-11-19.
class=ci_infra infra=true. No overrun happened in the last 24 h.item_time_limit_secondsis still 14400 in the template (k8s/devops/configmap.example.yaml:298). It equals the deadline ceiling (DEFAULT_ROADMAP_IMPLEMENT_DEADLINE_CEILING_SECONDS = 14400,src/devops_cli/config/defaults.py:1108).src/devops_cli/config/settings.py:1574). So with equal values the deadline always ends first.limit_reachedand the actionraise_limit(src/devops_cli/roadmap/failure.py:150), with its comment. Today the item getsci_infraand the actionretry(failure.py:144). The grade does not change, becauselimit_reachedis also inINFRA_CLASSES(src/devops_cli/roadmap/job_result.py:189-195). The feat(roadmap): an agent that needs a decision asks on the issue and waits #3077 line at 11164 s already showsclass=limit_reached infra=true.k8s/devops/roadmap-service/admissionpolicy.yaml:251-255) keeps that rule. The owner decides which side moves.dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.
devops-cli-service commentedon Nov 27, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
dan-petty commentedon Nov 30, 2026
Triage under #6519 (owner instruction of 2026-11-30), before the hold #6521 closes. This item adds or extends a gate, refusal, screen, cap, limit, retry, result line, shell allowlist, tool catalog or plan-shape rule of the stage, implement or fix-checks job. #6519 found that 263 of about 900 issues in four weeks added such rules and none replaced the engine. Stage now runs on stock Coder (grade 60 on 30 graded attempts), where the agent reads the repository, runs the checks in its loop and has a real shell; implement follows (#6527). The code paths that this item names have also moved. If the failure class still shows in graded attempts, file a new item from that evidence. Closed as not planned; a person may reopen it.