Skip to content

fix(hardening): defect PR #3513 missing declared surface hardening #3516

Closed as not planned

Description

@github-actions

Unhardened Defect PR Audit Finding

Defect Pull Request #3513 was merged without adding guardrails or lessons to any declared hardening surface.

Declared Hardening Surfaces

  • docs/TESTING.md
  • ARCHITECTURE.md
  • SECURITY.md
  • CONTRIBUTING.md
  • src/devops_cli/ai/tasks/*.md
  • src/devops_cli/ai/knowledge_base/
  • .devops/review.toml
  • src/devops_cli/review/rules/

Per project invariants (AGENTS.md), defect fixes must codify root-cause guardrails into at least one declared surface to prevent recurrent regressions.

Proposed design

Problem statement

PR #3513 fixed a defect but added no guardrail to a declared hardening surface. The defect can return. This change adds the missing regression test.

Acceptance criteria

Requirement: Regression test for the defect of PR 3513

The change SHALL add a regression test for the defect that PR #3513 fixed.

Scenario: The regression test fails on the base commit

Requirement: Regression test passes on the fix

The regression test SHALL pass on the commit that holds the fix of PR #3513.

Scenario: The regression test passes on the fix

  • WHEN A person runs the new test against the commit of the fix
  • THEN The test passes.

Requirement: Regression test joins the file of the behaviour

The regression test MUST join the test file that already tests the behaviour it pins.

Scenario: No new test file named after the issue

  • WHEN A person lists the test files that the change adds or changes
  • THEN The test is in the existing file of the behaviour, and no new file is named after the issue or the pull request.

Requirement: The change passes the full gate

The change MUST pass the full uv run devops ci gate.

Scenario: The full gate passes

  • WHEN A person runs uv run devops ci
  • THEN The gate exits 0.

Existing Tool Considered

No alternatives check has run. pytest is the open, maintained test runner. It covers the regression test. It lacks the test for the defect of PR #3513. This change adds that test.

Key questions

  • Which hardening surface holds the guardrail?: A regression test in the test file of the behaviour. (best practice) [sources: docs/TESTING.md, AGENTS.md]
    • Chosen: Regression test. docs/TESTING.md requires a test for a change that adds or changes what the code does.
    • Rejected: Document update. A document states the rule but does not fail when the defect returns.
    • Rejected: Living spec update. A living spec states the requirement but does not fail when the defect returns.
    • Rejected: Rule pack rule. A rule pack rule is for a defect that a static rule can express, and the defect is not described.
  • Does the regression test join an existing test file or a new one?: It joins the existing test file of the behaviour. (best practice) [sources: docs/TESTING.md]
    • Chosen: Existing test file. docs/TESTING.md says a regression test joins the file of the behaviour it pins.
    • Rejected: New test file. docs/TESTING.md says a file is never named after the work that produced it.
  • Which open, maintained tool covers the regression test?: pytest. (best practice) [sources: docs/TESTING.md]
    • Chosen: pytest. The project runs every test with pytest.
    • Rejected: A custom checker. A custom checker adds code to build and keep, and pytest already covers the need.

Open questions

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    status/new
    value/medium
    effort/low
    on Nov 4, 2026
  2. devops-cli-service commented on Nov 4, 2026

    @devops-cli-service
    Contributor

    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: none. The title has the scope hardening, and .github/labels.yml declares no scope/hardening label. Add the label to the file to give the scope to this item.
    • Priority: P2-Medium. A project invariant is unmet, but no user-facing defect is active.
    • Value: Medium. Prevents recurrence of the specific regression from PR #3513.
    • Effort: Low. Adding guardrail text to one or more existing declared surfaces is a small edit.
    • Related: fix(hardening): defect PR #3512 missing declared surface hardening #3515, which asks for a different change. Both follow the same hardening-audit template, but the candidate targets PR #3513 while #3515 targets PR #3512.
  3. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at f481be8 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

  4. dan-petty commented on Nov 11, 2026

    @dan-petty
    Owner

    Closed as not planned. The check that filed this item passes now.

    • Command: uv run devops pr hardening-report --pr 3513
    • Result: is_hardened: true. The hardened surfaces are tests/ and openspec/specs/.

    #3684 (merged 2026-11-05) counts tests and specs as hardening guardrails. Thus PR #3513 has the guardrail that the audit did not find. #3661 closes this family of items under the issue stewards plan #4780 (AGENTS.md rule 2). If the check fails again, reopen this item.

  5. removed
    status/new
    on Nov 11, 2026
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-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions