Skip to content

fix(hardening): defect PR #3521 missing declared surface hardening #3525

Closed as not planned

Description

@github-actions

Unhardened Defect PR Audit Finding

Defect Pull Request #3521 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

Pull request #3521 merged a defect fix without a root-cause guardrail on a declared hardening surface. The regression can return. This change adds the missing guardrail and a regression test that pins the defect.

Acceptance criteria

Requirement: Declared surface guardrail

The change SHALL add a root-cause guardrail for PR #3521 to at least one declared hardening surface.

Scenario: Hardening audit passes

  • WHEN The pr-hardening-audit runs on the pull request diff.
  • THEN It reports the pull request as hardened and names the surface.

Requirement: Regression test

The change SHALL add a regression test that fails on the base commit of PR #3521 and passes on the fixed tree.

Scenario: Fail-to-pass replay

Requirement: Test location

The regression test SHALL sit in the existing test module for the behavior that it pins.

Scenario: Behavior module

  • WHEN The changed test files are listed.
  • THEN No file is named after issue 3525 or PR 3521, and the new test is in the module of its behavior.

Requirement: Root cause citation

The guardrail SHALL name PR #3521 and state its root cause in the test or the owning document.

Scenario: Citation present

Requirement: Checks pass

The change MUST pass uv run devops ci and devops ci fail-to-pass --base .

Scenario: Full gate and fail-to-pass

  • WHEN uv run devops ci and devops ci fail-to-pass --base run.
  • THEN Both exit 0.

Existing Tool Considered

No alternatives check has run. pytest is the open, maintained test runner that covers the regression test; it lacks the defect-specific assertion, which this change writes. The change builds no new test framework.

Key questions

  • Which declared hardening surface should hold the guardrail?: Use a regression test in the existing test module for the behavior. Add the root-cause lesson to the owning document when the test alone does not state it. (best practice) [sources: AGENTS.md, CONTRIBUTING.md, docs/TESTING.md]
    • Chosen: Regression test in the behavior test module. A test fails on the base and pins the defect, as AGENTS.md rule 4 and docs/TESTING.md require.
    • Rejected: Documentation update only. A document does not fail when the defect returns.
    • Rejected: Review rule only. A review rule needs a person or a model to apply it and does not prove the defect.
    • Rejected: Task prompt only. A task prompt guides an agent but does not test the defect.
  • Where should the regression test live?: In the existing test module for the behavior that the test pins. (best practice) [sources: docs/TESTING.md]
    • Chosen: Existing behavior test module. docs/TESTING.md says a regression test joins the file of the behavior it pins.
    • Rejected: New file named after PR fix(roadmap): the App token can push a workflow file #3521. docs/TESTING.md forbids a file named after the work that produced it.
    • Rejected: tests/invariants/. That directory holds tests of committed files, not behavior.
  • How does the change prove the regression test catches the defect?: Run devops ci fail-to-pass --base and show that the new test fails on the base and passes on the fixed tree. [sources: CONTRIBUTING.md, docs/TESTING.md]

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 process invariant was violated, but no user-facing defect is active.
    • Value: Medium. Adding guardrails prevents the same class of regression from recurring.
    • Effort: Low. The work is to add guardrail text to one or more existing declared surface files.
    • Related: fix(hardening): defect PR #3512 missing declared surface hardening #3515, which asks for a different change. Both follow the same audit pattern of adding missing hardening guardrails, but each targets a different defect PR (#3521 vs #3512).
  3. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at be8d18a 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 3521
    • 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 #3521 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