Broken links in /experiments (HTTP 500, 1 links) done

← Mission Control
Root cause: Unable to determine — LLM analysis unavailable Fix strategy: Manual investigation needed. Check if pages should exist or if links need updating. Affected links (1): - /experiments ## REOPENED TASK — CRITICAL CONTEXT This task was previously marked 'done' but the audit could not verify the work actually landed on main. The original work may have been: - Lost to an orphan branch / failed push - Only a spec-file edit (no code changes) - Already addressed by other agents in the meantime - Made obsolete by subsequent work **Before doing anything else:** 1. **Re-evaluate the task in light of CURRENT main state.** Read the spec and the relevant files on origin/main NOW. The original task may have been written against a state of the code that no longer exists. 2. **Verify the task still advances SciDEX's aims.** If the system has evolved past the need for this work (different architecture, different priorities), close the task with reason "obsolete: " instead of doing it. 3. **Check if it's already done.** Run `git log --grep=''` and read the related commits. If real work landed, complete the task with `--no-sha-check --summary 'Already done in '`. 4. **Make sure your changes don't regress recent functionality.** Many agents have been working on this codebase. Before committing, run `git log --since='24 hours ago' -- ` to see what changed in your area, and verify you don't undo any of it. 5. **Stay scoped.** Only do what this specific task asks for. Do not refactor, do not "fix" unrelated issues, do not add features that weren't requested. Scope creep at this point is regression risk. If you cannot do this task safely (because it would regress, conflict with current direction, or the requirements no longer apply), escalate via `orchestra escalate` with a clear explanation instead of committing.

Completion Notes

Auto-completed by supervisor after successful deploy to main

Git Commits (1)

Squash merge: orchestra/task/f418a358-broken-links-in-experiments-http-500-1-l (1 commits)2026-04-25
Spec File

Broken links in /experiments (HTTP 500, 1 links)

Quest: Unassigned Priority: P86 Status: running

Goal

Broken links in /experiments (HTTP 500, 1 links)

Context

This task is part of the Unassigned quest ( layer). It contributes to the broader goal of building out SciDEX's core capabilities.

Acceptance Criteria

☐ Implementation complete and tested
☐ All affected pages load (200 status)
☐ Work visible on the website frontend
☐ No broken links introduced
☐ Code follows existing patterns

Approach

  • Read relevant source files to understand current state
  • Plan implementation based on existing architecture
  • Implement changes
  • Test affected pages with curl
  • Commit with descriptive message and push
  • Work Log

    2026-04-25 — Fix UnboundLocalError in experiments_listing

    Root cause: type_colors dict was defined inside the for exp in experiments: loop in experiments_listing() (api.py ~line 39795) but referenced in the for t in types: loop after it. When a filter like ?disease=alzheimer returned 0 matching experiments, the first loop body never executed, leaving type_colors undefined. The second loop (which iterates ALL experiment types) then raised UnboundLocalError: cannot access local variable 'type_colors'.

    Fix: Moved type_colors definition to before the cards_html = "" line, outside both loops. No logic change — the dict is a constant and identical every iteration.

    Verified: curl -s -o /dev/null -w "%{http_code}" http://localhost:8000/experiments?disease=alzheimer returns 200 after deploying the fix.