Skip to content

Failure-class protocol and recurrence ratchets #9822

Closed as not planned
Closed as not planned

Description

@Git-on-my-level

This issue is narrowed to one self-contained, in-repository change.

The problem is that repeated defect classes are recorded only in PR prose, so agents cannot reliably reuse the known prevention primitive. Two real static failure classes have also recurred despite ad hoc review: unsafe Swift dictionary construction (#6506, #9288) and naive Python datetime sort sentinels (#9571, #9600).

Scope

  • Provide a semantic failure-class registry under .github/failure-classes/ and an offline, JSON-first CLI that prepares, explains, validates, and reports declarations.
  • Require and validate Failure-Class: FC-<slug> | new | none for reactive fix: commits; distinguish proactive harden: commits.
  • Add the two manifest-backed recurrence ratchets above, with real-incident citations.
  • Update the PR template and contributor guidance so an existing-class declaration replaces repetitive root-cause narrative; keep extended narrative only for a new class or registry lifecycle transition.
  • Require seven days of unchanged behavior and guard before a product invariant can be locked.

Out of scope

  • GitHub branch-protection changes, watchdog auto-merge behavior, external watchdog runtime work, scheduled automations, and automatic semantic classification.
  • Broad subsystem migrations or shared-primitive work that needs its own issue.

Success is a single PR that adds the offline protocol, its focused tests, and manifest-backed ratchets. No external setting or runtime prerequisite is required to close this narrowed issue.

Evidence: the audit chains include #9734 → #9748, #9522 → #9533, #9739 → #9783, #6506 → #9288, and #9571 → #9600.

Activity

  1. Git-on-my-level commented on Jul 15, 2026

    @Git-on-my-level
    MemberAuthor

    Correction to item 3 (Dictionary(uniqueKeysWithValues:) ratchet): a verification pass found this guard already exists — desktop/macos/scripts/check_desktop_test_quality.py forbids Dictionary(uniqueKeysWithValues:) / .init(uniqueKeysWithValues:) at the AST/token level, with the // omi-collection-safety: static-unique-keys escape hatch documented in desktop/macos/AGENTS.md, and it is manifest-registered. Item 3 reduces to: verify its coverage includes production sources (not only test-quality scope) and close. Also a mechanical note for items 3/4: the checks-manifest loader (.github/scripts/run_checks.py) consumes id/command/triggers/lanes/reason only — real-instance citations go in reason, there is no dedicated caught field unless the schema is extended.

  2. changed the title [-]Quick guards + ceremony reductions: make failure-class closure real instead of rhetorical[/-] [+]Failure-class protocol and recurrence ratchets[/+] on Jul 15, 2026
  3. Git-on-my-level commented on Jul 15, 2026

    @Git-on-my-level
    MemberAuthor

    Addition to item 5 (watchdog auto-merge gate audit) — mechanical verification levels, derived not declared:

    The gate should not trust any claimed verification level. Derive it from facts CI already has:

    1. Tests-fail-on-base check: CI runs the PR's added/modified test files against the merge-base. If they pass on base, they do not cover the change — the PR is effectively reasoning-only regardless of its narrative. Fail on base + pass on head = regression coverage proven, not asserted.
    2. Auto-merge eligibility keys off this: watchdog may only auto-merge PRs with proven-on-base coverage (plus the strict-fake requirement from FC-6: consolidate strict Firestore transaction fixtures — lenient fakes certify broken code #9840 for transaction-touching subsystems). Everything else is proposal-only.
    3. No new PR-body fields, no self-declaration — nothing for humans or agents to remember until a PR is blocked, and the block message says exactly why.

    Implementation is one CI job (checkout merge-base, run the diff's test files, invert the expectation) registered in the manifest; reason cites #9739→#9783 (lenient-fake regression that shipped with green tests) as the instance class this would have gated.

  4. undivisible commented on Jul 20, 2026

    @undivisible
    Collaborator

    Failure-class protocol — confirmed: 14 FC JSON files in .github/failure-classes/, scripts/failure-class CLI, .github/checks-manifest.yaml references.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions