[UI] /artifact/notebook-* pages 500: artifact_detail selects v1 columns (rendered_html_path, ...) from the v2 public.notebooks table open

← UI
Every /artifact/notebook-* page returns HTTP 500 (6 of the 7 500s in nginx's access log between 11:26 and 11:30 PDT on 2026-10-23 were /artifact/notebook-...; the seventh was /target-landing/TREM2, TYROBP, SYK and is not covered here; 84 tracebacks in scidex-api's journal in the 30 minutes before that). Cause, measured 2026-10-23: api.py artifact_detail (notebook branch, ~line 37813) runs SELECT id, rendered_html_path, description, tags, author, associated_analysis_id, is_spotlight FROM notebooks WHERE id=%s and fails with psycopg.errors.UndefinedColumn: column "rendered_html_path" does not exist. With search_path "$user", public the name resolves to public.notebooks, which is the 12-column SPEC-058 §2.1 table (id, title, cells, kernel_spec, metadata, owner_ref, content_hash, parent_version_id, last_executed_at, created_by, created_at, updated_at) and has 0 rows. The 17-column shape the query expects (rendered_html_path, tags, author, associated_analysis_id, is_spotlight, ipynb_path, ...) exists only as public_restore.notebooks, a FOREIGN table. So the page code still targets the v1 notebooks shape after public.notebooks became the v2 table. Decide which is authoritative (read v1 metadata from wherever it now lives, or read the v2 row and its metadata JSONB), make artifact_detail use it, and make a missing notebooks row degrade to the page without the detail strip rather than a 500. Note the query is in a loop over four candidate ids plus a LIKE fallback, so an exception there also aborts the request's transaction. Acceptance: curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:8000/artifact/notebook-f5a891add4ce returns 200 (it returns 500 today), and no UndefinedColumn for rendered_html_path appears in journalctl -u scidex-api after deploy. Filed by a MorphoSwarm host session while debugging the scidex.ai outage of 2026-10-23 (that outage was CPU starvation, fixed separately with system.slice CPUWeight=1000; this 500 is independent of it and pre-dates it).
Payload JSON
{
  "acceptance": "test \"$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:8000/artifact/notebook-f5a891add4ce)\" = 200",
  "allowed_paths": [
    "api.py",
    "tests/*"
  ]
}

Sibling Tasks in Quest (UI) ↗