Skip to content

feat(roadmap): record the kill class of a killed attempt #7078

Backlog

Description

@devops-cli-service

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=timeout and kill=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 kill field on the result line. The class field keeps the FailureClass. kill_of in src/devops_cli/roadmap/attempt_kill.py gives the value from the time budget: evicted before it, deadline after 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 class for evicted, deadline and oom. It overwrites the FailureClass telemetry that src/devops_cli/roadmap/failure.py:74 defines.
    • Chosen: Add a kill field. It keeps FailureClass and matches the kill=deadline term that docs/CLUSTER.md:101 uses.
    • Rejected: Add an end_class field. It gives a second name for the same value and departs from the term the docs use.
  • 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:101 and docs/SERVICE_PATTERNS.md:65 state this rule, and the podFailurePolicy Ignore on DisruptionTarget keeps the retry.
    • Rejected: Write kill=evicted with no class. The result line requires a FailureClass (src/devops_cli/roadmap/job_result.py:9).
    • Rejected: Write kill=evicted with class=ci_infra. It records a failure class for an event that is not a failure of the item.
  • Can the step read the pod status to get DisruptionTarget or the OOM kill?: No. The pod mounts no service account token, so the step cannot read its pod status. The time budget gives only evicted and deadline. 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

  1. added
    type/feature
    source/agent
    scope/roadmap
    status/new
    on Nov 25, 2026
  2. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    ContributorAuthor
  3. added
    value/medium
    effort/medium
    priority/p2-medium
    on Nov 25, 2026
  4. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

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/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions