constitution · epochs · watch · epoch 3

comparison

c_c42f908efc44 (tommy-mor) vs c_6f04dcb2e38c (tommy-mor)

download prompt · raw event · cmp_5c0291c6de66ad

council reasoning

~anthropic/claude-sonnet-latest · winner B · 6:4 · permalink

Side B removes dead legacy-projection code paths (dual code for GitDiscovery vs Evidence envelopes), simplifies epoch/commit detail pages to a single source of truth, and updates tests/schema accordingly, reducing long-term maintenance burden. Side A is a solid internal refactor (newtype Deref, CanonicalItemUrl threading) that improves type safety but is more mechanical churn with less architectural simplification than B's removal of an entire legacy compatibility layer.

~x-ai/grok-latest · winner B · 2:1 · permalink

B removes legacy GitDiscovery projection paths so epoch/commit UI and APIs only surface real Evidence envelopes, tightens Emission required fields, and updates tests—an enduring correctness boundary with intentional ledger impact. A is valuable type plumbing (Deref on href newtypes, CanonicalItemUrl through resolve_item/validate/RPC) that cuts string wrap/unwrap noise, but it mostly refines an already-working model rather than changing what the system of record is allowed to claim.

openai/gpt-chat-latest · winner A · 3:2 · permalink

Side A strengthens the project's type safety by changing `resolve_item` to return `CanonicalItemUrl`, propagating canonical URL types through ranking, validation, connectivity, and pair-selection code, and adding `Deref<Target=str>` for URL newtypes to reduce string conversions. Side B removes legacy GitDiscovery projection paths and requires Evidence-only data for epoch/commit pages, simplifying the codebase but intentionally dropping backward compatibility and mainly affecting presentation and historical data handling.

sides

A — c_c42f908efc44 (tommy-mor)

message

[674964ef] refactor: Deref for href newtypes, CanonicalItemUrl through resolve_item

- Implement Deref<Target=str> for GardenItemUrl, ForumThreadUrl, TildeOntologyPath
- resolve_item returns CanonicalItemUrl; validate uses HashSet<CanonicalItemUrl>
- compute_scope_rank_changes keys are CanonicalItemUrl; pair RPC uses Vec pool
- pick_random_distinct_canonical; connectivity stats on &[CanonicalItemUrl]
- Global rank unranked uses stored ids before GardenItemUrl mapping

Made-with: Cursor

diff preview

diff --git a/server/src/api/helpers.rs b/server/src/api/helpers.rs
index 03b3e77911ccd662bec8635345dafe2593cf242e..1b291db83df7364a026f2e147e0a29a70a399371 100644
--- a/server/src/api/helpers.rs
+++ b/server/src/api/helpers.rs
@@ -30,13 +30,13 @@ pub fn now_ms() -> i64 {
     t.as_millis() as i64
 }
 
-/// Resolve an item path as a first-class canonical path.
-pub fn resolve_item(item: &str) -> Result<String, String> {
+/// Resolve DSL/user input to a stored canonical item id.
+pub fn resolve_item(item: &str) -> Result<CanonicalItemUrl, String> {
     let canonical = canonicalize_item(item);
     if canonical.is_empty() {
         return Err(format!("empty item path: `{}`", item));
     }
-    Ok(canonical)
+    Ok(CanonicalItemUrl(canonical))
 }
 
 pub fn parse_parent_specs(parent: Option<&String>) -> Vec<String> {
@@ -94,7 +94,7 @@ pub fn paginate_rankings(
     (out_components, out_unranked)
 }
 
-pub fn pick_random_distinct(items: &[String]) -> Option<(String, String)> {
+pub fn pick_random_distinct_canonical(items: &[CanonicalItemUrl]) -> Option<(CanonicalItemUrl, CanonicalItemUrl)> {
     use rand::seq::SliceRandom;
     if items.len() < 2 {
         return None;
@@ -123,15 +123,12 @@ pub fn is_pair_voted(group: &crate::reducer::GroupState, a: &str, b: &str) -> bo
     group.voted_pairs.contains(&(i, j))
 }
 
-pub fn compute_connectivity_stats(group: &crate::reducer::GroupState, pool: &[String]) -> ConnectivityStats {
+pub fn compute_connectivity_stats(group: &crate::reducer::GroupState, pool: &[CanonicalItemUrl]) -> ConnectivityStats {
     let n = pool.len();
 
     let global_idxs: Vec<Option<usize>> = pool
         .iter()
-        .map(|it| {
-            let key = CanonicalItemUrl(it.clone());
-            group.item_to_idx.get(&key).copied()
-        })
+        .map(|it| group.item_to_idx.get(it).copied())
         .collect();
     let present: Vec<usize> = global_idxs.iter().filter_map(|x| *x).collect();
 
diff --git a/server/src/api/mod.rs b/server/src/api/mod.rs
index cf22cb0129366c3aed031bc86f3197a4321cb806..a10ce662105cff8fad949c6b83f7035ce79bed18 100644
--- a/server/src/api/mod.rs
+++ b/server/src/api/mod.rs
@@ -24,7 +24,7 @@ pub use auth::{
 
 pub use helpers::{
     api_error, compute_connectivity_stats, is_pair_voted, now_ms, paginate_rankings,
-    parse_parent_specs, pick_random_distinct, resolve_item, sha256_hex, vote_touches_path,
+    parse_parent_specs, pick_random_distinct_canonical, resolve_item, sha256_hex, vote_touches_path,
 };
 
 pub use rpc::handle_rpc_batch;
diff --git a/server/src/api/rpc.rs b/server/src/api/rpc.rs
index 5f7d50188f1381267402f2e57e671234ef5db2fd..de0955d0887d32740e1fd18365205c5bdb53c247 100644
--- a/server/src/api/rpc.rs
+++ b/server/src/api/rpc.rs
@@ -29,7 +29,7 @@ use crate::{
 use super::auth::verify_bearer_principal;
 use super::helpers::{
     compute_connectivity_stats, is_pair_voted, now_ms, paginate_rankings, parse_parent_specs,
-    pick_random_distinct, resolve_item, vote_touches_path,
+    pick_random_distinct_canonical, resolve_item, vote_touches_path,
 };
 use super::validate::{normalize_room_and_thread, validate_ingest_document};
 
@@ -146,21 +146,21 @@ fn authorize_room_read(reduced: &ReducerState, headers: &HeaderMap, room: &str)
 }
 
 fn compute_scope_rank_changes(
-    parent: &str,
+    parent: &CanonicalItemUrl,
     before: &crate::scope_rank::ChildrenRankings,
     after: &crate::scope_rank::ChildrenRankings,
     room_wire: &str,
 ) -> Option<ScopeRankChanges> {
-    fn build_positions(rankings: &crate::scope_rank::ChildrenRankings) -> HashMap<String, Option<RankPosition>> {
+    fn build_positions(rankings: &crate::scope_rank::ChildrenRankings) -> HashMap<CanonicalItemUrl, Option<RankPosition>> {
         let mut map = HashMap::new();
         for comp in &rankings.component_rankings {
             let total = comp.ranked.len();
             for (i, item) in comp.ranked.iter().enumerate() {
-                map.insert(item.item.as_str().to_string(), Some(RankPosition { rank: i + 1, of: total }));
+                map.insert(item.item.clone(), Some(RankPosition { rank: i + 1, of: total }));
             }
         }
         for item in &rankings.unranked_items {
-            map.insert(item.as_str().to_string(), None);
+            map.insert(item.clone(), None);
         }
         map
     }
@@ -168,7 +168,7 @@ fn compute_scope_rank_changes(
     let before_pos = build_positions(before);
     let after_pos = build_positions(after);
 
-    let all_items: std::collections::BTreeSet<String> = before_pos.keys().cloned()
+    let all_items: std::collections::BTreeSet<CanonicalItemUrl> = before_pos.keys().cloned()
         .chain(after_pos.keys().cloned())
         .collect();
 
@@ -184,7 +184,7 @@ fn compute_scope_rank_changes(
         };
         if changed {
             changes.push(RankChange {
-                item: GardenItemUrl::from_storage_str(&item, room_wire),
+                item: GardenItemUrl::from_stored(&item, room_wire),
                 before: b,
                 after: a,
             });
@@ -203,11 +203,7 @@ fn compute_scope_rank_changes(
     });
 
     Some(ScopeRankChanges {
-        parent: if parent.is_empty() {
-            "/".to_string()
-        } else {
-            GardenItemUrl::from_storage_str(parent, room_wire).into_inner()
-        },
+        parent: GardenItemUrl::from_stored(parent, room_wire).into_inner(),
         changes,
     })
 }
@@ -473,8 +469,8 @@ async fn rpc_post(
         for s in &v.doc.statements {
             if let dsl::Stmt::Vote { item1, item2, .. } = s {
                 if let (Ok(a), Ok(b)) = (resolve_item(item1), resolve_item(item2)) {
-                    if let Some(p) = CanonicalItemUrl::parse(&a).and_then(|c| c.parent()) { parents.insert(p); }
-                    if let Some(p) = CanonicalItemUrl::parse(&b).and_then(|c| c.parent()) { parents.insert(p); }
+                    if let Some(p) = a.parent() { parents.insert(p); }
+                    if let Some(p) = b.parent() { parents.insert(p); }
                 }
             }
         }
@@ -525,7 +521,7 @@ async fn rpc_post(
             .filter_map(|p| {
                 let before = pre_rankings.get(p)?;
                 let after = crate::scope_rank::build_children_rankings(content, p);
-                compute_scope_rank_changes(p.as_str(), before, &after, &room_key)
+                compute_scope_rank_changes(p, before, &after, &room_key)
             })
             .collect();
         if v.is_empty() { None } else { Some(v) }
@@ -638,8 +634,8 @@ async fn rpc_check(
         for s in &v.doc.statements {
             if let dsl::Stmt::Vote { item1, item2, .. } = s {
                 if let (Ok(a), Ok(b)) = (resolve_item(item1), resolve_item(item2)) {
-                    if let Some(p) = CanonicalItemUrl::parse(&a).and_then(|c| c.parent()) { parents.insert(p); }
-                    if let Some(p) = CanonicalItemUrl::parse(&b).and_then(|c| c.parent()) { parents.insert(p); }
+                    if let Some(p) = a.parent() { parents.insert(p); }
+                    if let Some(p) = b.parent() { parents.insert(p); }
                 }
             }
         }
@@ -961,7 +957,7 @@ fn rpc_search(reduced: &ReducerState, q: &str, limit: usize, principal: Option<&
 async fn rpc_get_pair(state: &AppState, room: String, parent_path: String) -> Result<RpcResult, RpcErr> {
     let scope = scope_from_room_wire(&room);
     let reduced_arc = state.reduced.clone();
-    let pool: Vec<String> = {
+    let pool: Vec<CanonicalItemUrl> = {
         let reduced = reduced_arc.read().await;
         let content = content_for_room(&reduced, &room);
         let tmp = if parent_path.trim().is_empty() {
@@ -970,12 +966,11 @@ async fn rpc_get_pair(state: &AppState, room: String, parent_path: String) -> Re
             Some(parent_path.clone())
         };
         let specs = parse_parent_specs(tmp.as_ref());
-        let raw_pool: Vec<CanonicalItemUrl> = if specs.is_empty() {
+        if specs.is_empty() {
             content.ranking_group.idx_to_item.clone()
         } else {
             crate::scope_rank::resolve_scope(content, &specs)
-        };
-        raw_pool.into_iter().map(|it| it.0).collect()
+        }
     };
     if pool.len() < 2 {
         return Err((
@@ -983,31 +978,30 @@ async fn rpc_get_pair(state: &AppState, room: String, parent_path: String) -> Re
             Some("add items via ingest".into()),
         ));
     }
-    let selected: Option<(String, String)> = {
+    let selected: Option<(CanonicalItemUrl, CanonicalItemUrl)> = {
         let mut reduced = reduced_arc.write().await;
         let content = reduced.content.entry(scope.clone()).or_default();
         let group = &mut content.ranking_group;
         if group.idx_to_item.is_empty() {
-            pick_random_distinct(&pool)
+            pick_random_distinct_canonical(&pool)
         } else {
             let mut rng = rand::thread_rng();
-            let idxs: Vec<usize> = pool.iter()
-                .filter_map(|it| {
-                    let key = CanonicalItemUrl(it.clone());
-                    group.item_to_idx.get(&key).copied()
-                })
+            let idxs: Vec<usize> = pool
+                .iter()
+                .filter_map(|it| group.item_to_idx.get(it).copied())
                 .collect();
             let ranked = ranked_items_subset(group, &idxs, 10000, 1e-8);
-            let ranked_set: HashSet<String> = ranked.iter().map(|r| r.item.as_str().to_string()).collect();
-            let unsorted: Vec<String> = pool.iter()
+            let ranked_set: HashSet<CanonicalItemUrl> = ranked.iter().map(|r| r.item.clone()).collect();
+            let unsorted: Vec<CanonicalItemUrl> = pool
+                .iter()
                 .filter(|it| !ranked_set.contains(*it))
                 .cloned()
                 .collect();
-            let mut pick: Option<(String, String)> = None;
+            let mut pick: Option<(CanonicalItemUrl, CanonicalItemUrl)> = None;
             if !unsorted.is_empty() {
                 if let Some(left) = unsorted.choose(&mut rng).cloned() {
-                    let mut candidates: Vec<String> = if !ranked.is_empty() {
-                        ranked.iter().map(|r| r.item.as_str().to_string()).collect()
+                    let mut candidates: Vec<CanonicalItemUrl> = if !ranked.is_empty() {
+                        ranked.iter().map(|r| r.item.clone()).collect()
                     } else {
                         pool.clone()
                     };
@@ -1021,21 +1015,21 @@ async fn rpc_get_pair(state: &AppState, room: String, parent_path: String) -> Re
                     let a = ranked[i].item.as_str();
                     let b = ranked[i + 1].item.as_str();
                     if a != b && !is_pair_voted(group, a, b) {
-                        pick = Some((a.to_string(), b.to_string()));
+                        pick = Some((ranked[i].item.clone(), ranked[i + 1].item.clone()));
                         break;
                     }
                 }
                 if pick.is_none() {
                     for _ in 0..64 {
                         let (Some(a), Some(b)) = (pool.choose(&mut rng).cloned(), pool.choose(&mut rng).cloned()) else { break; };
-                        if a != b && !is_pair_voted(group, &a, &b) {
+                        if a != b && !is_pair_voted(group, a.as_str(), b.as_str()) {
                             pick = Some((a, b));
                             break;
                         }
                     }
                 }
             }
-            pick.or_else(|| pick_random_distinct(&pool))
+            pick.or_else(|| pick_random_distinct_canonical(&pool))
         }
     };
     let Some((left, right)) = selected else {
@@ -1043,8 +1037,8 @@ async fn rpc_get_pair(state: &AppState, room: String, parent_path: String) -> Re
     };
     let reduced = reduced_arc.read().await;
     let content = content_for_ro

… preview truncated; 8,683 characters omitted

download full diff A

B — c_6f04dcb2e38c (tommy-mor)

message

[bda5f8aa] Remove legacy evidence projection; Evidence envelopes only.

Epoch and commit pages no longer invent history from bare GitDiscovery rows. Production ledger will be wiped to re-emit under the current schema.

Co-authored-by: Cursor <cursoragent@cursor.com>

diff preview

diff --git a/constitution.py b/constitution.py
index 4dd5b9dfbba231d46289c490f91b1dd5b1018bcf..26ba130e885e0e69fb7874ca5c3f07f42100a150 100644
--- a/constitution.py
+++ b/constitution.py
@@ -210,10 +210,10 @@ class Emission:
     distributions: dict   # author -> amount str
     ranking: dict         # author -> score str
     models_used: list
-    discovery_snapshot_id: str = ""  # empty only for pre-discovery ledger history
-    evidence_schema_version: int = 1
-    ranking_run_id: str = ""
-    ranking_event_id: str = ""
+    discovery_snapshot_id: str
+    evidence_schema_version: int
+    ranking_run_id: str
+    ranking_event_id: str
 
 
 @event
@@ -502,26 +502,6 @@ def _epochs_in_ledger() -> list[int]:
     return sorted(epochs)
 
 
-def _legacy_commit_row(commit_id: str) -> tuple[GitDiscovery | None, dict | None]:
-    for discovery in store.read():
-        if not isinstance(discovery, GitDiscovery):
-            continue
-        for commit in discovery.commits:
-            if commit_id_for_oid(commit["oid"]) == commit_id:
-                return discovery, commit
-    return None, None
-
-
-def _legacy_observation(commit_id: str) -> tuple[GitDiscovery | None, dict | None]:
-    for discovery in store.read():
-        if not isinstance(discovery, GitDiscovery):
-            continue
-        for obs in discovery.observations:
-            if commit_id_for_oid(obs["oid"]) == commit_id:
-                return discovery, obs
-    return None, None
-
-
 def build_pairwise_prompt(side_a: dict, side_b: dict) -> str:
     return f"""You are ranking contributions to an open source project.
 Compare these two sides (each may be one or more commits). Decide which side contributed more.
@@ -2040,7 +2020,7 @@ def _strip_heavy_fields(obj: dict) -> dict:
 
 @app.get("/api/ledger")
 async def get_ledger(offset: int = 0, limit: int = 100, full: int = 0):
-    """List of ledger dicts (backward-compatible). Heavy blobs stripped unless full=1."""
+    """List of ledger dicts. Heavy blobs stripped unless full=1."""
     limit = max(1, min(limit, 500))
     rows = []
     for e in store.read()[offset:offset + limit]:
@@ -2274,23 +2254,25 @@ async def epochs_index():
     epochs = _epochs_in_ledger()
     rows = []
     for epoch in epochs:
-        discovery = _discovery_for_epoch(epoch)
         emission = _emission_for_epoch(epoch)
-        evidence_n = sum(
-            1 for e in evidence_by_kind() if e.epoch == epoch
+        evidence_n = sum(1 for e in evidence_by_kind() if e.epoch == epoch)
+        disc = next(
+            (
+                e for e in evidence_by_kind("git.discovery_completed")
+                if e.epoch == epoch
+            ),
+            None,
         )
         detail = []
-        if discovery:
+        if disc:
             detail.append(
-                f"{len(discovery.commits)} eligible / "
-                f"{len(discovery.observations)} observed"
+                f"{disc.payload.get('eligible_count', 0)} eligible / "
+                f"{disc.payload.get('observation_count', 0)} observed"
             )
         if emission:
             detail.append(f"emitted {emission.total_emitted}")
         if evidence_n:
             detail.append(f"{evidence_n} evidence events")
-        elif discovery or emission:
-            detail.append("legacy (no Evidence envelopes)")
         rows.append(["li",
             _a(_evidence_path("epoch", str(epoch)), f"epoch {epoch}"),
             " — ",
@@ -2307,37 +2289,37 @@ async def epochs_index():
 
 @app.get("/epochs/{epoch}")
 async def epoch_detail(epoch: int):
-    discovery = _discovery_for_epoch(epoch)
     emission = _emission_for_epoch(epoch)
     evidence_rows = [e for e in evidence_by_kind() if e.epoch == epoch]
+    if not evidence_rows and emission is None:
+        return _evidence_page(f"epoch {epoch}", [
+            _evidence_nav(),
+            ["h1", f"epoch {epoch}"],
+            ["p.note", "No evidence for this epoch."],
+        ])
+
     commit_evs = [e for e in evidence_rows if e.kind == "git.commit"]
     comparison_evs = [e for e in evidence_rows if e.kind == "comparison.input"]
     judgment_evs = [e for e in evidence_rows if e.kind == "llm.judgment"]
+    discovery_ev = next(
+        (e for e in evidence_rows if e.kind == "git.discovery_completed"), None
+    )
     ranking_started = next(
         (e for e in evidence_rows if e.kind == "ranking.started"), None
     )
     ranking_completed = next(
         (e for e in evidence_rows if e.kind == "ranking.completed"), None
     )
-    legacy = not evidence_rows and (discovery is not None or emission is not None)
-
-    commit_links: list[tuple[str, str]] = []
-    if commit_evs:
-        for e in commit_evs:
-            cid = e.payload.get("commit_id") or ""
-            label = (
-                f"{e.payload.get('oid', cid)[:24]} "
-                f"({e.payload.get('contributor', '?')})"
-            )
-            commit_links.append((label, _evidence_path("commit", cid)))
-    elif discovery:
-        for c in discovery.commits:
-            cid = commit_id_for_oid(c["oid"])
-            commit_links.append((
-                f"{c['oid'][:24]} ({c.get('contributor', '?')})",
-                _evidence_path("commit", cid),
-            ))
 
+    commit_links = [
+        (
+            f"{e.payload.get('oid', e.payload.get('commit_id', ''))[:24]} "
+            f"({e.payload.get('contributor', '?')})",
+            _evidence_path("commit", e.payload["commit_id"]),
+        )
+        for e in commit_evs
+        if e.payload.get("commit_id")
+    ]
     comparison_links = [
         (
             e.payload.get("summary") or e.payload.get("comparison_id", e.event_id),
@@ -2360,16 +2342,13 @@ async def epoch_detail(epoch: int):
     ]
 
     excluded = []
-    if discovery:
-        for obs in discovery.observations:
+    if discovery_ev:
+        for obs in discovery_ev.payload.get("observations") or []:
             if obs.get("eligible"):
                 continue
             oid = obs.get("oid", "?")
             reason = obs.get("exclusion_reason") or "excluded"
-            excluded.append(["li",
-                f"{oid[:28]} — {reason} — ",
-                ["span.note", "legacy evidence unavailable"],
-            ])
+            excluded.append(["li", f"{oid[:28]} — {reason}"])
 
     ranking_nodes: list = []
     if ranking_completed:
@@ -2388,21 +2367,10 @@ async def epoch_detail(epoch: int):
                 indent=2, sort_keys=True,
             )],
         ]
-    elif emission:
-        if legacy and len(emission.ranking or {}) <= 1:
-            ranking_nodes.append(["p.note",
-                "Single-contributor epoch — no LLM judgments."
-            ])
-        ranking_nodes.extend([
-            ["p", "Projected from Emission (no ranking Evidence event)."],
-            ["pre.blob", json.dumps(emission.ranking, indent=2, sort_keys=True)],
-        ])
+    elif ranking_started:
+        ranking_nodes = [["p.note", f"Ranking started: {ranking_started.event_id}"]]
     else:
-        ranking_nodes = [["p.note", "No ranking recorded."]]
-    if ranking_started and not ranking_completed:
-        ranking_nodes.insert(0, ["p.note",
-            f"Ranking started: {ranking_started.event_id}"
-        ])
+        ranking_nodes = [["p.note", "No ranking evidence."]]
 
     if emission:
         emission_node = _dl_rows([
@@ -2411,44 +2379,41 @@ async def epoch_detail(epoch: int):
             ("pool_after", emission.pool_after),
             ("discovery_snapshot_id", emission.discovery_snapshot_id),
             ("ranking_run_id", emission.ranking_run_id or None),
+            ("ranking_event_id", emission.ranking_event_id or None),
             ("models_used", ", ".join(emission.models_used or [])),
             ("distributions", json.dumps(emission.distributions, sort_keys=True)),
         ])
     else:
         emission_node = ["p.note", "No emission for this epoch."]
 
-    single_contributor = False
-    if discovery:
-        single_contributor = len({c.get("contributor") for c in discovery.commits}) <= 1
-    elif emission:
-        single_contributor = len(emission.ranking or {}) <= 1
+    contributors = {
+        e.payload.get("contributor")
+        for e in commit_evs
+        if e.payload.get("contributor")
+    }
+    no_comparisons_note = "No comparisons."
+    if len(contributors) <= 1:
+        no_comparisons_note += " Single-contributor — no LLM judgments."
 
     body = [
         _evidence_nav(),
         ["div.eyebrow", f"epoch {epoch}"],
         ["h1", f"epoch {epoch}"],
     ]
-    if legacy:
-        body.append(["p.note",
-            "Legacy epoch: projected from GitDiscovery/Emission without Evidence "
-            "envelopes. Eligible commits use discovery patches; discarded observation "
-            "metadata is marked legacy evidence unavailable. Single-contributor "
-            "epochs have no LLM judgments."
-        ])
-    if discovery:
+    if discovery_ev:
         body.extend([
             ["h2", "discovery"],
             _dl_rows([
-                ("snapshot_id", discovery.snapshot_id),
-                ("config_digest", discovery.config_digest),
-                ("initial_snapshot", discovery.initial_snapshot),
-                ("observations", len(discovery.observations)),
-                ("eligible", len(discovery.commits)),
+                ("snapshot_id", discovery_ev.payload.get("snapshot_id")),
+                ("config_digest", discovery_ev.payload.get("config_digest")),
+                ("observations", discovery_ev.payload.get("observation_count")),
+                ("eligible", discovery_ev.payload.get("eligible_count")),
+                ("event", _a(
+                    _evidence_path("event", discovery_ev.event_id),
+                    discovery_ev.event_id,
+                )),
             ]),
         ])
-    no_comparisons_note = "No comparisons."
-    if single_contributor:
-        no_comparisons_note += " Single-contributor — no LLM judgments."
     body.extend([
         ["h2", "commits"],
         _link_list(commit_links),
@@ -2471,92 +2436,42 @@ async def epoch_detail(epoch: int):
 @app.get("/commits/{commit_id}")
 async def commit_detail(commit_id: str):
     ev = find_evidence_payload("git.commit", "commit_id", commit_id)
-    discovery, legacy_row = (None, None)
     if not ev:
-        discovery, legacy_row = _legacy_commit_row(commit_id)
-    if not ev and not legacy_row:
-        discovery, obs = _legacy_observation(commit_id)
-        if obs is not None:
-            epoch = discovery.epoch if discovery else "?"
-            return _evidence_page(f"commit {commit_id[:24]}", [
-                _evidence_nav(
-                    _a(_evidence_path("epoch", str(epoch)), f"epoch {epoch}")
-                ),
-                ["div.eyebrow", "commit"],
-                ["h1", commit_id],
-                ["p.note", "legacy evidence unavailable"],
-                _dl_rows([
-                    ("oid", obs.get("oid")),
-                    ("eligible", obs.get("eligible")),
-                    ("exclusion_reason", obs.get("exclusion_reason")),
-                    ("epoch", str(epoch)),
-                ]),
-            ])
         return _evidence_page("commit not found", [
             _evidence_nav(),
             ["h1", "commit not found"],
             ["p", commit_id],
         ])
-    if ev:
-        p = ev.payload
-        epoch = ev.epoch
-        oid = p.get("oid", "")
-        contributor = p.get("contributor", "")
-        message = _blob_text(p.get("message"))
-        patch = _blob_text(p.get("patch"))
-        meta = _dl_rows([
+    p = ev.payload
+    epoch = ev.epoch
+    return _evidence_page(f"commit {commit_id[:24]}", [
+        _evidence_nav(_a(_evidence_path("epoch", str(epoch)), f"epoch {epoch}")),
+        ["div.eyebrow", "commit"],
+        ["h1", commit_id],
+        _dl_rows([
             ("commit_id", commit

… preview truncated; 7,279 characters omitted

download full diff B

Hardlinks — judgments / attempts / prompt

prompt download

judgments

attempts

Prompt text is loaded only by the download route.