• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MushroomObserver / mushroom-observer / 27906510908
98%

Build:
DEFAULT BRANCH: main
Ran 21 Jun 2026 01:57PM UTC
Jobs 1
Files 1657
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Jun 2026 01:53PM UTC coverage: 98.386% (+0.001%) from 98.385%
27906510908

push

github

web-flow
Consolidate Source into ExternalLink relationship model (#4299 phase 1) (#4568)

* Consolidate Source into polymorphic ExternalLink model (#4299 phase 1)

Phase 1 (additive) of collapsing the Source table + Observation
source_id/external_id into the ExternalSite/ExternalLink M:N model. Additive
only — the phase-2 migration drops the old columns/table after the backfill
is verified in production.

ExternalLink is polymorphic (target_id/target_type) so it attaches to both
observations AND images — one model, one code path. This replaces the
separate per-image provenance mechanism: image import provenance (#4529)
becomes an import ExternalLink targeting the image.

Schema (additive migration):
- external_links: observation_id -> target_id + target_type; + external_id
  (canonical platform id for sync/dedup), relationship enum (default 0 =
  cross_reference), last_synced_at. At most one import (relationship=1) per
  target via a stored generated column + unique index. Composite dedup index
  (external_site_id, relationship, target_type, external_id) + a target index.
- external_sites: + description, last_successful_sync_at, url_template.
- images: unchanged (source_id/external_id stay until phase 2; no new column).

URL is now derived: ExternalSite#observation_url builds it from url_template
(+ external_id), falling back to base_url + id. external_links.url stays as a
nullable override for the rare site whose URL can't be templated; import links
store no url. (Per review: external_id is the canonical id; url has value only
as the freeform override.)

Models:
- ExternalLink: polymorphic target, relationship enum,
  only_one_import_per_target, link_url (override-or-derived), observation/=
  shims so the observation-only manual-link feature (controller, Query, API2,
  views) keeps working unchanged. user_id=0 future direction noted on the
  user association (deferred to image-provenance work, not #4299).
- ExternalSite: observation_url via template, inatural... (continued)

116 of 116 new or added lines in 14 files covered. (100.0%)

49569 of 50382 relevant lines covered (98.39%)

684.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27906510908.1 21 Jun 2026 01:57PM UTC 1657
98.39
GitHub Action Run
Source Files on build 27906510908
  • Tree
  • List 1657
  • Changed 14
  • Source Changed 14
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27906510908
  • caa2dcaf on github
  • Prev Build on main (#27879036777)
  • Next Build on main (#27906726171)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc