Skip to content

fix(hardening): defect PR #3639 missing declared surface hardening #3643

Closed as not planned

Description

@github-actions

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.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

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

Requirement: Base failure proof

The guardrail MUST fail on the commit before PR #3639 and pass on current main.

Scenario: Base replay

Requirement: Owning document citation

The guardrail SHALL cite its owning document and PR #3639.

Scenario: Owning document link

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

  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. A process-compliance gap that weakens regression prevention but does not break a user-facing feature.
    • Value: Medium. It closes a governance gap and reduces the chance of a repeat regression from PR #3639.
    • Effort: Low. The work is to add guardrails or lessons to one or more declared surfaces for a single PR.
    • Related: fix(hardening): defect PR #3613 missing declared surface hardening #3619, which asks for a different change. Both items follow the same hardening-audit template, but this one covers PR #3639 while 3619 covers PR #3613.
  3. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    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_premise at 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_premise at 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."
  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 3639
    • 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 #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.

  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