Repository navigation
Description
Unhardened Defect PR Audit Finding
Defect Pull Request #3608 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 #3608 fixed a defect but added no guardrail or lesson to a declared hardening surface. The project requires a defect fix to record its root cause. This change adds the missing lesson to docs/TESTING.md and an invariant test that holds it.
Acceptance criteria
Requirement: Hardening entry in TESTING.md
The change SHALL add a hardening entry to docs/TESTING.md that names pull request #3608 and its defect.
Scenario: Entry exists
- WHEN A reader opens docs/TESTING.md
- THEN The file holds a section that names pull request fix(github): send a GET again when its connection is lost #3608 and the defect that it fixed.
Requirement: Guardrail is named
The hardening entry SHALL name a regression test or a negative search command that fails on the base revision.
Scenario: Guardrail is named
- WHEN A reader opens the hardening entry
- THEN The entry holds a path under tests/ or a command in the ! git grep form.
Requirement: Regression test fails on base
The named regression test MUST fail on the base revision and pass on the change.
Scenario: Base replay
- WHEN The named test runs on the base revision
- THEN It fails and names the defect of pull request fix(github): send a GET again when its connection is lost #3608.
Requirement: Invariant holds the entry
An invariant test SHALL fail when the hardening entry for pull request #3608 is absent.
Scenario: Entry is removed
- WHEN The invariant test runs on a tree without the entry
- THEN The test fails and names pull request fix(github): send a GET again when its connection is lost #3608.
Existing Tool Considered
No alternatives check has run. The open, maintained pytest library covers the invariant test, and the repository already uses it. No tool covers a project-specific hardening record. A custom tool would cost about 1,500 tokens to build, 300 tokens per month to keep, and 30 minutes of elapsed time.
Key questions
- Which declared hardening surface should hold the guardrail for pull request fix(github): send a GET again when its connection is lost #3608?: docs/TESTING.md holds the lesson, and an invariant test holds the entry. The file owns the test conventions and is a declared surface. (best practice) [sources: docs/TESTING.md, AGENTS.md]
- Chosen: docs/TESTING.md. It owns the test conventions and is a declared surface.
- Rejected: ARCHITECTURE.md. The issue names no design defect.
- Rejected: SECURITY.md. The issue names no security defect.
- Rejected: src/devops_cli/review/rules/. The issue gives no rule pattern.
- Rejected: src/devops_cli/ai/tasks/*.md. A task prompt repeats the rule for agents and does not hold the lesson.
- What defect did pull request fix(github): send a GET again when its connection is lost #3608 fix, and what root cause must the guardrail prevent?: The defect and its root cause are in pull request fix(github): send a GET again when its connection is lost #3608. The guardrail must name both. [sources: AGENTS.md]
- How does the change prove the hardening entry stays in place?: An invariant test reads docs/TESTING.md and fails when the entry for pull request fix(github): send a GET again when its connection is lost #3608 is absent. (best practice) [sources: docs/TESTING.md]
- Chosen: Invariant test. It checks the committed file offline.
- Rejected: Manual review. It does not fail when the entry is removed.
- Rejected: CI grep row. It adds a new gate row for one entry.
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 is a process compliance gap that prevents future regressions but does not block users.Adding guardrails reduces the chance of the same class of defect recurring.The work is to add lessons or rules to one or more existing documentation surfaces.Both are audit findings for a specific defect PR missing hardening, but each targets a different PR number.devops-cli-service commentedon Nov 6, 2026
Refine cannot set this item to Ready at 27c7019. 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]: The plan does not state what defect pull request fix(github): send a GET again when its connection is lost #3608 fixed. The issue and the input give no detail, so the plan cannot name the defect or the root cause. The answer is circular. Evidence: "The defect and its root cause are in pull request fix(github): send a GET again when its connection is lost #3608. The guardrail must name both."spec_delta_wrongat acceptance_criteria[2] Regression test fails on base: The scenario needs a named regression test, but the plan names none and does not know the defect. No test can assert that a test fails on the base revision and names the defect. Evidence: "The named regression test MUST fail on the base revision and pass on the change."false_premiseat existing_tool: The plan says that no alternatives check has run, yet it claims that the repository already uses pytest. It also gives cost figures. Nothing in the input supports these claims, andfilesis empty. Evidence: "No alternatives check has run. The open, maintained pytest library covers the invariant test, and the repository already uses it."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 3608is_hardened: true. The hardened surfaces aretests/andopenspec/specs/.#3684 (merged 2026-11-05) counts tests and specs as hardening guardrails. Thus PR #3608 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.