Skip to content

Hourly sweep refails posthog/posthog on a permanently truncated tree #252

Closed

Description

@harlan-github-agent

The hourly sync sweep re-picks posthog/posthog because the tree_truncated verdict is never recorded on the repo row, so every run pays five GitHub calls and fails identically, 28 failed jobs in the last window.

Target: layers/registry/server/utils/sync-repo.ts

Verify with: After the fix is deployed for a full day: pnpm exec wrangler d1 execute DB --remote --json --config wrangler.jsonc --command "SELECT count(*) AS n FROM failed_jobs WHERE exception='tree_truncated' AND failed_at > strftime('%s','now') - 86400;" returns 0, and the repos row for posthog/posthog carries the recorded too-large verdict.

Estimated to change 3 files.

The daily-checkin routine opened this issue automatically on its 2026-09-17T21:40:00.000Z run. It is not Harlan's own report. Close it to reject the proposal, and the reason you give stops it being offered again.

Activity

  1. harlan-github-agent commented on Sep 17, 2026

    @harlan-github-agent
    ContributorAuthor

    🤖 ISSUE TRIAGE

    Harlan Agent Kit posted this automated triage. It is not Harlan's personal assessment or commitment. AI open source policy.

    • Route: Ready to implement
    • Difficulty: 2/5
    • Impact: 3/5
    • Reproduction: Yes
    • Codebase review: Not needed
    • Summary: Confirmed: the hourly sync-github-skills cron picks repos via SUBSCRIBED/GENERAL_SYNC_CANDIDATES_SQL, whose only gates are broken_since IS NULL and a stale repo_meta_synced_at. In sync-repo.ts:763-767 the tree.truncated branch returns statu
    • Next action: In layers/registry/server/utils/sync-repo.ts, write a too-large verdict (new repos column, e.g. tree_truncated_at via a new migration plus schema.sql) in the tree.truncated branch, add the exclusion to SUBSCRIBED_SYNC_CANDIDATES_SQL and GENERAL_SYNC_CANDIDATES_SQL in layers/registry/server/utils/sync-candidates.ts, and extend test/unit/sync-repo-freshness.test.ts and test/unit/sync-candidates.test.ts with regression cases.
  2. added
    harlan-agent-ready-to-implementIssue triage found bounded work ready for an implementation Agent.
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    and removed
    harlan-agent-runningAn Agent holds a Task on this issue or pull request right now.
    on Sep 17, 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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions