Skip to content

Purpose-held submissions stall the discovery ledger forever #603

Closed

Description

@harlan-github-agent

A submission job that dead-letters on repository_purpose_review_required never updates its discovery_ledger row and reconcileLedger has no branch for that exception, so five rows (antfu/skills-pack, feitangyuan/onetake, trungtin/codex-delegate, tsogjavklann/awwwards-3d, aryanutkarsh/seecode) stay 'submitted' and alarm as stalled every night instead of parking for the review surface like the terminal-reason design intends.

Target: shared/server/discovery-ledger.ts

Verify with: pnpm vitest run test/unit/discovery-ledger-reconcile.test.ts

Estimated to change 2 files.

The daily-checkin routine opened this issue automatically on its 2026-10-09T20: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 Oct 9, 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: Verified in code: repo-maintenance.ts:329 fails registry/repository-submission jobs with the string 'repository_purpose_review_required' when the purpose gate holds a 'submit' operation (gate added in feat(registry): record repository purpose with Jev #581), and the dead-letter lands in fai
    • Next action: Implement in shared/server/discovery-ledger.ts: add a reconcileLedger branch (mirroring the retried/empty dead-letter joins through the failed_jobs payload) that sets status='pending', held_reason='repository_purpose_review_required', submitted_at=NULL for submitted rows whose registry/repository-submission job exception matches '%repository_purpose_review_required%', add a summary counter, and create test/unit/discovery-ledger-reconcile.test.ts with a failing-first case (in-memory D1 harness like discovery-size-guard.test.ts); verify with pnpm vitest run test/unit/discovery-ledger-reconcile.test.ts.
    • Related pull requests: fix(discovery): resolve submissions that dead-lettered instead of stalling them #34: Merged PR that created the dead-letter reconcile design (empty and retried branches) this fix extends with the purpose-hold case.; feat(registry): record repository purpose with Jev #581: Merged PR that introduced the repository purpose gate; its 'repository_purpose_review_required' job failure is the new dead-letter path reconcileLedger was never taught.
  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 Oct 9, 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