constitution · epochs · watch · epoch 3

comparison

c_8dc1a8119370 (tommy-mor) vs c_4a5c84c0a37b (tommy-mor)

download prompt · raw event · cmp_73bc8cb5aa0eff

council reasoning

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

Side B fixes a real display/URL-encoding bug (hrefs now use display_path instead of raw storage path) and strengthens a browser test to exhaustively vote all 45 pairs and assert correct ranking output, adding real verification value. Side A mostly deletes a large, elaborate but unused keystroke-autocomplete parser and replaces it with a much simpler paste-and-go flow, which is a reasonable simplification but is largely destructive/refactor churn rather than a new correctness fix, and also removes a nontrivial regression test (parser_race.clj) without a clear replacement guard for the same race condition.

~x-ai/grok-latest · winner A · 3:1 · permalink

A replaces an unreliable ~1.8k-line keystroke graph, parser_action surface, race-prone JS, and Playwright race test with a small deterministic paste-and-go parser plus redirect—lasting design simplification and a real reliability fix. B’s display_path href correction and full 45-pair ranking assertion are precise and valuable, but narrower in scope than removing and rebuilding the broken navigation subsystem.

openai/gpt-chat-latest · winner B · 4:1 · permalink

Side B fixes user-facing URL generation by using ItemId::display_path() instead of internal storage URLs for vote links, keeping hrefs consistent with the displayed DSL, and substantially strengthens the browser test to exercise all 45 pairwise comparisons and verify the final ranking and connectivity via RPC. Side A simplifies the navigation flow by replacing an unreliable autocomplete graph with a paste-and-go parser, but it also removes a large amount of parsing functionality and related tests in favor of a much narrower implementation.

sides

A — c_8dc1a8119370 (tommy-mor)

message

[529cc941] Replace autocomplete parser with paste-and-go navigate.

The keystroke transition graph was unreliable; a textarea plus Go button now parses pasted Reddit URLs and redirects to the subreddit ranking scope.

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

diff preview

diff --git a/AGENTS.md b/AGENTS.md
index 77f2e31d4e860a92a77255ca5106c8b6c4510ee7..36ee4c0ec700bffbe226ee775ba9cf59cf35c770 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -11,7 +11,6 @@ Single Rust web app **`sorter2-server`**: pairwise voting, rank-centrality ranki
 - **Rust 1.88+** is required (some transitive crates need a recent Cargo). The image may ship older `/usr/local/cargo` (1.83); use **rustup** and `rustup default 1.88.0` before building.
 - **System packages** for builds: `pkg-config`, `libssl-dev` (for `reqwest` / OpenSSL in integration tests and release builds).
 - **Clojure CLI 1.12.0.1530** (optional but used in CI): install from https://clojure.org/guides/install_clojure — needed for `./scripts/clj-test.sh` / Kaocha tests.
-- **Playwright browser** for the spel browser test (`test/parser_race.clj`): install once with `clojure -M -e "(com.microsoft.playwright.CLI/main (into-array String [\"install\" \"chromium\" \"--with-deps\"]))"`. The browser binary is cached under `~/.cache/ms-playwright`.
 
 ### Commands (see also `TEST.sh`)
 
diff --git a/server/src/api/ui_html.rs b/server/src/api/ui_html.rs
index 1339048c955c0a3eb5120381aaf031424cbed540..c4ab9d65c7b3cd42a5b4d093ba429993c101e9a8 100644
--- a/server/src/api/ui_html.rs
+++ b/server/src/api/ui_html.rs
@@ -8,7 +8,7 @@ use std::collections::HashMap;
 use crate::{
     html::{js_string_literal, ranking_panel, JsBuilder},
     parser::parse_reddit_url,
-    parser_render::parser_panel_morph,
+    parser_render::navigate_panel,
     state::AppState,
     ui_action::{parse_html_ui_from_form, HtmlUiAction},
 };
@@ -57,18 +57,23 @@ pub async fn post_ui_html(
                 .morph_selector("#ranking-panel", panel)
                 .into_response()
         }
-        HtmlUiAction::ParseQuery { query } => {
-            let action = parse_reddit_url(&query);
-            let panel = parser_panel_morph(&query, &action);
-            let mut js = JsBuilder::new().morph_selector("#parser-panel", panel);
-            if let Some(comp) = action.primary_completion() {
-                js = js.raw(&format!(
-                    "var __pi=document.getElementById('parser-input'); if(__pi){{__pi.dataset.completion={};}}",
-                    js_string_literal(comp)
-                ));
+        HtmlUiAction::ParseQuery { query } => match parse_reddit_url(&query) {
+            Ok(subreddit) => {
+                let dest = format!("/?sub={subreddit}");
+                JsBuilder::new()
+                    .raw(&format!(
+                        "window.location.href={};",
+                        js_string_literal(&dest)
+                    ))
+                    .into_response()
             }
-            js.into_response()
-        }
+            Err(message) => {
+                let panel = navigate_panel(&query, Some(&message));
+                JsBuilder::new()
+                    .morph_selector("#parser-panel", panel)
+                    .into_response()
+            }
+        },
     }
 }
 
diff --git a/server/src/html/mod.rs b/server/src/html/mod.rs
index 94a5cfb561d1c8464bd2782f7ffd4e0965ccf95d..9650d333d29c4ac94ceb407aee3ee00399c7f40b 100644
--- a/server/src/html/mod.rs
+++ b/server/src/html/mod.rs
@@ -11,8 +11,7 @@ use serde::Deserialize;
 
 use crate::{
     form_template::template_json_compact,
-    parser_action::ParserAction,
-    parser_render::parser_panel,
+    parser_render::navigate_panel,
     ranking::{top_bottom, RankedItem},
     reducer::GroupState,
     state::{normalize_scope, AppState},
@@ -336,10 +335,9 @@ pub async fn home(
     let empty = GroupState::new();
     let group = groups.get(&scope).unwrap_or(&empty);
 
-    let empty_action = ParserAction::suggest(String::new(), None);
     let body = html! {
         h1 { "sorter2" }
-        (parser_panel("", &empty_action))
+        (navigate_panel("", None))
         (vote_panel(&scope))
         (ranking_panel(&scope, group))
     };
diff --git a/server/src/lib.rs b/server/src/lib.rs
index fa423640d598f4ba97a5885d228e78d7b97f7a22..de8bca48cbf689cad22337883e7791966e7c4919 100644
--- a/server/src/lib.rs
+++ b/server/src/lib.rs
@@ -4,7 +4,6 @@ pub mod events;
 pub mod form_template;
 pub mod html;
 pub mod parser;
-pub mod parser_action;
 pub mod parser_render;
 pub mod path_types;
 pub mod ranking;
diff --git a/server/src/parser.rs b/server/src/parser.rs
index ea437c4434045b44cba04a2b3416df850db518e7..50571a59f0d3ece1e2538f88e00ef46ec40ea545 100644
--- a/server/src/parser.rs
+++ b/server/src/parser.rs
@@ -1,1811 +1,87 @@
-use std::collections::HashMap;
-use std::sync::OnceLock;
+//! Extract a subreddit name from a pasted Reddit URL or path.
 
-use crate::parser_action::{GuideOption, ParserAction, ScrollingSuggestion, Suggestion};
-
-// --- Core Abstractions ---
-
-/// Unique identifier for nodes in the graph
-type NodeId = &'static str;
-
-/// Pattern matching for edges
-#[derive(Debug, Clone)]
-pub enum EdgePattern {
-    /// Matches exact literal string
-    Literal(&'static str),
-    
-    /// Matches any prefix of a string and suggests the full string
-    /// e.g., PrefixOf("reddit.com") matches "r", "re", "red", "reddit", "reddit.com"
-    PrefixOf(&'static str),
-    
-    /// Captures a variable segment (e.g., subreddit name, username)
-    Variable(&'static str),
-    
-    /// Matches any string (wildcard)
-    Any,
-}
-
-impl EdgePattern {
-    /// Try to match this pattern against input, return (consumed_chars, captured_value)
-    fn matches(&self, input: &str) -> Option<(usize, Option<String>)> {
-        match self {
-            EdgePattern::Literal(lit) => {
-                if input.starts_with(lit) {
-                    Some((lit.len(), None))
-                } else {
-                    None
-                }
-            }
-            EdgePattern::PrefixOf(target) => {
-                // Check if input is a prefix of target
-                if target.starts_with(input) && !input.is_empty() {
-                    // It's a valid prefix
-                    Some((input.len(), None))
-                } else if input.starts_with(target) {
-                    // Full match
-                    Some((target.len(), None))
-                } else {
-                    None
-                }
-            }
-            EdgePattern::Variable(var_name) => {
-                // Consume until next '/' or end of string
-                let end = input.find('/').unwrap_or(input.len());
-                if end > 0 {
-                    let captured = input[..end].to_string();
-                    // Validate based on variable type
-                    if is_valid_variable(var_name, &captured) {
-                        Some((end, Some(captured)))
-                    } else {
-                        None
-                    }
-                } else {
-                    None
-                }
-            }
-            EdgePattern::Any => {
-                // Match everything until next '/' or end
-                let end = input.find('/').unwrap_or(input.len());
-                if end > 0 {
-                    Some((end, Some(input[..end].to_string())))
-                } else {
-                    None
-                }
-            }
-        }
-    }
-    
-    /// Get the completion suggestion for this pattern
-    fn completion(&self, partial: &str) -> Option<String> {
-        match self {
-            EdgePattern::PrefixOf(target) => {
-                if target.starts_with(partial) && partial != *target {
-                    Some(target.to_string())
-                } else {
-                    None
-                }
-            }
-            _ => None,
-        }
+pub fn parse_reddit_url(query: &str) -> Result<String, String> {
+    let q = query.trim();
+    if q.is_empty() {
+        return Err("Paste a Reddit URL or r/subreddit path".into());
     }
-}
 
-/// Edge in the graph
-pub struct Edge {
-    pattern: EdgePattern,
-    target: NodeId,
-    /// Optional description for autocomplete
-    description: Option<&'static str>,
-}
-
-/// Handler function for generating UI actions (Send + Sync so the graph can live in `OnceLock`).
-type Handler = Box<dyn Fn(&str, &str, &HashMap<String, String>) -> ParserAction + Send + Sync>;
-
-/// Node in the graph
-pub struct Node {
-    #[allow(dead_code)]
-    id: NodeId,
-    edges: Vec<Edge>,
-    handler: Option<Handler>,
-}
-
-/// The composable parser graph (immutable after `build`).
-pub struct Graph {
-    nodes: HashMap<NodeId, Node>,
-    root: NodeId,
-}
-
-// --- Graph Builder (Fluent API) ---
-
-pub struct GraphBuilder {
-    nodes: HashMap<NodeId, Node>,
-    current_node: Option<NodeId>,
-    root: NodeId,
-}
-
-impl GraphBuilder {
-    pub fn new() -> Self {
-        let mut nodes = HashMap::new();
-        nodes.insert(
-            "root",
-            Node {
-                id: "root",
-                edges: Vec::new(),
-                handler: None,
-            },
-        );
-
-        GraphBuilder {
-            nodes,
-            current_node: Some("root"),
-            root: "root",
-        }
+    if let Some(sub) = subreddit_after_prefix(q, "r/") {
+        return Ok(sub);
     }
 
-    /// Select a node to add edges to
-    pub fn at(mut self, node_id: NodeId) -> Self {
-        self.nodes.entry(node_id).or_insert_with(|| Node {
-            id: node_id,
-            edges: Vec::new(),
-            handler: None,
-        });
-        self.current_node = Some(node_id);
-        self
+    if let Some(sub) = subreddit_from_path_segment(q, "/r/") {
+        return Ok(sub);
     }
-    
-    /// Add an edge from the current node
-    pub fn edge(self, pattern: EdgePattern, target: NodeId) -> Self {
-        self.edge_with_desc(pattern, target, None)
-    }
-    
-    /// Add an edge with description
-    pub fn edge_with_desc(
-        mut self,
-        pattern: EdgePattern,
-        target: NodeId,
-        desc: Option<&'static str>,
-    ) -> Self {
-        let current = self.current_node.expect("No current node selected");
-
-        self.nodes.entry(target).or_insert_with(|| Node {
-            id: target,
-            edges: Vec::new(),
-            handler: None,
-        });
-
-        if let Some(node) = self.nodes.get_mut(current) {
-            node.edges.push(Edge {
-                pattern,
-                target,
-                description: desc,
-            });
-        }
 
-        self
-    }
-
-    /// Set handler for current node
-    pub fn handler<F>(mut self, handler: F) -> Self
-    where
-        F: Fn(&str, &str, &HashMap<String, String>) -> ParserAction + Send + Sync + 'static,
-    {
-        let current = self.current_node.expect("No current node selected");
-        if let Some(node) = self.nodes.get_mut(current) {
-            node.handler = Some(Box::new(handler));
-        }
-        self
-    }
-    
-    /// Build the final graph
-    pub fn build(self) -> Graph {
-        Graph {
-            nodes: self.nodes,
-            root: self.root,
-        }
-    }
+    Err("Could not find a subreddit in that URL".into())
 }
 
-// --- Parser Implementation ---
-
-impl Graph {
-    pub fn parse(&self, input: &str) -> ParserAction {
-        let normalized = input.trim().to_lowercase();
-        let mut state = ParserState {
-            input: &normalized,
-            cursor: 0,
-            current_node_id: self.root,
-            context: HashMap::new(),
-            original_query: input.to_string(),
-            current_prefix: String::new(),
-        };
-        
-        self.parse_recursive(&mut state)
-    }
-    
-    fn parse_recursive(&self, state: &mut ParserState) -> ParserAction {
-        let node = self
-            .nodes
-            .get(state.current_node_id)
-            .expect("Node not found in graph");
-
-        // If we've consumed all input, check for handler or suggestions
-        if state.cursor >= state.input.len() {
-            if let Some(handler) = &node.han

… preview truncated; 92,533 characters omitted

download full diff A

B — c_4a5c84c0a37b (tommy-mor)

message

[0728c06a] Vote pool: use display_path in hrefs; test all 45 pairs + assert ranking.

- vote_compare_href and vote_pool_href now encode ~/… and -/… as their
  short display forms (not the full https://slug.social/… storage URL),
  matching what users see in the item display and DSL.
- Rewrite browser_vote_pool test to vote all C(10,2)=45 pairs in the
  pool, always preferring the alphabetically-earlier letter, then query
  GetGardenRank and assert the 10 items form one component ranked a→j.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

diff preview

diff --git a/server/src/html/garden/vote.rs b/server/src/html/garden/vote.rs
index 2682cfcbd2f834b56459a02831aa225cffe67c58..d0ec78cd675eae284d056fb3b8eaf5cc853d6263 100644
--- a/server/src/html/garden/vote.rs
+++ b/server/src/html/garden/vote.rs
@@ -234,8 +234,10 @@ pub(super) fn vote_compare_href(
     thread_override: Option<&str>,
     pool: Option<&ItemId>,
 ) -> String {
-    let left_q = urlencoding::encode(left.as_str());
-    let right_q = urlencoding::encode(right.as_str());
+    let left_dp = left.display_path();
+    let right_dp = right.display_path();
+    let left_q = urlencoding::encode(&left_dp);
+    let right_q = urlencoding::encode(&right_dp);
     let mut base = format!(
         "{}/vote?left={}&right={}",
         nav.room_path_prefix_for_vote_compare(),
@@ -246,16 +248,20 @@ pub(super) fn vote_compare_href(
         base = format!("{}&thread={}", base, urlencoding::encode(t));
     }
     if let Some(p) = pool {
-        base = format!("{}&pool={}", base, urlencoding::encode(p.as_str()));
+        let pool_dp = p.display_path();
+        base = format!("{}&pool={}", base, urlencoding::encode(&pool_dp));
     }
     base
 }
 
 pub(super) fn vote_pool_href(nav: &ThreadNav, pool_item_str: &str) -> String {
+    let display = ItemId::parse(pool_item_str)
+        .map(|i| i.display_path())
+        .unwrap_or_else(|| pool_item_str.to_string());
     format!(
         "{}/vote?pool={}",
         nav.room_path_prefix_for_vote_compare(),
-        urlencoding::encode(pool_item_str)
+        urlencoding::encode(&display)
     )
 }
 
diff --git a/test/browser_vote_pool.clj b/test/browser_vote_pool.clj
index d51f05db47dc3cb013e56e65f3a1edfbbcbd96ab..23d0bd80b02bd8b1b48853454bed02793296550e 100644
--- a/test/browser_vote_pool.clj
+++ b/test/browser_vote_pool.clj
@@ -1,6 +1,8 @@
 (ns test.browser-vote-pool
-  "Pool-scoped voting: seed ~/pool/a-j, enter via /vote?pool=~/pool, follow
-   the vote → next-pair → vote sequence until no next pair or 15 iterations."
+  "Pool-scoped voting: seed ~/pool/a-j (10 letters), follow the
+   vote → next-pair sequence for all C(10,2)=45 pairs voting the
+   alphabetically-earlier item each time, then assert the garden
+   ranking is a…j in order."
   (:require [babashka.fs :as fs]
             [cheshire.core :as json]
             [clojure.string :as str]
@@ -11,26 +13,38 @@
             [test.common :as common]
             [test.oauth :as oauth]))
 
+(def letters ["a" "b" "c" "d" "e" "f" "g" "h" "i" "j"])
+(def total-pairs (/ (* (count letters) (dec (count letters))) 2)) ; C(10,2) = 45
+
 (defn- wait-for-text [pg selector expected timeout-ms]
   (let [deadline (+ (System/currentTimeMillis) timeout-ms)]
     (loop []
-      (let [text (locator/text-content (page/locator pg selector))]
+      (let [text (try (locator/text-content (page/locator pg selector)) (catch Exception _ nil))]
         (if (and (string? text) (str/includes? text expected))
           true
           (if (< (System/currentTimeMillis) deadline)
-            (do (Thread/sleep 200) (recur))
+            (do (Thread/sleep 150) (recur))
             false))))))
 
 (defn- element-text [pg selector]
-  (try (locator/text-content (page/locator pg selector)) (catch Exception _ nil)))
+  (try (locator/text-content (page/locator pg selector)) (catch Exception _ "")))
 
 (defn- enc [^String s]
   (java.net.URLEncoder/encode s "UTF-8"))
 
-(def letters ["a" "b" "c" "d" "e" "f" "g" "h" "i" "j"])
+;; Extract the terminal path segment, e.g. "~/pool/c" → "c".
+(defn- leaf [path] (last (str/split path #"/")))
+
+;; Set the hidden ratio inputs so the alphabetically-earlier item wins.
+(defn- set-ratio! [pg left-text right-text]
+  (let [[rl rr] (if (neg? (compare (leaf left-text) (leaf right-text)))
+                  [100 0]   ; left is earlier → prefer left
+                  [0 100])] ; right is earlier → prefer right
+    (page/evaluate pg (str "document.getElementById('vote-ratio-left').value='" rl "'"))
+    (page/evaluate pg (str "document.getElementById('vote-ratio-right').value='" rr "'"))))
 
 (defn vote-pool-flow! []
-  (println "\n━━━ browser vote pool (/vote?pool= seeds + follow next-pair sequence) ━━━\n")
+  (println (str "\n━━━ browser vote pool (all " total-pairs " pairs → sorted ranking) ━━━\n"))
 
   (common/letlocals
    (bind build (common/run-cargo-build-release! ["slugsocial-server"]))
@@ -54,7 +68,6 @@
 
      (let [alice-token (oauth/fetch-bearer-token! base-url :username "alice")
            thread-tag  "browser-vote-pool"
-           ;; seed ~/pool/a through ~/pool/j as items with bodies
            item-lines  (str/join "\n"
                                  (map (fn [l] (str "~/pool/" l " {" l "}")) letters))
            raw         (str "# " thread-tag "\n\n~/pool {root}\n" item-lines "\n")
@@ -77,51 +90,57 @@
                (page/navigate pg (str base-url "/login"))
                (is (wait-for-text pg "body" "@alice" 15000) "alice session after login")
 
-               ;; Enter via pool URL — page picks first pair automatically.
                (page/navigate pg pool-url)
                (is (wait-for-text pg "body.view-vote-compare" "compare" 15000)
                    "pool entry: vote compare page loads")
 
-               ;; Verify the initial pair is within the pool.
-               (let [pair-text (element-text pg ".vote-compare-pair")]
-                 (is (and (string? pair-text) (str/includes? pair-text "~/pool/"))
-                     (str "initial pair is within ~/pool: " pair-text)))
-
-               ;; Follow vote → next-pair sequence up to 15 iterations.
-               (let [votes-cast
-                     (loop [i 0]
-                       (if (>= i 15)
-                         i
-                         (let [explanation (str "pool vote " i " reason")]
-                           (locator/fill (page/locator pg "#vote-explain") explanation)
-                           (locator/click (page/locator pg "#vote-compare-form button[type=submit]"))
-                           ;; Wait for edge history morph confirming the vote landed.
-                           (if-not (wait-for-text pg "ul.vote-edge-history" explanation 20000)
-                             (do (println "  vote" i "history morph timed out — stopping")
-                                 i)
-                             (let [has-next (wait-for-text pg "[data-testid=\"vote-next-pair\"]"
-                                                           "next pair" 8000)]
-                               (if-not has-next
-                                 ;; "no next pair" — pool exhausted.
-                                 (do (println "  no next pair after vote" i " — pool exhausted")
-                                     (inc i))
-                                 (do
-                                   ;; Verify the pair on this page is within the pool before advancing.
-                                   (let [pt (element-text pg ".vote-compare-pair")]
-                                     (is (and (string? pt) (str/includes? pt "~/pool/"))
-                                         (str "pair at vote " i " is within ~/pool: " pt)))
-                                   (locator/click (page/locator pg "[data-testid=\"vote-next-pair\"]"))
-                                   ;; Wait for next pair to load.
-                                   (wait-for-text pg "body.view-vote-compare" "compare" 10000)
-                                   (recur (inc i)))))))))]
-
-                 (is (>= votes-cast 1) (str "cast at least 1 vote, got: " votes-cast))
-                 (println (str "  pool voting sequence complete: " votes-cast " vote(s) cast")))
-
-               ;; After the sequence, the current page is still a pool-scoped vote page.
-               (let [url (page/url pg)]
-                 (is (str/includes? (or url "") "/vote")
-                     (str "still on /vote after sequence: " url))))))))
+               ;; Vote all 45 pairs, always preferring the alphabetically-earlier item.
+               (loop [votes-cast 0]
+                 (when (< votes-cast total-pairs)
+                   (let [left-text  (element-text pg ".vote-compare-left code")
+                         right-text (element-text pg ".vote-compare-right code")]
+                     (is (str/includes? left-text "~/pool/")
+                         (str "vote " votes-cast ": left is in pool: " left-text))
+                     (is (str/includes? right-text "~/pool/")
+                         (str "vote " votes-cast ": right is in pool: " right-text))
+                     (set-ratio! pg left-text right-text)
+                     (let [winner (if (neg? (compare (leaf left-text) (leaf right-text)))
+                                    (leaf left-text) (leaf right-text))]
+                       (locator/fill (page/locator pg "#vote-explain")
+                                     (str "prefer " winner)))
+                     (locator/click (page/locator pg "#vote-compare-form button[type=submit]"))
+                     (is (wait-for-text pg "ul.vote-edge-history" "prefer " 20000)
+                         (str "vote " votes-cast " appears in edge history"))
+                     (when (< (inc votes-cast) total-pairs)
+                       (is (wait-for-text pg "[data-testid=\"vote-next-pair\"]" "next pair" 8000)
+                           (str "next pair available after vote " votes-cast))
+                       (locator/click (page/locator pg "[data-testid=\"vote-next-pair\"]"))
+                       (is (wait-for-text pg "body.view-vote-compare" "compare" 10000)
+                           (str "vote page loaded for pair " (inc votes-cast))))
+                     (recur (inc votes-cast)))))
+
+               (println (str "  cast all " total-pairs " votes"))
+
+               ;; Query the ranking via RPC and assert alphabetical order.
+               (let [rank-resp  (oauth/http-post-json
+                                 (str base-url "/api/v0/rpc")
+                                 [{"GetGardenRank" {"room"        "public"
+                                                    "parent_path" "~/pool"}}]
+                                 :headers {"Authorization" (str "Bearer " alice-token)})
+                     rank-json  (json/parse-string (:body rank-resp) true)
+                     result     (get-in rank-json [:results 0 :result :GardenRank])
+                     components (:components result)
+                     unranked   (:unranked_items result)
+                     ranked     (mapv :item (mapcat :ranking components))
+                     ranked-leaves (mapv #(last (str/split % #"[/~]+")) ranked)]
+                 (is (= 1 (count components))
+                     (str "all 10 items form one connected component (got " (count components) ")"))
+                 (is (empty? unranked)
+                     (str "no unranked items (got " (count unranked) ")"))
+                 (is (= 10 (count ranked))
+                     (str "10 items ranked (got " (count ranked) ")"))
+                 (is (= letters ranked-leaves)
+                     (str "ranking is alphabetical a→j (got " ranked-leaves ")"))))))))
 
      (finally
        (when-some [s @!server] (common/kill-server s))

download full diff B

Hardlinks — judgments / attempts / prompt

prompt download

judgments

attempts

Prompt text is loaded only by the download route.