Repository navigation
Description
Unhardened Defect PR Audit Finding
Defect Pull Request #3639 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
Defect PR #3639 merged without a guardrail or lesson in a declared hardening surface. The root cause can return as a regression. The change adds the missing guardrail to the owning surface and records the lesson.
Acceptance criteria
Requirement: Root-cause guardrail
The change SHALL add one root-cause guardrail for the defect of PR #3639 to a declared hardening surface or a regression test.
Scenario: Hardening surface changes
- WHEN The pull request diff is compared with main.
- THEN At least one declared surface file or regression test changes, and the guardrail names PR fix(security): keep prose after a token colon unmasked #3639.
Requirement: Base failure proof
The guardrail MUST fail on the commit before PR #3639 and pass on current main.
Scenario: Base replay
- WHEN The guardrail runs on the parent commit of PR fix(security): keep prose after a token colon unmasked #3639.
- THEN It fails with the defect that PR fix(security): keep prose after a token colon unmasked #3639 fixed, and it passes on current main.
Requirement: Owning document citation
The guardrail SHALL cite its owning document and PR #3639.
Scenario: Owning document link
- WHEN A reader opens the new guardrail.
- THEN The guardrail cites the owning document and PR fix(security): keep prose after a token colon unmasked #3639.
Requirement: Hardening audit result
The hardening audit MUST report the pull request as hardened.
Scenario: Audit run
- WHEN The hardening audit runs on the pull request.
- THEN It reports the pull request as hardened and names the changed surface.
Existing Tool Considered
No check has run. pytest is the open, maintained test runner that covers the regression-test mechanism. It lacks the project-specific root cause of PR #3639. The change builds no new tool, so the build cost is zero tokens and zero elapsed time.
Key questions
- Which defect did PR fix(security): keep prose after a token colon unmasked #3639 fix, and what root cause must the guardrail pin?: The diff and the linked issue of PR fix(security): keep prose after a token colon unmasked #3639 name the changed code and the failure that it fixed. [sources: AGENTS.md]
- Which declared surface should hold the guardrail for the defect of PR fix(security): keep prose after a token colon unmasked #3639?: Use the surface that owns the behavior. Add a regression test in its test file. Add a lesson to docs/TESTING.md only when the test convention changes. (best practice) [sources: docs/TESTING.md, CONTRIBUTING.md, AGENTS.md]
- Chosen: Regression test in the owning test file. A test counts as a hardening surface and fails offline when the defect returns.
- Rejected: Lesson only in a document. A document does not fail when the defect returns.
- Rejected: New rule in .devops/review.toml or src/devops_cli/review/rules/. A static rule fits only a defect that a scanner can express. The PR diff decides.
- How does the change prove that the guardrail catches the defect?: Run the guardrail on the parent commit of PR fix(security): keep prose after a token colon unmasked #3639. Cite the failing run. Run it on current main. Cite the passing run. (best practice) [sources: CONTRIBUTING.md, docs/TESTING.md]
- Chosen: Base replay with fail-to-pass evidence. It shows that the guardrail fails without the fix and passes with it.
- Rejected: Passing run on main only. It does not show that the guardrail detects the defect.
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 process-compliance gap that weakens regression prevention but does not break a user-facing feature.It closes a governance gap and reduces the chance of a repeat regression from PR #3639.The work is to add guardrails or lessons to one or more declared surfaces for a single PR.Both items follow the same hardening-audit template, but this one covers PR #3639 while 3619 covers PR #3613.devops-cli-service commentedon Nov 6, 2026
Refine cannot set this item to Ready at cda72c7. A bot opened the item, so a review of the issue and of the proposal must approve it first. The review found the defects below. A person edits the body to answer them. The next refine round looks at the item again only after a body edit.
false_premiseat key_questions[1] and acceptance_criteria[0]: The plan says a regression test counts as a declared hardening surface. The issue lists eight declared surfaces and none is a test file. The plan weakens the issue requirement. Evidence: "A test counts as a hardening surface and fails offline when the defect returns."false_premiseat key_questions[0]: The plan claims that the diff and linked issue of PR fix(security): keep prose after a token colon unmasked #3639 name the defect. Neither the issue nor the files show this. The plan never states the defect, so the guardrail has no known target. Evidence: "The diff and the linked issue of PR fix(security): keep prose after a token colon unmasked #3639 name the changed code and the failure that it fixed."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 3639is_hardened: true. The hardened surfaces aretests/andopenspec/specs/.#3684 (merged 2026-11-05) counts tests and specs as hardening guardrails. Thus PR #3639 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.