Skip to content

Repo health: read README, tests and builds instead of showing dashes - #57

Merged
vijayakrishnans merged 2 commits into
mainfrom
fix/repo-health-reads
Dec 1, 2026
Merged

vijayakrishnans merged 2 commits into
mainfrom
fix/repo-health-reads

Conversation

@vijayakrishnans

Copy link
Copy Markdown
Collaborator

What

Owner request: fix the dashes in Repo health. On every listing, Builds, README present and Tests present showed "—", even for repos with a README (e.g. broke-crm). Nothing ever read them: launchHealth hard-coded them as unobserved.

How they're read now (hourly sweep and the maintainer's "Check repository")

Item Source Yes No Dash (not read)
README present git/trees/{default}?recursive=1 README* at the root none in a full tree outage, or a truncated tree with no match
Tests present same tree read a test(s), __tests__, spec(s), e2e or testing folder; or *.test.*, *.spec.*, *_test.go, test_*.py none in a full tree same
Builds commits/{default}/check-runs a success and nothing failed any failure, timeout, cancel, action required or startup failure no finished checks, or an outage
  • Two extra GitHub calls per repo, to the same pinned api.github.com host. The branch comes from GitHub's own answer, is shape-checked and URL-encoded. Nothing a maintainer typed reaches the URL.
  • Private repos get no extra reads, and their answers are never stored.
  • GitHub answers a public repo's check runs without a token or App, so the old "a declared repo can't see CI" note no longer holds for builds.

Data

  • Migration 2325_openproduct_repo_health: three nullable columns, repo_has_readme, repo_has_tests and repo_builds_passing. They are written with the rest of the observation and never merged with older values.
  • Public profile: new repoHealth {readme, tests, builds}.
  • Catalog API 1.7.0: a new card fact repoHealth, with a changelog entry.
  • Publish disclosure: names the new line.
  • A cached document without repoHealth still draws dashes.

Tests

Suite Result New test
gateway 546 passed reads exactly the three URLs; yes and no answers; an outage leaves them unread; nothing extra for private repos or bad branch names; truncated trees; test-path conventions, plus look-alikes like contest.ts and latest/; check conclusions
contracts 1318 passed health states yes, no, withdrawn and unread
core 1141 passed the flags pass through; anything that isn't a yes/no is refused; a private repo stores nothing
db — a round trip, and a later read that can't answer clears the old values
web 2145 passed —

Typecheck and lint are clean (0 errors). Two pg suites failed once in the full parallel run while the Postgres template rebuilt with the new migration, and both pass alone.

OWASP A10 (SSRF): no new host. The owner/repo slugs are already strict, and the branch is validated and encoded.

Milestone order is not changed here. On request it stays the owner's order: Studio's milestone manager already adds, edits, deletes, reorders and ships milestones, and posts are independent of them (ON DELETE SET NULL).

🤖 Generated with Claude Code

vijayakrishnans and others added 2 commits December 1, 2026 16:20
Three of Repo health's five items were never read: every listing showed
"README present —", "Tests present —" and "Builds —", even with a README.

- gateway: observeRepo also reads the default branch's tree (README at the
  root; tests by common conventions) and its head's check runs (any failure
  is a no; a success with none failed is a yes). Two more calls to the same
  pinned host, using the branch GitHub named. Private repos, bad branch names,
  outages and truncated trees without an answer stay null ("not read").
- core/db: three observed columns (migration 2325), written with the rest of
  the observation, on the profile and the catalog card.
- public profile and catalog API (1.7.0): repoHealth {readme, tests, builds}.
- launchHealth reads them; a null or a document cached before them is still
  a dash. Publish disclosure names the new line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vijayakrishnans
vijayakrishnans merged commit c1feebe into main Dec 1, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant