Skip to content

fix(roadmap): a failed archive validation stops with the class test #4503

Closed

Description

@dan-petty

Problem Description

The implement job stopped item #3462 at the archive step with the failure class test and the action repair. No test failed. uv run devops openspec archive 3462-accept-a-test-only-group-that applied the archive, and then openspec validate --all --strict refused spec/roadmap-stage: "requirements[247]: Requirement text is very long (>500 characters)". The output of the archive holds the line "Totals: 258 passed, 1 failed (259 items)".

classify_failure (src/devops_cli/roadmap/failure.py) reads the text rules before the check name. The test rule of _CHECK_RULES matches \d+ failed\b, so "1 failed" makes the class test. The check name is the archive command, which _CHECK_NAMES maps to lint ("openspec"), but the text rule wins.

The cause is in the plan: the MODIFIED requirement of openspec/changes/3462-accept-a-test-only-group-that/specs/roadmap-stage/spec.md on main has 543 characters of requirement text. The stage plan merged it, and only the strict validation of the archive refuses it. #3429 adds the OpenSpec validation to the implement plan gate, which can catch such a plan earlier.

Reproduction Steps

  1. Merge a plan whose spec delta has a requirement text longer than 500 characters.
  2. Run the implement job on the item until the archive step.
  3. Read the stop comment on the item.

Expected vs Actual Behavior

Expected: a stop on the validation of the specs after the archive has a class that names the cause (the plan, plan_defect, or lint) and an action that a person or the job can take.

Actual: the class is test and the action left is repair: "give the failure to a fix step". The Service does not clear the stop, and a fix step has no failed test to fix.

Environment Diagnostics

Runner Job devops-cli-runner-20261111-022552-5e9a, item #3462, pull request #4465.

Logs, Traces, or Terminal Output

Stopped at archive.
Failed check: `uv run devops openspec archive 3462-accept-a-test-only-group-that`.
Failure class: `test`.
Action left: `repair`: give the failure to a fix step.
    Totals: 258 passed, 1 failed (259 items)
    ✗ spec/roadmap-stage
      ⚠ [WARNING] requirements[247]: Requirement text is very long (>500 characters).

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Proposed design

Problem statement

The archive step runs the OpenSpec strict validation after it archives a change. A plan with a requirement text longer than 500 characters fails this validation. classify_failure reads the text rule \d+ failed before the name of the check. The totals line Totals: 258 passed, 1 failed (259 items) then gives the class test and the action repair. No test failed, so a fix step has nothing to fix. The change narrows the test rule, and the openspec check name gives the class lint.

Acceptance criteria

Requirement: Archive validation class

classify_failure SHALL classify the OpenSpec strict validation output after an archive as lint.

Scenario: OpenSpec totals line

  • WHEN the evidence holds the check uv run devops openspec archive 3462-accept-a-test-only-group-that and the log line Totals: 258 passed, 1 failed (259 items).
  • THEN classify_failure returns FailureClass.LINT.

Requirement: Pytest summary class

classify_failure SHALL keep a pytest summary line in the class test.

Scenario: Pytest summary with equals

  • WHEN the log holds the line ============ 1 failed, 258 passed in 12.34s ============.
  • THEN classify_failure returns FailureClass.TEST.

Requirement: Quiet pytest summary class

classify_failure SHALL keep a quiet pytest summary line in the class test.

Scenario: Quiet pytest summary

  • WHEN the log holds the line 1 failed, 258 passed in 12.34s.
  • THEN classify_failure returns FailureClass.TEST.

Requirement: Archive stop action

The stop of a failure whose class is lint SHALL leave the action repair.

Scenario: Left action of a lint stop

  • WHEN left_action is called with FailureClass.LINT and no action was taken.
  • THEN it returns FailureAction.REPAIR.

Existing Tool Considered

No check has run. No open, maintained tool or library covers this need: the failure classifier of the implement job is existing project code. The change edits one regular expression in src/devops_cli/roadmap/failure.py and adds cases to tests/roadmap/test_roadmap_failure.py. It builds no new code, so it has no build cost.

Key questions

  • Why does the archive validation stop take the class test?: classify_failure reads _CHECK_RULES on the log before _CHECK_NAMES on the check. The test rule \d+ failed\b matches 1 failed in the OpenSpec totals line. The rule wins over the check name openspec, which _CHECK_NAMES maps to lint. [sources: src/devops_cli/roadmap/failure.py:276, src/devops_cli/roadmap/failure.py:309, src/devops_cli/roadmap/failure.py:336, src/devops_cli/roadmap/failure.py:345]
  • Which class should the OpenSpec strict validation failure take?: lint. The check is the devops openspec archive command, and _CHECK_NAMES already maps openspec to lint. A fix step can shorten the requirement text in the spec. (best practice) [sources: src/devops_cli/roadmap/failure.py:309, src/devops_cli/roadmap/failure.py]
    • Chosen: lint. The check-name table maps the openspec command to lint, and a fix step can shorten the spec text.
    • Rejected: plan_defect. Its action is amend, but the plan is merged and archived, so no change folder is left to amend.
    • Rejected: ci_infra. The failure is deterministic and names a spec defect, so a retry gives the same stop.
  • How should the classifier stop the test rule from matching the OpenSpec totals line?: Narrow the test rule so \d+ failed matches only a pytest summary at the start of a line or after a run of =. The check name then gives lint for the openspec command. (best practice) [sources: src/devops_cli/roadmap/failure.py:276, src/devops_cli/roadmap/failure.py:345]
    • Chosen: Narrow the test rule. A totals line of another tool no longer matches, and the openspec entry of _CHECK_NAMES gives lint.
    • Rejected: Add an OpenSpec lint pattern. It depends on the warning text of an external tool, which can change.
    • Rejected: Read the check name before the text rules. It changes the documented rule order and can hide a real test failure in a check with another name.
  • Which test module holds the table test of classify_failure?: tests/roadmap/test_roadmap_failure.py. It holds the table test of the class of each evidence. [sources: tests/roadmap/test_roadmap_failure.py]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

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

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It blocks one item's delivery with a wrong action, but the scope is narrow and a workaround exists.
    • Value: Medium. It removes a confusing stop that sends a person or the job down the wrong repair path.
    • Effort: Low. The fix is a rule-ordering or guard change in one function in failure.py.
    • Related: fix(roadmap): a stop carries a typed class and the failed check #3476, which asks for a different change. Both address wrong failure classes in the roadmap stop, but #3476 built the typed-class mechanism while this candidate fixes a specific rule-ordering bug in classify_failure.
  3. added
    priority/p2-medium
    owner/agent
    on Nov 11, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

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

  6. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 11, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 11, 2026
  8. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 14:13 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/p2-mediumscope/roadmapsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions