You are a constitutional council ranking individual git commits for ownership allocation. Compare these two commits. Decide which contributed more lasting value to the project. Judge substance, not spectacle: - Prefer correct, lasting design and real bugfixes over churn, formatting, renames, or generated noise. - Prefer clarity and necessity over sheer line count. A small precise change can beat a large diffuse one. - Do not favor a side merely because its patch is longer or noisier. - Weight what the change does for the project, not the contributor's name. Return ONLY a JSON object: {"winner": "A" or "B", "ratio": "N:M", "explanation": "..."} The explanation must cite concrete differences in the patches (1-3 sentences). Side A — contributor: tommy-mor Side A — commit message: [0d3270d1] Fix GitHub OAuth callback NameError on missing API base URL. Co-authored-by: Cursor Side A — unified diff (full patch): diff --git a/constitution.py b/constitution.py index f819007252f435680b8356fb4da83469b21e33af..4dd5b9dfbba231d46289c490f91b1dd5b1018bcf 100644 --- a/constitution.py +++ b/constitution.py @@ -119,6 +119,9 @@ JSONL_PATH = pathlib.Path(os.environ.get("JSONL_PATH", "/data/ledger.jsonl")) GITHUB_CLIENT_ID = os.environ.get("GITHUB_CLIENT_ID", "") GITHUB_CLIENT_SECRET = os.environ.get("GITHUB_CLIENT_SECRET", "") +GITHUB_API_BASE_URL = os.environ.get( + "GITHUB_API_BASE_URL", "https://api.github.com" +).rstrip("/") OPENROUTER_API_KEY = os.environ.get("OPENROUTER_API_KEY", "") OPENROUTER_BASE_URL = os.environ.get("OPENROUTER_BASE_URL", "https://openrouter.ai").rstrip("/") Side B — contributor: tommy-mor Side B — commit message: [65bce99f] sibling groups #130 Side B — unified diff (full patch): diff --git a/server/src/html/garden.rs b/server/src/html/garden.rs index 82c1b4b4f36ea13a906035a1789ba893222b3695..e3c56d124ab7b0fa08c7f9ae736103e6b7cf5862 100644 --- a/server/src/html/garden.rs +++ b/server/src/html/garden.rs @@ -837,7 +837,8 @@ struct SiblingNavGroup { links: Vec, } -/// Siblings under the same parent, grouped like child rankings (components then isolates). +/// Siblings under the same parent: one group per ranking component (ordered list), then one +/// group per isolated unranked sibling (each shows rank `1`, separated like components). #[derive(Debug, Clone)] struct SiblingNavBar { groups: Vec, @@ -890,15 +891,12 @@ fn build_sibling_nav( groups.push(SiblingNavGroup { links }); } } - if !rankings.unranked_items.is_empty() { - let links: Vec = rankings - .unranked_items - .iter() - .map(|u| SiblingNavLink { + for u in &rankings.unranked_items { + groups.push(SiblingNavGroup { + links: vec![SiblingNavLink { path: u.clone().normalized_storage().to_storage_string(), - }) - .collect(); - groups.push(SiblingNavGroup { links }); + }], + }); } let sibling_total: usize = groups.iter().map(|g| g.links.len()).sum(); if sibling_total <= 1 { @@ -1541,6 +1539,29 @@ mod tests { assert_eq!(nav.groups[1].links.len(), 1); } + #[test] + fn sibling_nav_splits_each_unranked_into_its_own_group() { + let mut reduced = ReducerState::default(); + apply_ingest( + &mut reduced, + 1, + "@00000000-0000-0000-0000-000000000000:test:local/test\n\ + ~/topic {topic body}\n\ + ~/topic/a {alpha}\n\ + ~/topic/b {beta}\n\ + ~/topic/c {gamma}\n\ + ~/topic/d {delta}\n\ + {a beats b}\n ~/topic/a 2:1 ~/topic/b\n", + ); + + let model = build_item_page_view_model(&reduced, &ScopeId::Public, "~/topic/a"); + let nav = model.sibling_nav.expect("expected sibling nav"); + assert_eq!(nav.groups.len(), 3); + assert_eq!(nav.groups[0].links.len(), 2); + assert_eq!(nav.groups[1].links.len(), 1); + assert_eq!(nav.groups[2].links.len(), 1); + } + #[test] fn item_page_model_builds_ranked_child_components() { let mut reduced = ReducerState::default();