Repository navigation
Description
Unhardened Defect PR Audit Finding
Defect Pull Request #3521 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 #3521 merged a defect fix without a root-cause guardrail on a declared hardening surface. The regression can return. This change adds the missing guardrail and a regression test that pins the defect.
Acceptance criteria
Requirement: Declared surface guardrail
The change SHALL add a root-cause guardrail for PR #3521 to at least one declared hardening surface.
Scenario: Hardening audit passes
- WHEN The pr-hardening-audit runs on the pull request diff.
- THEN It reports the pull request as hardened and names the surface.
Requirement: Regression test
The change SHALL add a regression test that fails on the base commit of PR #3521 and passes on the fixed tree.
Scenario: Fail-to-pass replay
- WHEN The new test runs on the base commit of PR fix(roadmap): the App token can push a workflow file #3521.
- THEN It fails with an assertion that names the defect, and it passes on the fixed tree.
Requirement: Test location
The regression test SHALL sit in the existing test module for the behavior that it pins.
Scenario: Behavior module
- WHEN The changed test files are listed.
- THEN No file is named after issue 3525 or PR 3521, and the new test is in the module of its behavior.
Requirement: Root cause citation
The guardrail SHALL name PR #3521 and state its root cause in the test or the owning document.
Scenario: Citation present
- WHEN The guardrail text is read.
- THEN It names PR fix(roadmap): the App token can push a workflow file #3521 and states the root cause.
Requirement: Checks pass
The change MUST pass uv run devops ci and devops ci fail-to-pass --base .
Scenario: Full gate and fail-to-pass
- WHEN
uv run devops cianddevops ci fail-to-pass --baserun. - THEN Both exit 0.
Existing Tool Considered
No alternatives check has run. pytest is the open, maintained test runner that covers the regression test; it lacks the defect-specific assertion, which this change writes. The change builds no new test framework.
Key questions
- Which declared hardening surface should hold the guardrail?: Use a regression test in the existing test module for the behavior. Add the root-cause lesson to the owning document when the test alone does not state it. (best practice) [sources: AGENTS.md, CONTRIBUTING.md, docs/TESTING.md]
- Chosen: Regression test in the behavior test module. A test fails on the base and pins the defect, as AGENTS.md rule 4 and docs/TESTING.md require.
- Rejected: Documentation update only. A document does not fail when the defect returns.
- Rejected: Review rule only. A review rule needs a person or a model to apply it and does not prove the defect.
- Rejected: Task prompt only. A task prompt guides an agent but does not test the defect.
- Where should the regression test live?: In the existing test module for the behavior that the test pins. (best practice) [sources: docs/TESTING.md]
- Chosen: Existing behavior test module. docs/TESTING.md says a regression test joins the file of the behavior it pins.
- Rejected: New file named after PR fix(roadmap): the App token can push a workflow file #3521. docs/TESTING.md forbids a file named after the work that produced it.
- Rejected: tests/invariants/. That directory holds tests of committed files, not behavior.
- How does the change prove the regression test catches the defect?: Run
devops ci fail-to-pass --baseand show that the new test fails on the base and passes on the fixed tree. [sources: CONTRIBUTING.md, docs/TESTING.md]
Open questions
- What defect and root cause did PR fix(roadmap): the App token can push a workflow file #3521 fix? (missing verified source)
- Which files did PR fix(roadmap): the App token can push a workflow file #3521 change? (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 invariant was violated, but no user-facing defect is active.Adding guardrails prevents the same class of regression from recurring.The work is to add guardrail text to one or more existing declared surface files.Both follow the same audit pattern of adding missing hardening guardrails, but each targets a different defect PR (#3521 vs #3512).devops-cli-service commentedon Nov 5, 2026
Refine cannot set this item to Ready at be8d18a 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 3521is_hardened: true. The hardened surfaces aretests/andopenspec/specs/.#3684 (merged 2026-11-05) counts tests and specs as hardening guardrails. Thus PR #3521 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.