Skip to content

validate-audit-record.py rejects fixes merged outside its commit range #2606

Description

@josecelano

Parent EPIC: #2278

Goal

Make validate-audit-record.py check a FIXED resolution reference against the commits of the audited pull request and its recorded follow-up pull requests, so the result no longer depends on the local --base ref or on whether the fix is already merged.

Problem

The script requires every Resolution reference commit subject to exist in <base>..HEAD, with --base defaulting to develop. With an up-to-date base, a merged fix is no longer in that range, so valid audits fail: on 2026-10-21 at torrust/develop = 6da62f0ee, --base torrust/develop fails 3 rows of the PR #2584 audit and 1 row of the PR #2599 audit. With the default, the local develop branch can be stale, so the same audits pass by accident. A fix can also live in another pull request: the WAIT-001 fix of the PR #2584 audit merged in PR #2596.

Proposed fix

Build the valid subjects from <base>..HEAD, the audited PR's commits, and the commits of every PR in a Follow-up PR URL field, fetched with gh api repos/<owner>/<repo>/pulls/<n>/commits --paginate. The change is small (the script is 227 lines and the faulty check is one function), so this issue does not migrate the script to Rust.

The full specification is in docs/issues/open/ (spec-only PR to follow).

Activity

  1. added
    Bug
    on Oct 21, 2026
  2. self-assigned this
    on Oct 21, 2026
  3. added a commit that references this issue on Oct 21, 2026
  4. josecelano commented on Oct 23, 2026

    @josecelano
    MemberAuthor

    Reopened: this issue was closed by mistake when #2613 merged. The #2613 description said "Does not close #2606", and GitHub's keyword parser matches close #2606 regardless of the negation. #2613 only added the Implementation Completion Review section to the spec. The validator fix is not implemented, so this issue stays open until its implementation PR merges.

  5. added a commit that references this issue on Oct 24, 2026
  6. 4 remaining items

  7. added 8 commits that reference this issue on Oct 25, 2026
  8. added a commit that references this issue on Oct 25, 2026
  9. added 5 commits that reference this issue on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

AutomationBug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions