[Agora] Version-aware debates — debate specific artifact versions done analysis:5

← Artifact Debates
Target specific versions in debates, version-inherited vs fresh evidence distinction ## 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 (18)

[Exchange] Add usage-based quality signals to propagate_quality [task:agr-ad-03-USAGE]2026-04-25
Squash merge: orchestra/task/agr-ad-0-artifact-quality-profile-dashboard (2 commits)2026-04-25
[Senate] Work log: artifact quality dashboard spec [task:agr-ad-05-PROF]2026-04-25
[Senate] Artifact quality profile dashboard [task:agr-ad-05-PROF]2026-04-25
[Verify] auto-trigger debates implementation verified [task:agr-ad-06-TRIG]2026-04-25
[Agora] Work log: auto-trigger debates implementation complete [task:agr-ad-06-TRIG]2026-04-25
[Agora] Auto-trigger debates for low-quality or conflicting artifacts2026-04-25
Squash merge: orchestra/task/agr-ad-0-artifact-evidence-accumulation-system (1 commits)2026-04-25
[Agora] Artifact evidence accumulation system [task:agr-ad-02-EVAC]2026-04-25
[Docs] Work log: merge gate placeholder fix [task:agr-ad-04-VDEB]2026-04-18
[Agora] Fix debate_sessions INSERT: 12 columns, 12 placeholders [task:agr-ad-04-VDEB]2026-04-18
[Agora] Version-aware debates — target version population + reduced-weight propagation2026-04-18
[Agora] Sync slot file for agr-ad-01-TARG [task:agr-ad-01-TARG]2026-04-15
[Agora] Sync slot file for agr-ad-01-TARG [task:agr-ad-01-TARG]2026-04-15
[Agora] Update spec work log for generalized debate targeting [task:agr-ad-01-TARG]2026-04-15
Squash merge: orchestra/task/agr-ad-0-generalize-debate-targeting-to-any-artif (1 commits)2026-04-15
[Senate] Holistic prioritization run 2: quest fixes + 3 new CI tasks [task:b4c60959-0fe9-4cba-8893-c88013e85104]2026-04-06
[Senate] Holistic prioritization: 6 tasks created for uncovered P88-P95 quests [task:b4c60959-0fe9-4cba-8893-c88013e85104]2026-04-06
Spec File

Goal

Enable debates that target specific versions of artifacts. When an artifact is revised,
previous debate outcomes still apply to the old version but may not apply to the new one.
This ensures that evidence accumulated about v1 of an experiment is not blindly transferred
to v2 after methodology improvements.

Acceptance Criteria

target_artifact_version column in debate_sessions (nullable, defaults to latest)
☐ Debate outcomes linked to specific version (not just artifact ID)
☐ When artifact is versioned, inherited evidence marked as version_inherited (not fresh)
☐ Quality propagation considers version-specific vs inherited evidence differently
☐ UI shows which debates apply to current version vs inherited from prior versions

Dependencies

  • agr-ad-01-TARG — General artifact debate targeting
  • a17-18-VERS0001 — Version tracking schema must exist

Dependents

  • None (enrichment task)

Work Log

2026-04-18 11:30 PT — Slot 66

  • Audit: target_artifact_version column already exists in debate_sessions schema but was NEVER populated in any INSERT statement across 7+ debate creation sites (scidex_orchestrator.py, run_debates_for_analyses.py, dataset_row_debate.py, debate_enrollment_driver.py, analysis_debate_wrapper_driver.py, etc.)
  • Artifact versioning schema confirmed: artifacts table has version_number, parent_version_id, is_latest columns; artifact_versions table does not exist yet (version lineage is tracked in the artifacts table itself)
  • Schema analysis: The artifacts.version_number + is_latest columns are the canonical version tracking mechanism (migration 081_add_artifact_versioning.py). The parent_version_id provides lineage.

2026-04-18 11:45 PT — Implementation

Change 1 — scidex/atlas/artifact_registry.py:

  • Added version_inherited parameter to propagate_quality() (default False)
  • Updated docstring to document version-aware behavior
  • Modified upstream quality SQL query to fetch a.is_latest, a.version_number
  • Applied 0.5× weight reduction for non-latest (inherited) upstream artifacts
  • Added artifact_version_info() helper function to look up version metadata
Change 2 — scidex/agora/scidex_orchestrator.py:
  • Imported artifact_version_info from scidex.atlas.artifact_registry
  • Before each debate INSERT, call artifact_version_info(analysis_id) to get version metadata
  • Populate target_artifact_version in the INSERT OR REPLACE INTO debate_sessions
  • Non-critical: wrapped in try/except so DB errors don't crash debates

Acceptance Criteria Status

target_artifact_version column in debate_sessions (nullable, defaults to latest) — ✅ Now populated in orchestrator INSERT
☑ Debate outcomes linked to specific version (not just artifact ID) — ✅ target_artifact_version recorded per session
☑ When artifact is versioned, inherited evidence marked as version_inherited (not fresh) — ✅ propagate_quality applies 0.5× weight to non-latest upstream artifacts
☑ Quality propagation considers version-specific vs inherited evidence differently — ✅ Same as above; is_latest=0 upstream artifacts contribute at half weight
☐ UI shows which debates apply to current version vs inherited from prior versions — ⚠️ Data is in place; UI rendering is a separate task

2026-04-19 02:45 PT — Merge gate fix (retry 1/10)

Fix: scidex/agora/scidex_orchestrator.py INSERT had 12 columns but 13 ? placeholders.
Changed VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
(12 placeholders matching 12 columns: id, analysis_id, question, num_rounds, num_hypotheses_generated,
num_hypotheses_surviving, created_at, transcript_json, quality_score, debate_type, personas_used,
target_artifact_version)

Rebased on remote branch before push.

Files Changed

  • scidex/agora/scidex_orchestrator.py — +13 lines: import + version lookup + INSERT column expansion
  • scidex/atlas/artifact_registry.py — +39 lines: version_inherited param + weighting logic + new helper

Payload JSON
{
  "requirements": {
    "analysis": 5
  }
}

Sibling Tasks in Quest (Artifact Debates) ↗