Skip to content

fix(hardening): defect PR #3613 missing declared surface hardening #3619

Closed as not planned

Description

@github-actions

Unhardened Defect PR Audit Finding

Defect Pull Request #3613 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 3613 fixed the stage job's missing dependency on a path that an open plan creates, and added regression tests under tests/roadmap/. The hardening audit at merge time counted only eight surfaces and reported the pull request as missing a guardrail; a later change added tests/ and openspec/specs/ to the declared surfaces. The change adds a written root-cause lesson that names the defect and shows the audit now counts the guardrail.

Acceptance criteria

Requirement: Guardrail in a declared surface

The change MUST add a guardrail for the root cause of pull request 3613 to at least one declared hardening surface.

Scenario: The audit reports the change as hardened

  • WHEN The hardening audit runs over the files that the pull request changes.
  • THEN It reports the pull request as hardened and names the surface that holds the guardrail.

Requirement: Guardrail names the defect

The guardrail MUST name pull request 3613 and the defect that it fixed.

Scenario: The guardrail fails

  • WHEN The guardrail detects the defect again.
  • THEN Its message names pull request 3613 and the defect.

Requirement: Guardrail fails when the defect returns

The guardrail MUST fail when the defect returns to the tree.

Scenario: A tree that holds the defect

  • WHEN The guardrail runs on a small tree or a canned input that holds the defect.
  • THEN The guardrail fails, and its message names the defect.

Existing Tool Considered

No alternatives check has run. No open, maintained tool covers the need. danger runs pull-request rules and is open and maintained, but it adds a Node.js toolchain to this Python repository and needs the same table of declared surfaces. The repository's own pr-hardening-audit workflow makes the check, so the change adds one guardrail and its proof and builds no tool. Cost of that code: about 30k tokens to build, about 5k tokens a month to keep and fix, and about half a day of elapsed time.

Key questions

  • Which form does the guardrail take?: A regression test in the test file of the behaviour that it pins. When the defect is a property of committed files or tool configuration, the guardrail is a row of devops ci instead. (best practice) [sources: docs/TESTING.md, AGENTS.md, CONTRIBUTING.md]
    • Chosen: Regression test in the behaviour's test file, or a devops ci row for a committed-file property. Both forms fail when the defect returns, and docs/TESTING.md sends each change to one of them.
    • Rejected: A document edit alone. A document cannot fail, so the regression returns unnoticed.
    • Rejected: A rule-pack rule alone. A rule needs passing ruleid:/ok: tests and a person's merge, so it is the form only for a missed review finding.
    • Rejected: No guardrail, and a comment on the issue. The invariant requires a guardrail in a declared surface.

Open questions

  • Which defect did pull request 3613 fix, and which file holds its root cause? (missing verified source)
  • How does the hardening audit treat a pull request that changes no declared hardening surface? (missing verified source)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/bug
    status/new
    value/medium
    effort/low
    on Nov 5, 2026
  2. devops-cli-service commented on Nov 5, 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 required process step was skipped for one PR; it is important but does not break runtime behaviour.
    • Value: Medium. It closes a compliance gap for one PR and prevents a class of regressions, but affects a single merge.
    • Effort: Low. The work is to add guardrails or lessons to one or more declared surfaces for a single PR.
    • Related: fix(hardening): defect PR #3608 missing declared surface hardening #3618, which asks for a different change. Both are hardening audit findings for a specific defect PR, but the candidate targets PR #3613 while #3618 targets PR #3608.
  3. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 27c7019 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.

    • Which defect did pull request 3613 fix, and which file holds its root cause? (missing verified source)
    • How does the hardening audit treat a pull request that changes no declared hardening surface? (missing verified source)
  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 3613
    • 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 #3613 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