Skip to content

A work source whose fetch failed renders as a work source with no work

Id: TD-PPagop-26080201 · Status: resolved · Filed: 2026-08-02 · Resolved: 2026-08-03 · Ref: #169

scripts/publish-dashboard.sh reads each repo’s work sources through gh_json, which swallows stderr and returns whatever the call printed. Every source but one then treats “printed nothing” as “there is nothing”:

Source On a failed call
pr list gh_ok=false, gh_err set — the banner fires
issues issues="${issues:-[]}" — silent []
run list → failed_runs runs="${runs:-[]}" — silent []
contents/tech-debt → tech_debt empty roster — silent []
gather-findings.sh → findings `

So a call that times out, rate-limits or 500s renders as 0 open issues · 0 failing workflows · 0 open tech-debt items · 0 code-quality findings, which is the same page a repo with nothing to do produces. On a panel headed “Work sources (what the Co-Ordinator sees)”, the failure mode of every source is to report the most reassuring thing it could say.

This is not new — each source has degraded this way since it was added — but it is now easier to be misled by, because a repo’s tech-debt ledger can legitimately be empty. Before PR #163 the ledger listed item filenames including resolved ones, so a register that had ever been used was never empty and a blank one was visibly wrong; now that resolved items are dropped, “no unresolved debt” and “the listing call failed” render identically. It was observed twice in a couple of dozen live ticks while that PR was being tested: Poetic-Poems/poetic’s ledger read empty on one tick and 13 items on the next, with nothing having changed in the register.

The spec already names this class of bug and treats it as load-bearing: see the design decision “Carrying a fetch forward silently is what let a broken cadence hide” in docs/DASHBOARD-SPEC.md, which is why the header now carries data <age> · GitHub <age> separately. The same argument applies per source. The pipeline’s own pre-fetch gatherers have the better half of the answer already — scripts/gather-register-hygiene.sh reads .status out of the response body to tell an ordinary 404 (“this repo keeps no register”) from a failure worth reporting, and leaves gh’s diagnosis on stderr rather than swallowing it.

Fix: make each source’s failure distinguishable from its emptiness in publish-dashboard.sh’s WITH_GITHUB repo loop, and say so on the page.

  1. Test the call, not the string it printed: check gh_json’s exit status, and — where an absence is legitimate, as contents/tech-debt is for a repo with no register — separate a 404 from an error the way gather-register-hygiene.sh does. Note that gh_json currently discards stderr, so it needs a variant that keeps it.
  2. Record per source, per repo, which of “answered”, “answered 404” and “failed” happened, in github.inputs[<slug>] beside the data.
  3. Render the difference: a source that could not be read must not show a count of zero. A “couldn’t read” marker in place of the count is enough; carrying the last good value forward per source (as the PR index, claims and tech-debt metadata caches already do) would be better, but is a bigger change and should not hold up the first two.
  4. Fire the existing alarm: github.ok/github.error should reflect any source that failed, not only pr list. Keep the semantics the spec fixes for ok — a --no-github skip is not a failure, and must stay ok-unchanged.

Also update docs/DASHBOARD-SPEC.md, whose GitHub-sources paragraph currently describes each source’s degrade as an empty list, and add a case to test/publish-dashboard.test.sh per source: the gh stub can already fail a chosen call, so each source needs one tick where its call fails and the assertion is that the page does not claim zero.

Filed 2026-08-02, from the review discussion on PR #163.