Skip to content

fix(hardening): defect PR #3608 missing declared surface hardening #3618

Closed as not planned

Description

@github-actions

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.md
  • ARCHITECTURE.md
  • SECURITY.md
  • CONTRIBUTING.md
  • src/devops_cli/ai/tasks/*.md
  • src/devops_cli/ai/knowledge_base/
  • .devops/review.toml
  • src/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

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

Requirement: Invariant holds the entry

An invariant test SHALL fail when the hardening entry for pull request #3608 is absent.

Scenario: Entry is removed

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

  1. added
    type/bug
    status/new
    value/medium
    effort/low
    on Nov 5, 2026
  2. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: none. The title has the scope hardening, and .github/labels.yml declares no scope/hardening label. Add the label to the file to give the scope to this item.
    • Priority: P2-Medium. It is a process compliance gap that prevents future regressions but does not block users.
    • Value: Medium. Adding guardrails reduces the chance of the same class of defect recurring.
    • Effort: Low. The work is to add lessons or rules to one or more existing documentation surfaces.
    • Related: fix(hardening): defect PR #3546 missing declared surface hardening #3551, which asks for a different change. Both are audit findings for a specific defect PR missing hardening, but each targets a different PR number.
  3. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    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_premise at 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_wrong at 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_premise at 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, and files is empty. Evidence: "No alternatives check has run. The open, maintained pytest library covers the invariant test, and the repository already uses it."
  4. dan-petty commented on Nov 11, 2026

    @dan-petty
    Owner

    Closed as not planned. The check that filed this item passes now.

    • Command: uv run devops pr hardening-report --pr 3608
    • Result: is_hardened: true. The hardened surfaces are tests/ and openspec/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.

  5. removed
    status/new
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions