You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dead-lettered purpose job stalls its discovery ledger row #772
reconcileLedger matches only dead-lettered registry/repository-submission jobs, so a submission whose registry/repository-purpose job dead-letters (ghost-brief/skills, AiGateway 7005 billing error, 2026-12-02T21:31Z) leaves its ledger row 'submitted' forever and alarms as stalled every night.
Verify with:pnpm exec cf d1 query a5e53f35-f5e5-4987-8c67-c0175addc7cc --remote --sql "SELECT COUNT(*) AS n FROM discovery_ledger WHERE status='submitted' AND submitted_at < (strftime('%s','now') - 21600)" returns 0 after the fix deploys and reconcile runs.
Estimated to change 2 files.
The daily-checkin routine opened this issue automatically on its 2026-12-01T20: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.
🟢 Ready to implement · difficulty 2/5 · impact 3/5
Confirmed: reconcileLedger's dead-letter branches match only no_supported_skill_paths, root_skill_unsupported and repository_purpose_review_required, so a purpose-classification failure (AiGateway 7005) dead-lettering the submission job mat
Plan for the implementing agent
In a task worktree, capture the exact dead-letter exception text for ghost-brief/skills from failed_jobs (job_type registry/repository-submission, the 2026-12-02T21:31Z AiGateway 7005 run) so the SQL LIKE pattern matches real production text, not a guess. Write a failing test in test/unit/discovery-ledger-reconcile.test.ts first: a purpose-classification dead-letter must not leave the row stalled. Extend shared/server/discovery-ledger.ts reconcileLedger with a branch recognizing that dead-letter, following the PR #605 precedent (park with held_reason like repository_purpose_review_required, submitted_at cleared) or returning the row to pending for retry if the error is judged transient infra; state the choice in the PR. Note the existing test 'leaves a submission whose dead-letter names something else alone' encodes that unmatched dead-letters stall by design, so adjust expectations only for the purpose-classification case. Run pnpm test:run for the discovery-ledger suites before opening the PR.
Activity
harlan-github-agent commentedon Dec 3, 2026
🟢 Ready to implement · difficulty
2/5· impact3/5Confirmed: reconcileLedger's dead-letter branches match only no_supported_skill_paths, root_skill_unsupported and repository_purpose_review_required, so a purpose-classification failure (AiGateway 7005) dead-lettering the submission job mat
Plan for the implementing agent
In a task worktree, capture the exact dead-letter exception text for ghost-brief/skills from failed_jobs (job_type registry/repository-submission, the 2026-12-02T21:31Z AiGateway 7005 run) so the SQL LIKE pattern matches real production text, not a guess. Write a failing test in test/unit/discovery-ledger-reconcile.test.ts first: a purpose-classification dead-letter must not leave the row stalled. Extend shared/server/discovery-ledger.ts reconcileLedger with a branch recognizing that dead-letter, following the PR #605 precedent (park with held_reason like repository_purpose_review_required, submitted_at cleared) or returning the row to pending for retry if the error is judged transient infra; state the choice in the PR. Note the existing test 'leaves a submission whose dead-letter names something else alone' encodes that unmatched dead-letters stall by design, so adjust expectations only for the purpose-classification case. Run pnpm test:run for the discovery-ledger suites before opening the PR.
Reproduction: yes. Codebase review: not needed.
Harlan Agent Kit automated triage, not Harlan's commitment · AI policy