Repository navigation
feat(roadmap): record the kill class of a killed attempt #7078
Description
Split from #5500.
ProblemThe issue asks for class=evicted, class=deadline or class=oom from the pod status. The writer already uses class for FailureClass. A deadline kill writes class=timeout and kill=deadline. An evicted attempt writes no result line.### Why deferredThe pod mounts no service account token. The step cannot read DisruptionTarget (src/devops_cli/roadmap/attempt_kill.py:15-17). A new class value would overwrite FailureClass telemetry. The part needs a field that keeps FailureClass and a source for the pod status.### Acceptance criteria- The design states a field for the end class that does not replace class=FailureClass.- A deadline kill keeps class=timeout and states kill=deadline.- An evicted attempt follows the documented no-line rule, or writes its class in the new field.- A test proves each mapping offline.- The change updates the roadmap-service-logs and roadmap-stage/fix-plan specs.
Proposed design
Problem statement
Record the kill class in a kill field and keep class for FailureClass. The writer uses class for FailureClass, so a kill cannot record its class there. A deadline kill keeps class=timeout and records kill=deadline, and an evicted attempt writes no result line. This item proves the evicted and deadline mappings with offline tests and updates the roadmap-service-logs and roadmap-stage/fix-plan specs. The OOM class has no source in the pod, so it is deferred.
Acceptance criteria
Requirement: kill-field-keeps-failure-class
The result line of a killed attempt SHALL carry the kill class in a kill field and SHALL keep class for the FailureClass.
Scenario: deadline-kill-line
- WHEN the step receives SIGTERM after the time budget ends
- THEN the result line has
class=timeoutandkill=deadline, and the step exits 143.
Requirement: evicted-attempt-writes-no-line
An evicted attempt SHALL write no result line and SHALL exit 75 before the time budget ends.
Scenario: eviction-before-budget
- WHEN the step receives SIGTERM before the time budget ends
- THEN the step exits 75 and writes no result line.
Requirement: specs-updated
The change SHALL update the roadmap-service-logs and roadmap-stage/fix-plan specs with the kill field and the eviction no-line rule.
Scenario: openspec-validate
- WHEN the change is validated with
openspec validate - THEN the validation reports no error.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers the need: the kill class is a field of the project's own JSONL result line (src/devops_cli/roadmap/job_result.py), and no external tool writes that line. The change extends one field of the result line and adds its tests. The written cost is an estimated 2,000 tokens to add, keep and fix the field and the tests, and about 1 hour of elapsed time.
Key questions
- Which field records the kill class of a killed attempt?: A
killfield on the result line. Theclassfield keeps theFailureClass.kill_ofinsrc/devops_cli/roadmap/attempt_kill.pygives the value from the time budget:evictedbefore it,deadlineafter it. (best practice) [sources: src/devops_cli/roadmap/attempt_kill.py, docs/CLUSTER.md:101, src/devops_cli/roadmap/failure.py:74, src/devops_cli/roadmap/job_result.py:9]- Rejected: Reuse
classforevicted,deadlineandoom. It overwrites theFailureClasstelemetry thatsrc/devops_cli/roadmap/failure.py:74defines. - Chosen: Add a
killfield. It keepsFailureClassand matches thekill=deadlineterm thatdocs/CLUSTER.md:101uses. - Rejected: Add an
end_classfield. It gives a second name for the same value and departs from the term the docs use.
- Rejected: Reuse
- What does an evicted attempt write?: No result line. The step exits 75 and the Job retries the pod. An eviction is not a failure of the item, and a result line needs a
FailureClass. (best practice) [sources: docs/CLUSTER.md:101, docs/SERVICE_PATTERNS.md:65, src/devops_cli/roadmap/job_result.py:9, k8s/devops/cronjob-stage.yaml]- Chosen: Write no line and exit 75.
docs/CLUSTER.md:101anddocs/SERVICE_PATTERNS.md:65state this rule, and thepodFailurePolicyIgnoreonDisruptionTargetkeeps the retry. - Rejected: Write
kill=evictedwith noclass. The result line requires aFailureClass(src/devops_cli/roadmap/job_result.py:9). - Rejected: Write
kill=evictedwithclass=ci_infra. It records a failure class for an event that is not a failure of the item.
- Chosen: Write no line and exit 75.
- Can the step read the pod status to get
DisruptionTargetor the OOM kill?: No. The pod mounts no service account token, so the step cannot read its pod status. The time budget gives onlyevictedanddeadline. An OOM kill has no source in the pod. [sources: src/devops_cli/roadmap/attempt_kill.py, k8s/devops/cronjob-stage.yaml, docs/CLUSTER.md:101]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 25, 2026
Both add fields to roadmap result lines; #5500 is the umbrella covering all fields, the candidate covers only the kill-class sub-item.devops-cli-service commentedon Nov 25, 2026
Next step: the alternatives check records a verdict. See the section Proposed design of the body.