teleo-infrastructure/diagnostics
m3taversal 0eb26327fc
Some checks are pending
CI / lint-and-test (push) Waiting to run
feat(claims): /api/claims/{slug} canonical detail endpoint
Implements Ship's claim detail contract — one round-trip, all data
resolved server-side. Replaces thin domain-only stub with full tree walk
(domains/ + foundations/ + core/), DB joins for PRs and reviews, and
server-side wikilink resolution to eliminate frontend N+1 cascades.

Response shape (Ship brief 2026-04-29):
  slug, title, domain, secondary_domains, confidence, description,
  created, last_review, body (raw markdown), sourced_from, reviews,
  prs, edges {supports,challenges,related,depends_on}, wikilinks

Wikilink resolution:
- Builds title→stem index from frontmatter title field, fallback to
  filename stem normalized via _normalize_for_match
- Returns flat {link_text: slug_or_null} map; unresolved → null so
  frontend can render plain text
- Inline normalization (lowercase, hyphen↔space, collapse whitespace,
  strip punctuation). Note: lib/attribution.py exposes only
  normalize_handle today, not the title normalizer Ship referenced.
  If a canonical helper lands later, point at it.

Caches:
- title→slug index: 60s TTL (warm cache <20ms p50 verified)
- list endpoint: 5min TTL (preserved from prior)
- Cold: ~3.3s for tree walk of 1,866 files; warm: 13-17ms

Bug fixed in second pass:
- _resolve_sourced_from defaulted title="" which leaked LIKE '%%'
  matching every PR. Now requires non-empty title+stem; handler falls
  back to slug.replace("-"," ") when frontmatter title is missing.

Verified live on VPS:
- AI diagnostic triage claim (no fm.title): sourced_from=1, prs=0
  (correct — Feb claim, pre-description-tracking)
- Recent extract PR claim: sourced_from=1 with URL, prs=1, reviews=1,
  last_review populated, edges 3 supports + 7 related, wikilinks 0
- 404 on missing slug: correct
- Claim with [[maps/...]] wikilink: 5/6 resolved (correct null on map)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 17:37:26 +01:00
..
activity_endpoint.py feat(activity): Timeline data gaps — type filter + commit_type classifier + source_channel reshape 2026-04-23 19:51:58 +01:00
activity_feed_api.py fix(activity-feed): remove [:120] slug truncation 2026-04-27 15:27:31 +01:00
alerting.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
alerting_routes.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
app.py fix(diagnostics): wire /api/leaderboard into app.py + fix rolling-window SQL 2026-04-27 13:30:26 +01:00
backfill_submitted_by.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
claims_api.py feat(claims): /api/claims/{slug} canonical detail endpoint 2026-05-09 17:37:26 +01:00
contributor_profile_api.py feat: filter system accounts from leaderboard, add primary_ci field 2026-04-21 11:33:47 +01:00
daily_digest.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
daily_digest_routes.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
dashboard-v2.html Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
dashboard_agents.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
dashboard_epistemic.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
dashboard_health.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
dashboard_ops.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
dashboard_portfolio.py fix: apply Ganymede review fixes to portfolio code 2026-04-20 17:00:02 +01:00
dashboard_prs.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
dashboard_routes.py sync: dashboard_routes.py from VPS — digest + contributor-graph endpoints 2026-04-21 11:01:15 +01:00
leaderboard_routes.py fix(diagnostics): wire /api/leaderboard into app.py + fix rolling-window SQL 2026-04-27 13:30:26 +01:00
research_routes.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
research_tracking.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
response_audit_routes.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
review_queue.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
review_queue_routes.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
shared_ui.py sync VPS state: portfolio dashboard + fetch_coins.py 2026-04-20 16:55:36 +01:00
teleo-diagnostics.service epimetheus: sync VPS-deployed code to repo — Mar 18-20 reliability + features 2026-03-20 20:17:27 +00:00
tier1_metrics.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
tier1_routes.py Consolidate pipeline code from teleo-codex + VPS into single repo 2026-04-07 16:52:26 +01:00
vitality.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00
vitality_routes.py fix: sync all code from VPS — repo is now authoritative source of truth 2026-04-15 13:18:01 +01:00