commit 0d3ad06098b485931b0ec6d7105fe61502d5884b
parent 2c280fb9093ba2cc4983265825983ad831f87b23
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 00:10:08 -0400
umtool: an unreadable article source never takes the decisions down
A site, the store or the iteration scan that cannot be read adds nothing to the
pieces; a disk source that throws adds no rows. openDecisions() still answers.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/umtool/lib/inbox.ts b/umtool/lib/inbox.ts
@@ -229,7 +229,8 @@ export async function readInbox({ project }: { project?: string | null } = {}):
readPieceGraph(),
readLifecycle(),
]);
- const extra = project ? [] : await diskDecisions(graph, life);
+ // A disk source that cannot be read adds nothing; it never hides the rest.
+ const extra = project ? [] : await diskDecisions(graph, life).catch(() => [] as Decision[]);
const items = rankDecisions(
annotate([...base, ...extra], {
pieceOf: (d: Decision) => pieceOfDecision(d, graph),
diff --git a/umtool/lib/pieces.ts b/umtool/lib/pieces.ts
@@ -172,12 +172,14 @@ async function projectLooksDone(p: ProjectSummary): Promise<string | null> {
}
async function buildGraph(): Promise<PieceGraph> {
+ // The article side must never take the decisions down with it: a site whose
+ // site.json does not read is an article list without that site, not a 500.
const [sites, store, pending, summaries, its] = await Promise.all([
- listSiteRows(),
- readStoreRow(),
- pendingArticles(),
+ listSiteRows().catch(() => []),
+ readStoreRow().catch(() => ({ articles: [] as ArticleRow[] })),
+ pendingArticles().catch(() => [] as ArticleIn[]),
listProjects(),
- iterationProjects(),
+ iterationProjects().catch(() => new Map<string, { current: boolean }[]>()),
]);
const articles: ArticleIn[] = [
...sites.flatMap((s) => s.articles.map(fromRow)),