Skip to content

fix(todos): scanner fails closed on push diffs over 16 MiB, turning main red #880

Closed as not planned

Description

@devantler

🤖 Generated by the Agentic Engineer

What happened

The TODOs workflow turned main red on devantler-tech/ksail at 6ef410b (ksail#8182, run 42510034075). The scanner logged Exception: Could not retrieve diff. Then the supervisor reported scanner incomplete: diff read failed.

The push changed 63 files and added about 487,000 lines, mostly generated Go notice data. The compare diff for that push is about 54 MB. The supervisor's API proxy (.scripts/todo-guard/guard.go) reads at most 16 MiB of any API response and fails anything larger. That is the documented fail-closed rule, so the guard did what it was built to do. But a push that adds no TODOs can still turn main red, and re-running gives the same result.

Why it matters

Every large generated or vendored change on any repository that uses the shared TODO workflow will leave a red default-branch head. It stays red until an unrelated later push supersedes it. That costs rung-0 attention, and it hides real breakage behind a known-noisy check.

Possible directions (to decide)

  • Read the diff per file (compare files[].patch, paginated), skipping the action's ignore paths, instead of one unified diff. Each page stays under the cap.
  • Or, when the diff is over the cap and no mutation has started, fall back to the bounded per-file read before failing closed.
  • Keep failing closed whenever the guard cannot prove it saw the whole diff.

Acceptance

  • A push whose full diff is over 16 MiB but whose non-ignored changes fit is scanned completely, and the workflow passes.
  • Partial or unverifiable evidence still fails, and a test covers both cases.

Activity

  1. added theissue type on Nov 8, 2026
  2. devantler commented on Nov 8, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    Duplicate of the fix already in flight in #879, which covers this same failure on ksail 6ef410b. I filed this one without checking for an open PR first. Closing it so the work is tracked in one place.

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

    Fields

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions