Repository navigation
Description
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.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 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 ciinstead. (best practice) [sources: docs/TESTING.md, AGENTS.md, CONTRIBUTING.md]- Chosen: Regression test in the behaviour's test file, or a
devops cirow for a committed-file property. Both forms fail when the defect returns, anddocs/TESTING.mdsends 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.
- Chosen: Regression test in the behaviour's test file, or a
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
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.A required process step was skipped for one PR; it is important but does not break runtime behaviour.It closes a compliance gap for one PR and prevents a class of regressions, but affects a single merge.The work is to add guardrails or lessons to one or more declared surfaces for a single PR.Both are hardening audit findings for a specific defect PR, but the candidate targets PR #3613 while #3618 targets PR #3608.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 3613is_hardened: true. The hardened surfaces aretests/andopenspec/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.