Repository navigation
Description
Unhardened Defect PR Audit Finding
Defect Pull Request #3475 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
Pull request #3475 merged a defect fix and added no guardrail to a declared hardening surface. The same root cause can return, and nothing fails when it does. This change adds the missing guardrail and proves that the guardrail fails on the defect.
Acceptance criteria
Requirement: Guardrail on a declared surface
The change SHALL add the root-cause guardrail of PR #3475 to at least one declared hardening surface.
Scenario: Declared surface changed
- WHEN git lists the files that the branch changes against origin/main
- THEN the list holds at least one path of a declared hardening surface
Requirement: The check fails on the defect
The guardrail check SHALL fail on a tree that holds the defect pattern.
Scenario: Small tree with the defect
- WHEN the guardrail check runs on a small tree that holds the defect pattern
- THEN the check fails and its message names the rule and the path
Requirement: The check passes on the default tree
The guardrail check MUST pass on the tree of the default branch.
Scenario: Default tree without the defect
- WHEN the guardrail check runs on the tree of the default branch
- THEN the check passes with no finding
Requirement: Spec delta records the rule
The change folder SHALL hold a spec delta whose requirement states the guardrail with SHALL or MUST.
Scenario: OpenSpec check of the change folder
- WHEN uv run devops openspec check runs on the change folder
- THEN the check passes and the delta holds the guardrail requirement with one scenario
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library covers this need: the guardrail is a rule of this repository, and the repository's own hardening audit detects the gap but adds no guardrail. The change builds a small invariant check: about 25k tokens to build, 5k a year to keep and 20k to fix, and about 3 hours elapsed.
Key questions
- Does the fail-to-pass check apply to this change?: No. The check runs only for a fix pull request that changes src/ outside the knowledge base. This change touches tests and documents. [sources: CONTRIBUTING.md]
- Which declared surface carries the guardrail?: A test under tests/, with the requirement in the spec delta of the change folder. (best practice) [sources: AGENTS.md, docs/TESTING.md]
- Chosen: A test under tests/. A test fails when the defect returns. AGENTS.md rule 11 asks for a check that fails on the return of the problem, and the audit counts a test as a surface.
- Rejected: A rule in CONTRIBUTING.md or AGENTS.md. A document states the rule and fails on no change.
- Rejected: A living spec requirement. Only openspec archive writes the spec, and a spec fails on no change. The spec delta records the rule beside the test.
- Rejected: A suppression in .devops/review.toml. A suppression hides a finding and guards nothing.
- How does the change prove that the guardrail works?: The logic of the check runs on a small tree that holds the defect pattern, fails there, and passes on a tree without it. (best practice) [sources: docs/TESTING.md]
- Chosen: A small tree that holds the defect pattern. docs/TESTING.md gives a check a small tree and starts no program. The check shows its failure offline.
- Rejected: A fail-to-pass replay. The defect is already fixed on the base, so an added test passes there and the replay proves nothing.
- Rejected: A manual check. A manual check cannot run again with the same answer.
Open questions
- Which defect did PR fix(roadmap): the path problem names the (new) mark of a plan folder #3475 fix, and which root cause must the guardrail cover? (missing verified source)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 5, 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.It enforces a project invariant but does not block a user-facing feature or fix a live defect.It prevents recurrent regressions from the same root cause but does not change user-visible behaviour.It requires adding guardrail text to one or more existing documentation or rule files.Both follow the same audit template for unhardened defect PRs, but each targets a different PR and its specific root-cause guardrails.devops-cli-service commentedon Nov 6, 2026
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.
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 3475is_hardened: true. The hardened surfaces aretests/andopenspec/specs/.#3684 (merged 2026-11-05) counts tests and specs as hardening guardrails. Thus PR #3475 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.