Skip to content

Read Audited File Content at the Head Commit the Tree Was Listed At #3841

Closed

Description

@ptr727

Problem

spec/audit.py lists a repository's tree at the head commit it resolved (Run.head), but Run.read_text reads each file's content by branch name (?ref=<ground branch>) and calls gh without ok404. A push between the two reads that deletes or renames a file the tree listed makes the read return 404, gh raises RuntimeError, and the sweep replaces every finding for that repository with one ERROR.

Constructed case

  1. The audit reads the tree of owner/Fixture at commit A, which tracks compose.yml.
  2. A merge lands commit B on the ground branch, deleting compose.yml.
  3. A check calls run.read_text("compose.yml"), which requests contents/compose.yml?ref=<branch>, now resolving to B.

Expected: the read returns compose.yml as of A, the commit whose tree the audit is judging.

Actual: HTTP 404, RuntimeError, and the repository's whole result is one ERROR.

Notes

This predates PR #3838. That change adds reads through read_text for each tracked .gitignore, compose, and editor config file, which widens the window. Reading at the head commit SHA instead of the branch name closes it.

Activity

  1. added
    pre-existing
    on Nov 2, 2026
  2. ptr727 commented on Nov 10, 2026

    @ptr727
    OwnerAuthor

    Released (2026-11-10): PR #4037 merged into develop at dc88c9d, and its branch and worktree are removed, so this claim holds no files.

    Backlog burndown claim (attended run 2026-11-10, round 2, group G6). Branch: burndown/3914-audit-hub-only-head-reads. Issues: #3914, #3841, #4017.

    Predicted file set:

    • spec/audit.py
    • spec/divergences.json
    • spec/divergences.schema.json
    • spec/files.json
    • AUDIT.md
    • .agents/skills/audit-a-repo/SKILL.md
    • .github/skills/audit-a-repo/SKILL.md
    • .claude-plugin/fleet-skills/skills/audit-a-repo/SKILL.md
    • .claude-plugin/fleet-skills/.source-digests/audit-a-repo
    • tests/test_audit.py
    • tests/test_audit_helpers.py

    No other group may edit these files while this claim stands. The orchestrator releases it at cleanup.

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

    pre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions