Skip to content

fix(hardening): defect PR #3512 missing declared surface hardening #3515

Closed as not planned

Description

@github-actions

Unhardened Defect PR Audit Finding

Defect Pull Request #3512 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 #3512 fixed a defect and merged without a root-cause guardrail in a declared hardening surface. The change adds the missing guardrail. The guardrail must stop the defect from returning.

Acceptance criteria

Requirement: Declared surface guardrail

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

Scenario: The hardening audit reports hardened

  • WHEN the hardening audit checks the changed files of the pull request
  • THEN it finds a declared hardening surface and reports the pull request as hardened.

Requirement: Guardrail fails on the defect

The guardrail SHALL fail on the base commit and pass with the change.

Scenario: The guardrail runs on the base commit

Requirement: Guardrail names the root cause

The guardrail MUST name PR #3512 and the root cause in its text.

Scenario: The guardrail text is searched

Requirement: Regression test joins the behavior file

A regression test SHALL join the test file of the behavior that it pins.

Scenario: The test file is inspected

Existing Tool Considered

No alternatives check has run. No open, maintained tool covers this need: the need is a repository-specific regression test. The change writes no product code. The test costs about 1,500 tokens to build, 500 tokens a year to keep, and 10 minutes to run.

Key questions

  • Does the hardening audit count a test as a declared hardening surface?: Yes. The audit counts a test and a living spec, in addition to the documents and configuration that the issue lists. [sources: openspec/specs/pr-hardening-audit/spec.md]
  • Which declared hardening surface should hold the guardrail?: Add a regression test in the test file of the behavior that PR fix(config): config unset --dry-run writes nothing, hides credentials #3512 fixed. (best practice) [sources: docs/TESTING.md, AGENTS.md, openspec/specs/pr-hardening-audit/spec.md]
    • Chosen: Regression test in the behavior test file. It fails when the defect returns, and docs/TESTING.md says a regression test joins the file of the behavior it pins.
    • Rejected: Lesson in a document. A document does not fail when the defect returns.
    • Rejected: Rule in the review rule pack. A rule pack rule fits a static pattern, not a behavior regression.
  • Should the change add a document lesson as well as the test?: No. Add only the test. (best practice) [sources: AGENTS.md, docs/TESTING.md]
    • Chosen: Test only. One executable guardrail covers the invariant and avoids duplicate text.
    • Rejected: Test and document. The document would restate the test and drift.
    • Rejected: Document only. A document does not fail on the defect.
  • Does a fix pull request that changes only tests get a fail-to-pass check?: No. The fail-to-pass check runs only for a fix that changes src/ outside the knowledge base. A person runs the new test on the base commit. [sources: CONTRIBUTING.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 compliance gap that risks recurrent regressions but does not break current functionality.
    • Value: Medium. Prevents future regressions by codifying root-cause guardrails, but does not change user-facing behaviour.
    • Effort: Low. Adding guardrail text to one or more existing documentation surfaces for a single PR is a small task.
    • Related: fix(hardening): defect PR #3452 missing declared surface hardening #3459, which asks for a different change. Both follow the same audit pattern for unhardened defect PRs, but each targets a different PR and requires its own guardrail additions.
  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 3512
    • 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 #3512 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