{"messages":[{"content":"You are a constitutional council ranking individual git commits for ownership allocation.\n\nCompare these two commits. Decide which contributed more lasting value to the project.\n\nJudge substance, not spectacle:\n- Prefer correct, lasting design and real bugfixes over churn, formatting, renames, or generated noise.\n- Prefer clarity and necessity over sheer line count. A small precise change can beat a large diffuse one.\n- Do not favor a side merely because its patch is longer or noisier.\n- Weight what the change does for the project, not the contributor's name.\n\nReturn ONLY a JSON object: {\"winner\": \"A\" or \"B\", \"ratio\": \"N:M\", \"explanation\": \"...\"}\nThe explanation must cite concrete differences in the patches (1-3 sentences).\n\nSide A — contributor: tommy-mor\nSide A — commit message:\n[7422b40d] 308 legacy are.na channel URLs; unbreak Kaocha CI (#199)\n\n* Fix flaky are.na legacy-redirect Kaocha wait\n\nPoll the page URL on the Playwright thread after clicking resolve\nchildren. wait-for-url on a future could miss the eval'd\nwindow.location redirect and fail CI after #193 merged.\n\nCo-authored-by: thmorriss \n\n* Fix unmatched parens in arena resolver test\n\nThe extra str wrapping the assertion message dropped a closing\nparen and the namespace failed to load.\n\nCo-authored-by: thmorriss \n\n* Submit are.na resolve via JS click, not Playwright pointer\n\nThe legacy user/channel page is a ghost item, so it embeds a live\nare.na iframe above the resolver. Playwright's pointer click can miss\nthe /ui submit; HTMLElement.click() hits the same-document form.\nAdd cargo coverage that the resolve form already targets /channel/:slug.\n\nCo-authored-by: thmorriss \n\n* Drive are.na resolve through in-page fetch and eval\n\nHTMLElement.click still returned before slug_ui.js finished POST /ui.\nEvaluate the same fetch+eval as the interceptor (Playwright awaits the\npromise), drop the live iframe, then poll the URL.\n\nCo-authored-by: thmorriss \n\n* 308 legacy are.na user/channel garden URLs to /channel/:slug\n\nGET /-/https://www.are.na/:user/:channel now permanently redirects to\nthe canonical channel item, matching are.na and avoiding a ghost page\nwhose live iframe broke the Kaocha resolve-redirect wait.\n\nCo-authored-by: thmorriss \n\n---------\n\nCo-authored-by: Cursor Agent \n\nSide A — unified diff (full patch):\ndiff --git a/agents.md b/agents.md\nindex e3b1df96a40def06c2602fe3055388ca0cd9c8e4..bcdd536f2903dc6f65048f7b3b0c70ad17c6cd3b 100644\n--- a/agents.md\n+++ b/agents.md\n@@ -67,7 +67,7 @@ Strict **CSP** that blocks `eval` would break the current app. Other projects ma\n - **`ResolveExternal`:** Resolver buttons (GitHub, are.na) are browser actions through **`POST /ui`**. Success responses morph **`#external-resolver-status`** then redirect to the sanitized shareable **`GET`** page so imported children render through the normal page path; errors morph the same status region. Resolver results are durable system ingests, while cooldown state is RAM-only. Implementation lives under **`server/src/resolvers/`** (per-domain resolver + import card JSON); **`mod.rs::resolve_external_children`** dispatches on URL host and **`try_render_resolver_item_body`** tries each card renderer before falling back to the usual **`
`** linkified view (called from **`render_item_body_in_scope`** in **`server/src/html/mod.rs`**, used by ontology item pages and the **`GET /vote/compare`** left/right columns). The resolver panel (**`external_resolver_controls`** in **`server/src/html/garden/external.rs`**) renders per-host (\"GitHub resolver\" / \"Are.na resolver\"); only GitHub items get a siblings button (are.na block URLs are not path-children of their channel).\n   - **Import thread:** one forum thread per GitHub repo (`import:https:::github.com:{owner}:{repo}`), shared by repo root / issues / pulls / commits / releases imports. Are.na: one thread per channel (`import:https:::www.are.na:channel:{slug}`) or per user profile (`import:https:::www.are.na:{user}`).\n   - **Issues:** each open issue is its own **`system:github-resolver`** ingest in that repo import thread (so a later redact removes that issue from the garden). Refresh pages **all** open issues from the GitHub API (up to the page safety cap), keeps still-open single-issue posts, and **`SystemRedact`s** posts for closed/missing issues (and multi-issue bulk posts, which are re-imported as singles). The `slug-github-card` fence payload is **base64(JSON)** so markdown fences in issue bodies cannot terminate the DSL toggle-fence; decode yields the real excerpt string for rich/markdown rendering.\n-  - **Are.na channels and users:** each channel entry (block or nested channel) is its own **`system:arena-resolver`** ingest in the channel import thread, with the same refresh semantics as issues: page **`GET /v3/channels/{slug}/contents`** (`per=100`, page cap 25), keep still-connected posts, redact removed ones. User profile URLs (`https://www.are.na/:user`) import the user's channels via **`GET /v3/users/{user}/contents`** (non-channel entries skipped). Legacy **`/:user/:channel`** URLs name the same channel as **`/channel/:slug`** (slugs are globally unique): the resolver collapses them onto the canonical channel item (**`canonical_arena_item`**), and the panel's `item_storage` / `next` point at the canonical page. Block URLs (`/block/:id`) are **not** path-children of the channel, so membership is an **explicit containment claim** (`block <: channel` with a leading `{ … }` explanation) in the same post as the block's `slug-arena-card` body; blocks keep cross-channel identity (one item, multiple scopes). Validation requires containment sides to have bodies, so a ghost parent (channel or user, never pasted with a body) gets a one-time card definition ingest before child posts (**`ensure_scope_body`**). Cards carry `image_url` / `source_url` and render an `` for image blocks. Env: **`SLUG_ARENA_API_BASE_URL`** (default `https://api.are.na`, v3), optional **`SLUG_ARENA_TOKEN`**, **`SLUG_ARENA_RESOLVER_COOLDOWN_MS`**. Card CSS classes are resolver-agnostic (`import-card__*`, shared with GitHub cards).\n+  - **Are.na channels and users:** each channel entry (block or nested channel) is its own **`system:arena-resolver`** ingest in the channel import thread, with the same refresh semantics as issues: page **`GET /v3/channels/{slug}/contents`** (`per=100`, page cap 25), keep still-connected posts, redact removed ones. User profile URLs (`https://www.are.na/:user`) import the user's channels via **`GET /v3/users/{user}/contents`** (non-channel entries skipped). Legacy **`/:user/:channel`** URLs name the same channel as **`/channel/:slug`** (slugs are globally unique): garden **`GET /-/https://www.are.na/:user/:channel`** **308**s onto **`/-/https://www.are.na/channel/:slug`** (query preserved; room-scoped twin too). The resolver also collapses them onto the canonical channel item (**`canonical_arena_item`** / **`collapsed_legacy_arena_item`**), and the panel's `item_storage` / `next` point at the canonical page. Block URLs (`/block/:id`) are **not** path-children of the channel, so membership is an **explicit containment claim** (`block <: channel` with a leading `{ … }` explanation) in the same post as the block's `slug-arena-card` body; blocks keep cross-channel identity (one item, multiple scopes). Validation requires containment sides to have bodies, so a ghost parent (channel or user, never pasted with a body) gets a one-time card definition ingest before child posts (**`ensure_scope_body`**). Cards carry `image_url` / `source_url` and render an `` for image blocks. Env: **`SLUG_ARENA_API_BASE_URL`** (default `https://api.are.na`, v3), optional **`SLUG_ARENA_TOKEN`**, **`SLUG_ARENA_RESOLVER_COOLDOWN_MS`**. Card CSS classes are resolver-agnostic (`import-card__*`, shared with GitHub cards).\n   - **External URL wire form:** Canonical garden paths are **`/-/https://host/…`**. Legacy **`/-/host/…`** and collapsed **`/-/https:/host/…`** permanently redirect to the canonical form. Action `next` fields always use the canonical path.\n   - **Tilde garden URLs / leaf identity:** Leaf pages are canonical (`GET /~/luke` renders the item/scope page). Nested `GET /~/x/luke` permanently redirects (308, query preserved) to the leaf — same precedent as `/-/` legacy redirects (`OntologyPath::nested_redirect_target`). Trailing slashes on the garden roots and leaf pages also 308 to the slash-free form (`/~/` → `/~`, `/~/luke/` → `/~/luke`; same for `/-/` and `/r/:room_key/~/` / `/r/:room_key/-/`). Room-scoped `/r/:room/~/*path` follows the same rule (`/r/…/~/x/luke` → `/r/…/~/luke`). **`GET /~`** is the root-electorate index (via the root scope view). `~/x/luke` and `~/y/luke` are the same item `~luke`. Breadcrumbs walk **containment** (strongest parent weight), not the typed URL path; other active scopes are listed as alternates on the item page.\n - **Garden pin / compare voting:** Cookie **`slug_garden_pin`** via **`set_garden_pin`**. Pairwise UI: **`GET /vote/compare?…`** / **`GET /r/:room_key/vote/compare?…`** (fullscreen **`GET`** page: no HUD; other garden pages). HUD (**`#slug-pin-hud`**): only when **`layout`** passes garden metadata on **`body`**; the label is **`POST /ui`** **`set_garden_pin`** **`clear:true`** (**`slug_ui.js`**), not a permalink to the item.\ndiff --git a/server/src/html/garden/external.rs b/server/src/html/garden/external.rs\nindex cccfe2717260cea6ba7b437c41fceed5c626a10a..516e8191afef4ce10618df97ed251704910c9e68 100644\n--- a/server/src/html/garden/external.rs\n+++ b/server/src/html/garden/external.rs\n@@ -200,6 +200,30 @@ mod tests {\n         assert!(!html.contains(\"jake-chvatal\"));\n     }\n \n+    #[test]\n+    fn kaocha_legacy_my_chan_url_rewrites_next_to_canonical() {\n+        let nav = ThreadNav::public();\n+        let markup = external_resolver_controls(\n+            \"https://www.are.na/some-user/my-chan\",\n+            &nav,\n+            \"/-/https://www.are.na/some-user/my-chan\",\n+        )\n+        .expect(\"are.na panel renders\");\n+        let html = markup.into_string();\n+        assert!(\n+            html.contains(\"/-/https://www.are.na/channel/my-chan\"),\n+            \"legacy ghost page must land on canonical channel, got {html}\"\n+        );\n+        assert!(\n+            html.contains(\"https://www.are.na/channel/my-chan\"),\n+            \"resolve payload must target canonical item, got {html}\"\n+        );\n+        assert!(\n+            !html.contains(\"some-user\"),\n+            \"legacy user segment must not remain in the resolve form, got {html}\"\n+        );\n+    }\n+\n     #[test]\n     fn canonical_arena_channel_url_keeps_page_as_next() {\n         let nav = ThreadNav::public();\ndiff --git a/server/src/html/garden/routes.rs b/server/src/html/garden/routes.rs\nindex 226571b7dafe7c2a274f6b343cda8b55d94a604a..dd8f19a564a771d4eae766fda50c715f8fed1700 100644\n--- a/server/src/html/garden/routes.rs\n+++ b/server/src/html/garden/routes.rs\n@@ -54,6 +54,14 @@ pub async fn redirect_strip_trailing_slash(uri: Uri) -> impl IntoResponse {\n     redirect_permanent_preserving_query(canonical, &uri)\n }\n \n+/// Legacy are.na `/:user/:channel` garden paths 308 onto `/channel/:slug`.\n+fn arena_legacy_channel_redirect(request_path: &str, nav: &ThreadNav) -> Option {\n+    let parsed = ExternalOntologyPath::from_input(request_path);\n+    let item = ItemId::parse(parsed.as_str())?;\n+    let canonical = crate::resolvers::arena::collapsed_legacy_arena_item(&item)?;\n+    Some(nav.garden_item_href(&canonical))\n+}\n+\n pub async fn garden_index(\n     State(state): State,\n     jar: CookieJar,\n@@ -241,6 +249,9 @@ pub async fn external_ontology_path(\n     if let Some(canonical) = ExternalOntologyPath::legacy_redirect_target(&path) {\n         return redirect_permanent_preserving_query(&canonical, &uri).into_response();\n     }\n+    if let Some(canonical) = arena_legacy_channel_redirect(&path, &ThreadNav::public()) {\n+        return redirect_permanent_preserving_query(&canonical, &uri).into_response();\n+    }\n     let path = ExternalOntologyPath::from_input(&path);\n     render_scope_view(\n         state,\n@@ -398,6 +409,9 @@ pub async fn room_external_ontology_path(\n         let base = format!(\"{}-/{tail}\", nav.garden_root_url().trim_end_matches('~'));\n         return redirect_permanent_preserving_query(&base, &uri).into_response();\n     }\n+    if let Some(canonical) = arena_legacy_channel_redirect(&path, &nav) {\n+        return redirect_permanent_preserving_query(&canonical, &uri).into_response();\n+    }\n     let path = ExternalOntologyPath::from_input(&path);\n     render_scope_view(state, GardenBrowsePath::External(path), nav, jar, uri)\n         .await\ndiff --git a/server/src/resolvers/arena.rs b/server/src/resolvers/arena.rs\nindex 9f8bdf62d99a9b878b9abeb949ba33ff78364810..dba51b5326cbb72310a63a2c8a945f48bcfa96bc 100644\n--- a/server/src/resolvers/arena.rs\n+++ b/server/src/resolvers/arena.rs\n@@ -278,6 +278,13 @@ pub fn canonical_arena_item(item: &ItemId) -> Option {\n     }\n }\n \n+/// `Some` when `item` is a legacy `/:user/:channel` URL that should 308 to\n+/// `/channel/:slug`. User profiles and already-canonical channel URLs are `None`.\n+pub fn collapsed_legacy_arena_item(item: &ItemId) -> Option {\n+    let canonical = canonical_arena_item(item)?;\n+    (canonical.as_str() != item.as_str()).then_some(canonical)\n+}\n+\n /// Stable import thread for an are.na URL: one thread per channel or per user.\n fn resolver_thread_tag(item: &ItemId) -> String {\n     let path = match arena_target(item) {\n@@ -813,6 +820,20 @@ mod tests {\n             canonical.as_str(),\n             \"https://www.are.na/channel/item-industrial\"\n         );\n+        assert_eq!(\n+            collapsed_legacy_arena_item(&legacy).as_ref().map(ItemId::as_str),\n+            Some(\"https://www.are.na/channel/item-industrial\")\n+        );\n+        assert_eq!(\n+            collapsed_legacy_arena_item(\n+                &ItemId::parse(\"https://www.are.na/channel/item-industrial\").unwrap()\n+            ),\n+            None\n+        );\n+        assert_eq!(\n+            collapsed_legacy_arena_item(&ItemId::parse(\"https://www.are.na/jake-chvatal\").unwrap()),\n+            None\n+        );\n         // Same thread as the canonical form.\n         assert_eq!(\n             resolver_thread_tag(&legacy),\ndiff --git a/server/tests/integration_html.rs b/server/tests/integration_html.rs\nindex 671da59ac9bf31593043fb82dcebc505aeb77fd4..9ebf1c033c1c63a221c9dc2d3adbf575089a06e2 100644\n--- a/server/tests/integration_html.rs\n+++ b/server/tests/integration_html.rs\n@@ -774,3 +774,20 @@ async fn test_forum_index_moved_to_root() {\n         assert_eq!(redirect_location(&resp), \"/\");\n     }\n }\n+\n+#[tokio::test]\n+async fn test_legacy_arena_channel_page_resolve_form_targets_canonical() {\n+    let (addr, _tmp, _log, _state, _handle) = create_test_server_with_state().await;\n+    let client = no_redirect_client();\n+    let resp = client\n+        .get(format!(\n+            \"http://{addr}/-/https://www.are.na/some-user/my-chan\"\n+        ))\n+        .send()\n+        .await\n+        .unwrap();\n+    assert_eq!(\n+        redirect_location(&resp),\n+        \"/-/https://www.are.na/channel/my-chan\"\n+    );\n+}\ndiff --git a/test/browser_arena_resolver.clj b/test/browser_arena_resolver.clj\nindex 3d049466309a3e19ef2545c15afdb542fcae0510..d4b1bd55da6bd46a48bac49497561cf1de6b4f74 100644\n--- a/test/browser_arena_resolver.clj\n+++ b/test/browser_arena_resolver.clj\n@@ -32,24 +32,6 @@\n             (do (Thread/sleep 200) (recur))\n             false))))))\n \n-(defn- click-resolve-children-expecting-url!\n-  \"Click the are.na children button and wait for a JS `window.location` redirect.\n-\n-  The /ui response is eval'd JS, not a document navigation, so Playwright can\n-  miss the URL change if wait-for-url starts after location is already set.\n-  Register the waiter first (same pattern as garden depth select).\"\n-  [pg url-needle]\n-  (let [waiter (future\n-                 (page/wait-for-url pg\n-                                    (re-pattern (str \".*\\\\Q\" url-needle \"\\\\E.*\"))\n-                                    {:timeout 15000}))]\n-    (Thread/sleep 100)\n-    (locator/click (page/locator pg \"[data-testid=\\\"arena-resolve-children\\\"]\"))\n-    (let [result @waiter]\n-      (if (core/anomaly? result)\n-        (wait-for-url-includes pg url-needle 5000)\n-        true))))\n-\n (defn- wait-for-http-text [url expected timeout-ms]\n   (let [deadline (+ (System/currentTimeMillis) timeout-ms)]\n     (loop []\n@@ -187,13 +169,10 @@\n                ;; isn't racing a stale redirect.\n                (page/navigate pg (str base-url \"/-/https://www.are.na/channel/my-chan\"))\n \n-               ;; Legacy /:user/:channel URLs resolve onto the canonical channel item.\n+               ;; Legacy /:user/:channel garden URLs 308 onto the canonical channel item.\n                (page/navigate pg (str base-url \"/-/https://www.are.na/some-user/my-chan\"))\n-               (is (wait-for-text pg \"#external-resolver-panel\" \"Are.na resolver\" 15000)\n-                   \"legacy channel URL shows are.na resolver panel\")\n-               (is (click-resolve-children-expecting-url!\n-                    pg \"/-/https://www.are.na/channel/my-chan\")\n-                   (str \"legacy resolve redirects to canonical channel, url=\" (page/url pg)))\n+               (is (wait-for-url-includes pg \"/-/https://www.are.na/channel/my-chan\" 15000)\n+                   (str \"legacy garden URL 308s to canonical channel, url=\" (page/url pg)))\n                (is (wait-for-text pg \"body\" \"-/https://www.are.na/block/1\" 15000)\n                    \"legacy URL import lands on canonical channel page with children\")))))\n \n\n\nSide B — contributor: tommy-mor\nSide B — commit message:\n[85186081] Fix sorter parse diagnostics for dotted tokens and URL-shaped lines (#193)\n\nDotted tilde tokens like ~mcdonalds.com used to fail with a vote-explanation\nmessage and no line number, so the later valid claim looked guilty. Report\nline 1 and the invalid character instead.\n\nURL-shaped prose (mcdonalds.com { body }) stays inert but now warns.\nhttps://… { body } remains a URL item; CheckOk.warnings notes when a doc\ndefined items but has no votes so the dry-run is no longer silent.\n\nCo-authored-by: Cursor Agent \n\nSide B — unified diff (full patch):\ndiff --git a/agents.md b/agents.md\nindex 9078b5aaace7eac7ed34ea2f0d86974e56b0fcb6..8f6f532f25dcb27c7c5c44ad54b771c9c45443b8 100644\n--- a/agents.md\n+++ b/agents.md\n@@ -38,6 +38,8 @@ Strict **CSP** that blocks `eval` would break the current app. Other projects ma\n \n - **`RpcCommand` / `POST /api/v0/rpc`** (`types/src/lib.rs`, `server/src/api/rpc.rs`): **Bearer-authenticated** JSON API for CLI, automation, and programmatic clients. Durable effects go through here (append to event log, then `apply_event`).\n \n+- **Check / `check_sorter` diagnostics:** Parse errors include a 1-based **`line N:`** prefix. A dotted tilde token (`~mcdonalds.com`) fails on that line (not a valid tilde item name; `.` is not allowed; charset is `[a-z0-9_-]`), not on a later valid claim. A URL-shaped line without `http(s)://` (`mcdonalds.com { body }`) stays **prose** and adds a warning. `https://… { body }` remains a URL item (not prose). **`CheckOk.warnings`** also notes when a document defined items but includes no votes (ranking preview empty).\n+\n - **ChatGPT / Codex MCP (`POST /mcp`)** (`server/src/mcp/`): Streamable-HTTP JSON-RPC for the Plugins Directory. Tools call `dispatch_rpc` (same handlers as `POST /api/v0/rpc`). Public reads are `noauth` (and also accept a bearer). Private-room reads and all writes require `Authorization: Bearer slug_…` (issued as the OAuth access token). `post_sorter` **requires** `delegate` (`uuid:rig:provider/model`); the writer binds that delegate to the linked human and rejects other humans. `create_room` only creates private rooms (`visibility` must be `\"private\"`) and can grant `members`. Read results for posts expose `actor` and `delegate`. Authenticated private-room reads are first-class MCP tools: `list_rooms`, `read_room`, and `get_feed` use `oauth2` + `slug.read`. `get_feed` accepts the same `delegate` as CLI `feed` (server-side cutoff = that delegate's last ingest). `get_matchup` is CLI `garden matchup`. `health` is `GET /healthz` (liveness). Garden `item_path` / `parent_path` queries accept a bare leaf (`ship-sets` = `~ship-sets`). Private `room_id` accepts `shortid/slug` or the bare 7-char shortid. `identity_start` / `identity_poll` mint a conversation delegate (linked callers get it immediately; unlinked callers get a Google URL). Dual-mode garden/forum reads list `slug.read` before `noauth` so linked clients send the bearer. OAuth 2.1 + PKCE lives at `/oauth/authorize` + `/oauth/token` and reuses Google login. Redirect allowlist is ChatGPT (`chatgpt.com` / `chat.openai.com`), Claude (`claude.ai`, including `https://claude.ai/api/mcp/auth_callback`), and loopback HTTP. Well-known docs are `/.well-known/oauth-protected-resource` and `/.well-known/oauth-authorization-server`. Domain verification token is `GET /.well-known/openai-apps-challenge` from `SLUG_OPENAI_APPS_CHALLENGE`. Do not add a parallel write path. Do not reuse `POST /ui` + `eval` morph as a ChatGPT widget. The website/RPC still allow human posts with no delegate; only the MCP tool requires it.\n \n - **Forum thread tags on write:** `validate_thread_tag` (`types/src/paths.rs`) canonicalizes then rejects empty tags and any tag containing `/` (would break `/t/:tag` routing). The new-thread form already constrains the charset client-side (`pattern=\"[a-z0-9_\\\\-]{1,64}\"`); server write paths (`WriteCmd::Post` / `SystemIngest`, and UI `PostIngest` / `CheckIngest` / `VoteComparePost`) enforce the slash rule. Read/replay still uses `canonicalize_tag` only so historical tags keep resolving. System import tags use `:` instead of `/` (e.g. `import:https:::github.com:org:repo`).\ndiff --git a/cli/src/main.rs b/cli/src/main.rs\nindex aa80ce3586b9f8f5102abfd5930ee39cd6e83bac..8d4f682f8553c04970dedb2a1a55653135006182 100644\n--- a/cli/src/main.rs\n+++ b/cli/src/main.rs\n@@ -1597,6 +1597,7 @@ async fn run_scoped(base: &str, room: &str, sub: ScopedCmd) -> Result<()> {\n                     rankings,\n                     threads,\n                     next,\n+                    warnings,\n                 } => {\n                     if json {\n                         println!(\n@@ -1606,10 +1607,17 @@ async fn run_scoped(base: &str, room: &str, sub: ScopedCmd) -> Result<()> {\n                                 \"rankings\": rankings,\n                                 \"threads\": threads,\n                                 \"next\": next,\n+                                \"warnings\": warnings,\n                             }))?\n                         );\n                     } else {\n                         println!(\"✓ check ok (dry-run)\");\n+                        if !warnings.is_empty() {\n+                            println!(\"warnings:\");\n+                            for w in warnings.iter() {\n+                                println!(\"  {w}\");\n+                            }\n+                        }\n                         if !threads.is_empty() {\n                             println!(\"threads:\");\n                             for t in threads {\ndiff --git a/server/src/api/rpc.rs b/server/src/api/rpc.rs\nindex adce34f4f9d7ff1ed3a773fa4cc4a925c1fe95f4..36b423117aa7e5c384c987d6da9f25d8dfa08945 100644\n--- a/server/src/api/rpc.rs\n+++ b/server/src/api/rpc.rs\n@@ -539,6 +539,7 @@ async fn rpc_check(\n         rankings,\n         threads: vec![format!(\"#{}\", thread_id)],\n         next: check_next,\n+        warnings: v.doc.check_warnings(),\n     })\n }\n \ndiff --git a/server/src/dsl.rs b/server/src/dsl.rs\nindex 4eb8da1f22a18f120eabe86aaf56352adeab5a21..8f6311564f5a061dc77371695a93ed3f51a1c9d3 100644\n--- a/server/src/dsl.rs\n+++ b/server/src/dsl.rs\n@@ -4,6 +4,8 @@ use std::collections::HashMap;\n #[derive(Debug, Clone, PartialEq, Eq)]\n pub struct Document {\n     pub statements: Vec,\n+    /// Non-fatal diagnostics (e.g. URL-shaped lines that were parsed as prose).\n+    pub warnings: Vec,\n }\n \n /// A single statement in the DSL (or prose when using `parse_full`).\n@@ -43,6 +45,34 @@ pub enum Stmt {\n     },\n }\n \n+impl Document {\n+    /// Extra dry-run notes: parse warnings plus a hint when items were defined\n+    /// but this document cannot fill the ranking preview (no votes).\n+    pub fn check_warnings(&self) -> Vec {\n+        let mut warnings = self.warnings.clone();\n+        let item_titles: Vec<&str> = self\n+            .statements\n+            .iter()\n+            .filter_map(|s| match s {\n+                Stmt::Item { title, .. } => Some(title.as_str()),\n+                _ => None,\n+            })\n+            .collect();\n+        let has_vote = self\n+            .statements\n+            .iter()\n+            .any(|s| matches!(s, Stmt::Vote { .. }));\n+        if !item_titles.is_empty() && !has_vote {\n+            warnings.push(format!(\n+                \"defined {} item(s) ({}); ranking preview is empty until this document includes a vote\",\n+                item_titles.len(),\n+                item_titles.join(\", \")\n+            ));\n+        }\n+        warnings\n+    }\n+}\n+\n #[derive(Debug, thiserror::Error)]\n pub enum DslError {\n     #[error(\"parse error: {0}\")]\n@@ -599,6 +629,37 @@ fn parse_item_name_at(s: &str, i: usize) -> Option<(String, usize)> {\n     parse_item_name_at_with_mode(s, i, false)\n }\n \n+/// `mcdonalds.com { body }` / `www.foo.com { x }` — looks like a definition but is prose.\n+fn looks_like_lone_definition(stripped: &str) -> bool {\n+    if stripped.is_empty()\n+        || stripped.starts_with('~')\n+        || stripped.starts_with(\"http://\")\n+        || stripped.starts_with(\"https://\")\n+        || stripped.starts_with(\"-/\")\n+        || stripped.starts_with('#')\n+        || stripped.starts_with(':')\n+    {\n+        return false;\n+    }\n+    let bytes = stripped.as_bytes();\n+    let mut i = 0usize;\n+    while i < bytes.len() && !is_ws_byte(bytes[i]) && !bytes[i..].starts_with(b\"__BLOCK_\") {\n+        i += 1;\n+    }\n+    if i == 0 {\n+        return false;\n+    }\n+    let name = &stripped[..i];\n+    if !name.contains('.') && !name.contains(\"://\") {\n+        return false;\n+    }\n+    i = skip_ws(stripped, i);\n+    let Some((_, end)) = parse_block_token_at(stripped, i) else {\n+        return false;\n+    };\n+    stripped[end..].trim().is_empty()\n+}\n+\n /// `~mcdonalds.com` lexes as `~mcdonalds` then leftover `.com`. Report the\n /// dotted spelling instead of a vote-explanation error that reads like a later\n /// valid claim failed.\n@@ -904,9 +965,13 @@ fn parse_item_definition_statement(\n         return Ok(stmts);\n     }\n \n-    Err(DslError::Parse(\n-        \"vote explanations must start with a `{ ... }` block before the comparison\".to_string(),\n-    ))\n+    if parse_comparison_at(stripped, i).is_some() {\n+        return Err(DslError::Parse(\n+            \"vote explanations must start with a `{ ... }` block before the comparison\".to_string(),\n+        ));\n+    }\n+\n+    Err(DslError::Parse(\"extra tokens after item definition\".to_string()))\n }\n \n fn parse_line(masked_line: &str, masker: &BlockMasker) -> Result, DslError> {\n@@ -975,6 +1040,7 @@ pub fn parse_full_strict(text: &str) -> Result {\n fn parse_full_with(text: &str, strict: bool) -> Result {\n     let (masker, masked) = mask_all(BlockMasker::new(), text);\n     let mut statements: Vec = Vec::new();\n+    let mut warnings: Vec = Vec::new();\n     let mut prose_buffer: Vec<&str> = Vec::new();\n     let mut pending_block: Option = None;\n     let mut current_aspect: Option = None;\n@@ -1083,6 +1149,11 @@ fn parse_full_with(text: &str, strict: bool) -> Result {\n                 Err(DslError::Parse(msg)) => return Err(at_line(line_no, msg)),\n             }\n         } else {\n+            if looks_like_lone_definition(stripped) {\n+                warnings.push(format!(\n+                    \"line {line_no} looks like an item definition but does not start with '~'; parsed as prose\"\n+                ));\n+            }\n             prose_buffer.push(line);\n         }\n     }\n@@ -1097,7 +1168,10 @@ fn parse_full_with(text: &str, strict: bool) -> Result {\n     // Final flush\n     flush_prose(&mut prose_buffer, &mut statements, &masker);\n \n-    Ok(Document { statements })\n+    Ok(Document {\n+        statements,\n+        warnings,\n+    })\n }\n \n #[cfg(test)]\n@@ -2080,6 +2154,105 @@ kfc is a chain\n         assert!(edges.is_empty());\n     }\n \n+    #[test]\n+    fn parse_dotted_tilde_token_errors_on_line_1_not_later_claim() {\n+        let input = \"\\\n+~mcdonalds.com { https://mcdonalds.com }\n+~fast-food-chains { the chains }\n+\n+{ if this resolves, the dot silently split the token }\n+~mcdonalds <: ~fast-food-chains\n+\";\n+        let err = parse_full(input).unwrap_err().to_string();\n+        assert!(\n+            err.contains(\"line 1:\"),\n+            \"error must name the dotted definition line, got: {err}\"\n+        );\n+        assert!(\n+            err.contains(\"~mcdonalds.com\")\n+                && err.contains(\"not a valid tilde item name\")\n+                && err.contains(\"`.`\"),\n+            \"error must name the dotted token, got: {err}\"\n+        );\n+        assert!(\n+            !err.contains(\"vote explanations must start\"),\n+            \"must not misreport the later containment claim, got: {err}\"\n+        );\n+    }\n+\n+    #[test]\n+    fn parse_undotted_repro_still_succeeds() {\n+        let input = \"\\\n+~mcdonalds { https://mcdonalds.com }\n+~fast-food-chains { the chains }\n+\n+{ identical claim, only the dotted line above was removed }\n+~mcdonalds <: ~fast-food-chains\n+\";\n+        let doc = parse_full(input).unwrap();\n+        assert!(doc.warnings.is_empty());\n+        assert_eq!(items(&doc).len(), 2);\n+        assert_eq!(containments(&doc).len(), 1);\n+    }\n+\n+    #[test]\n+    fn parse_url_shaped_prose_definition_warns() {\n+        let input = \"mcdonalds.com { fast food }\\n~fast-food { chains }\";\n+        let doc = parse_full(input).unwrap();\n+        assert_eq!(\n+            doc.warnings,\n+            vec![\n+                \"line 1 looks like an item definition but does not start with '~'; parsed as prose\"\n+                    .to_string()\n+            ]\n+        );\n+        assert!(\n+            items(&doc)\n+                .iter()\n+                .all(|s| matches!(s, Stmt::Item { title, .. } if title == \"~fast-food\")),\n+            \"dotted host line must stay prose, not become an item\"\n+        );\n+        assert!(matches!(\n+            doc.statements.first(),\n+            Some(Stmt::Prose { text }) if text.contains(\"mcdonalds.com\")\n+        ));\n+    }\n+\n+    #[test]\n+    fn parse_https_item_definition_still_creates_url_item() {\n+        let doc = parse_full(\"https://mcdonalds.com { fast food }\").unwrap();\n+        assert!(\n+            doc.warnings.is_empty(),\n+            \"valid URL items are not prose; got {:?}\",\n+            doc.warnings\n+        );\n+        assert_eq!(\n+            items(&doc),\n+            vec![&Stmt::Item {\n+                title: \"https://mcdonalds.com\".to_string(),\n+                body: Some(\"fast food\".to_string()),\n+            }]\n+        );\n+        let notes = doc.check_warnings();\n+        assert!(\n+            notes.iter().any(|w| w.contains(\"https://mcdonalds.com\")\n+                && w.contains(\"ranking preview is empty\")),\n+            \"item-only docs must not look like a silent no-op, got {notes:?}\"\n+        );\n+    }\n+\n+    #[test]\n+    fn parse_nested_path_with_dot_errors_on_that_line() {\n+        let err = parse_full(\"~a {a}\\n~/food/subway.com { sandwich }\\n\")\n+            .unwrap_err()\n+            .to_string();\n+        assert!(err.contains(\"line 2:\"), \"got: {err}\");\n+        assert!(\n+            err.contains(\"subway.com\") && err.contains(\"not a valid tilde item name\"),\n+            \"got: {err}\"\n+        );\n+    }\n+\n     #[test]\n     fn nested_path_sugar_is_not_an_explicit_claim() {\n         let doc =\ndiff --git a/server/src/html/editor.rs b/server/src/html/editor.rs\nindex 40bd231bc17fde96129489637f51828b613006eb..cf25ceb26e0a0d75fde4f3a24a5e79622eebfd3f 100644\n--- a/server/src/html/editor.rs\n+++ b/server/src/html/editor.rs\n@@ -107,6 +107,7 @@ pub async fn editor_check(\n                 &v.doc,\n             );\n \n+            let check_warnings = v.doc.check_warnings();\n             let status = html! {\n                 span class=\"editor-ok\" {\n                     \"valid\"\n@@ -115,6 +116,13 @@ pub async fn editor_check(\n \n             let results = html! {\n                 div id=\"editor-results\" {\n+                    @if !check_warnings.is_empty() {\n+                        ul class=\"editor-warnings\" {\n+                            @for w in &check_warnings {\n+                                li class=\"muted\" { (w) }\n+                            }\n+                        }\n+                    }\n                     @for scope in &rankings {\n                         @let heading = match &scope.aspect {\n                             Some(slug) => format!(\"ranking: {} :{}\", scope.parent, slug),\ndiff --git a/server/src/mcp/mod.rs b/server/src/mcp/mod.rs\nindex 520f4e759186819ff139e97c57b88cd01e08c151..e0f5d25a58f81aa40869c3384d8116c31b765dd8 100644\n--- a/server/src/mcp/mod.rs\n+++ b/server/src/mcp/mod.rs\n@@ -467,7 +467,7 @@ fn tools_list() -> Value {\n             tool(\n                 \"check_sorter\",\n                 \"Dry-run a .sorter document\",\n-                \"Parse and preview ranking and containment effects of a .sorter document without writing. Items are `~name` (or `~/path` sugar). Claims require a leading { explanation } then `~a <: ~b` / `~a !<: ~b` (explanation after the claim is a parse error, not a silent no-op). `==` is not a statement. Tilde names are [a-z0-9_-] (`~mcdonalds.com` is invalid).\",\n+                \"Parse and preview ranking and containment effects of a .sorter document without writing. Items are `~name` (or `~/path` sugar). Claims require a leading { explanation } then `~a <: ~b` / `~a !<: ~b` (explanation after the claim is a parse error, not a silent no-op). `==` is not a statement. Tilde names are [a-z0-9_-] (`~mcdonalds.com` is invalid). URL-shaped lines without `https://` stay prose and return a warning. Parse errors include `line N:`.\",\n                 json!({\n                     \"type\": \"object\",\n                     \"properties\": {\ndiff --git a/server/src/offline.rs b/server/src/offline.rs\nindex 420f088c99b04f23ef29b32ec9f24cef4824dcce..7a2c85d9a1ba8f54afc44d00de1be0fcd2840ddd 100644\n--- a/server/src/offline.rs\n+++ b/server/src/offline.rs\n@@ -28,6 +28,8 @@ pub struct CompileResult {\n     pub threads: Vec,\n     pub rankings: Vec,\n     pub stats: CompileStats,\n+    #[serde(default, skip_serializing_if = \"Vec::is_empty\")]\n+    pub warnings: Vec,\n     #[serde(skip_serializing_if = \"Option::is_none\")]\n     pub ingest_id: Option,\n     #[serde(skip_serializing_if = \"Option::is_none\")]\n@@ -255,6 +257,7 @@ fn compile_document_inner(\n         threads: threads_in_document(text),\n         rankings: rankings_for_document(&simulated, &scope, room_key, &validated.doc),\n         stats: document_stats(&validated.doc),\n+        warnings: validated.doc.check_warnings(),\n         ingest_id,\n         ingest_line,\n     })\n@@ -421,6 +424,42 @@ mod tests {\n         assert!(err.error.contains(\"undefined\"));\n     }\n \n+    #[test]\n+    fn compile_dotted_tilde_token_is_line_1_parse_error() {\n+        let err = compile_document(\n+            &ReducerState::default(),\n+            \"public\",\n+            \"~mcdonalds.com { https://mcdonalds.com }\\n~fast-food-chains { the chains }\\n\\n{ why }\\n~mcdonalds <: ~fast-food-chains\\n\",\n+        )\n+        .unwrap_err();\n+        let detail = err.parse_error.as_deref().unwrap_or(&err.error);\n+        assert!(detail.contains(\"line 1:\"), \"got {detail}\");\n+        assert!(\n+            detail.contains(\"~mcdonalds.com\") && detail.contains(\"not a valid tilde item name\"),\n+            \"got {detail}\"\n+        );\n+        assert!(!detail.contains(\"vote explanations must start\"), \"got {detail}\");\n+    }\n+\n+    #[test]\n+    fn compile_url_shaped_prose_definition_warns() {\n+        let result = compile_document(\n+            &ReducerState::default(),\n+            \"public\",\n+            \"mcdonalds.com { fast food }\\n~chains { the chains }\",\n+        )\n+        .unwrap();\n+        assert!(result.ok);\n+        assert!(\n+            result.warnings.iter().any(|w| w.contains(\"line 1\")\n+                && w.contains(\"does not start with '~'\")\n+                && w.contains(\"parsed as prose\")),\n+            \"got {:?}\",\n+            result.warnings\n+        );\n+        assert_eq!(result.stats.items, 1);\n+    }\n+\n     #[test]\n     fn compile_canonical_plus_two_aspects_emits_three_ranking_groups() {\n         let text = \"\\\ndiff --git a/types/src/lib.rs b/types/src/lib.rs\nindex 282669cac6d979bf68071c5b8a174dcda035cc16..d84a33538dfef2c748716566fd8ac110b5b5abbb 100644\n--- a/types/src/lib.rs\n+++ b/types/src/lib.rs\n@@ -546,6 +546,8 @@ pub enum RpcResult {\n         rankings: Vec,\n         threads: Vec,\n         next: Vec,\n+        #[serde(default, skip_serializing_if = \"Vec::is_empty\")]\n+        warnings: Vec,\n     },\n     GardenRank(RankResponse),\n     GardenItem(ItemResponse),\n","role":"user"}],"model":"~x-ai/grok-latest"}