Repository navigation
Description
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.mdARCHITECTURE.mdSECURITY.mdCONTRIBUTING.mdsrc/devops_cli/ai/tasks/*.mdsrc/devops_cli/ai/knowledge_base/.devops/review.tomlsrc/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
- WHEN the guardrail runs against the base commit of the change
- THEN it fails because the defect that PR fix(config): config unset --dry-run writes nothing, hides credentials #3512 fixed is present.
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
- WHEN the guardrail file is searched for 3512
- THEN the match names PR fix(config): config unset --dry-run writes nothing, hides credentials #3512 and the root cause.
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
- WHEN the change is compared with the base branch
- THEN the new test sits in an existing behavior test file and no new file is named after PR fix(config): config unset --dry-run writes nothing, hides credentials #3512.
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
- What defect did PR fix(config): config unset --dry-run writes nothing, hides credentials #3512 fix, and what root cause must the guardrail prevent? (missing verified source)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 4, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.hardening, and .github/labels.yml declares no scope/hardening label. Add the label to the file to give the scope to this item.A process compliance gap that risks recurrent regressions but does not break current functionality.Prevents future regressions by codifying root-cause guardrails, but does not change user-facing behaviour.Adding guardrail text to one or more existing documentation surfaces for a single PR is a small task.Both follow the same audit pattern for unhardened defect PRs, but each targets a different PR and requires its own guardrail additions.devops-cli-service commentedon Nov 5, 2026
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.
dan-petty commentedon Nov 11, 2026
Closed as not planned. The check that filed this item passes now.
uv run devops pr hardening-report --pr 3512is_hardened: true. The hardened surfaces aretests/andopenspec/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.