Spaces:
Running
Running
Download index.html from grainulation/sandbox: direct link, hf CLI and curl.
- Browser
- Download file 16.8 kB
-
https://huggingface.co/spaces/grainulation/sandbox/resolve/main/index.html
- Command line
-
hf download hf://spaces/grainulation/sandbox/index.html
-
curl -L -o index.html https://huggingface.co/spaces/grainulation/sandbox/resolve/main/index.html
16.8 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Grainulation Sandbox — Grainulator, Irrigator & OVERTURN</title> | |
| <link rel="icon" href="data:,"> | |
| <style> | |
| :root { | |
| color-scheme: dark; | |
| --page: #181618; | |
| --surface: #242126; | |
| --code: #121013; | |
| --text: #e2e8f0; | |
| --muted: #a5b7bd; | |
| --accent: #8df6ff; | |
| --gold: #fcc830; | |
| --ok: #6ee7b7; | |
| --bad: #fca5a5; | |
| --line: rgba(141, 246, 255, 0.2); | |
| --line-soft: rgba(226, 232, 240, 0.12); | |
| --mono: "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, monospace; | |
| --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; | |
| } | |
| * { box-sizing: border-box; } | |
| body { | |
| margin: 0; | |
| background: var(--page); | |
| color: var(--text); | |
| font-family: var(--mono); | |
| font-size: 0.875rem; | |
| line-height: 1.65; | |
| -webkit-font-smoothing: antialiased; | |
| } | |
| a { color: inherit; text-decoration: none; text-underline-offset: 0.3em; } | |
| a:hover { color: var(--accent); text-decoration: underline; } | |
| a:focus-visible, button:focus-visible, select:focus-visible { | |
| outline: 2px solid var(--accent); | |
| outline-offset: 3px; | |
| } | |
| button, select { font: inherit; color: inherit; } | |
| .shell { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem 4rem; } | |
| .site-header { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| gap: 1rem 2rem; | |
| flex-wrap: wrap; | |
| padding: 1.25rem 0; | |
| border-bottom: 1px solid var(--line); | |
| } | |
| .brand { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.04em; min-height: 44px; display: inline-flex; align-items: center; } | |
| .header-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; } | |
| .header-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 0.78rem; color: var(--muted); } | |
| .header-nav a:hover { color: var(--accent); } | |
| .intro { | |
| display: grid; | |
| grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); | |
| gap: 1.5rem 2.25rem; | |
| align-items: center; | |
| padding: 2rem 0 1.75rem; | |
| border-bottom: 1px solid var(--line); | |
| } | |
| .intro-copy { min-width: 0; } | |
| .eyebrow { | |
| margin: 0 0 0.6rem; | |
| font-size: 0.68rem; | |
| text-transform: uppercase; | |
| letter-spacing: 0.09em; | |
| color: var(--accent); | |
| } | |
| .intro h1 { | |
| margin: 0 0 0.75rem; | |
| font-size: clamp(1.45rem, 2.8vw, 2.05rem); | |
| font-weight: 400; | |
| letter-spacing: -0.04em; | |
| line-height: 1.18; | |
| } | |
| .intro p { | |
| margin: 0; | |
| max-width: 58ch; | |
| color: var(--muted); | |
| font-family: var(--sans); | |
| font-size: 0.92rem; | |
| } | |
| .hero-visual { | |
| display: block; | |
| width: 100%; | |
| height: auto; | |
| border: 1px solid var(--line-soft); | |
| border-radius: 4px; | |
| } | |
| .tabs { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 1.5rem; | |
| border-bottom: 1px solid var(--line); | |
| } | |
| .tab-btn { | |
| background: transparent; | |
| border: none; | |
| border-bottom: 2px solid transparent; | |
| color: var(--muted); | |
| min-height: 48px; | |
| padding: 0.75rem 0; | |
| cursor: pointer; | |
| font-size: 0.85rem; | |
| margin-bottom: -1px; | |
| } | |
| .tab-btn:hover { color: var(--text); } | |
| .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); } | |
| .panel { display: none; } | |
| .panel.active { display: block; } | |
| .section { | |
| padding: 2rem 0; | |
| border-bottom: 1px solid var(--line-soft); | |
| } | |
| .section:last-child { border-bottom: none; } | |
| .section-head { | |
| display: flex; | |
| flex-wrap: wrap; | |
| align-items: baseline; | |
| justify-content: space-between; | |
| gap: 0.75rem 1.5rem; | |
| margin-bottom: 1rem; | |
| } | |
| .section-head h2 { | |
| margin: 0; | |
| font-size: 1.05rem; | |
| font-weight: 500; | |
| letter-spacing: -0.02em; | |
| } | |
| .section-note { | |
| margin: 0 0 1rem; | |
| max-width: 72ch; | |
| color: var(--muted); | |
| font-family: var(--sans); | |
| font-size: 0.88rem; | |
| } | |
| .controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem; } | |
| select { | |
| width: 100%; | |
| max-width: 640px; | |
| min-height: 44px; | |
| background: var(--surface); | |
| border: 1px solid var(--line); | |
| border-radius: 4px; | |
| padding: 0.5rem 0.75rem; | |
| font-size: 0.82rem; | |
| } | |
| .seg-btn { | |
| background: var(--surface); | |
| border: 1px solid var(--line-soft); | |
| border-radius: 4px; | |
| min-height: 44px; | |
| padding: 0.45rem 0.9rem; | |
| font-size: 0.8rem; | |
| color: var(--muted); | |
| cursor: pointer; | |
| } | |
| .seg-btn:hover { color: var(--text); border-color: var(--line); } | |
| .seg-btn.active { color: var(--accent); border-color: var(--accent); } | |
| .specimen { | |
| background: var(--surface); | |
| border: 1px solid var(--line-soft); | |
| border-radius: 4px; | |
| padding: 1.25rem; | |
| } | |
| .meta-line { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 0.4rem 1.25rem; | |
| font-size: 0.78rem; | |
| color: var(--muted); | |
| margin-bottom: 0.85rem; | |
| } | |
| .meta-line strong { color: var(--text); font-weight: 500; } | |
| .question { | |
| margin: 0 0 0.75rem; | |
| font-family: var(--sans); | |
| font-size: 0.98rem; | |
| color: var(--text); | |
| } | |
| .licenses { | |
| margin: 0 0 1.25rem; | |
| font-size: 0.76rem; | |
| color: var(--gold); | |
| } | |
| .two-col { | |
| display: grid; | |
| grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); | |
| gap: 1.5rem; | |
| } | |
| .two-col > div { min-width: 0; overflow-x: auto; } | |
| .meta-line span { overflow-wrap: anywhere; } | |
| h3 { | |
| margin: 0 0 0.5rem; | |
| font-size: 0.74rem; | |
| text-transform: uppercase; | |
| letter-spacing: 0.08em; | |
| color: var(--muted); | |
| font-weight: 500; | |
| } | |
| table { width: 100%; border-collapse: collapse; font-size: 0.8rem; } | |
| th, td { | |
| padding: 0.45rem 0.5rem 0.45rem 0; | |
| border-bottom: 1px solid var(--line-soft); | |
| text-align: left; | |
| vertical-align: top; | |
| } | |
| th { color: var(--muted); font-weight: 500; } | |
| .status-ok { color: var(--ok); } | |
| .status-bad { color: var(--bad); } | |
| .status-na { color: var(--muted); } | |
| pre { | |
| margin: 0; | |
| background: var(--code); | |
| border: 1px solid var(--line-soft); | |
| border-radius: 4px; | |
| padding: 1rem; | |
| overflow-x: auto; | |
| font-size: 0.78rem; | |
| line-height: 1.55; | |
| white-space: pre-wrap; | |
| max-height: 360px; | |
| } | |
| @media (max-width: 760px) { | |
| .shell { padding: 0 1rem 3rem; } | |
| .intro { grid-template-columns: minmax(0, 1fr); } | |
| .tabs { gap: 1rem; } | |
| .tab-btn { font-size: 0.78rem; } | |
| .two-col { grid-template-columns: minmax(0, 1fr); } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="shell"> | |
| <header class="site-header"> | |
| <span class="brand">grainulation / sandbox</span> | |
| <nav class="header-nav" aria-label="Primary links"> | |
| <a href="https://grainulator.dev/" target="_blank" rel="noopener">Grainulator ↗</a> | |
| <a href="https://github.com/grainulation/irrigator" target="_blank" rel="noopener">Irrigator ↗</a> | |
| <a href="https://blog.grainulation.org/verify-then-vote/" target="_blank" rel="noopener">Verify, Then Vote ↗</a> | |
| <a href="https://huggingface.co/datasets/grainulation/overturn-benchmark" target="_blank" rel="noopener">OVERTURN dataset ↗</a> | |
| </nav> | |
| </header> | |
| <section class="intro"> | |
| <div class="intro-copy"> | |
| <p class="eyebrow">Static offline specimen</p> | |
| <h1>Evidence ledgers, bounded DAGs, and sealed benchmark replay.</h1> | |
| <p> | |
| Zero-credential static view of sealed conflict samples from <code>grainulation/overturn-benchmark</code> | |
| alongside recorded transcripts from <code>grainulator</code> (offline protocol fixtures) and <code>irrigator</code> | |
| (<code>--backend mock</code>). No live inference runs here. | |
| </p> | |
| </div> | |
| <img class="hero-visual" src="./assets/sandbox-banner.jpg" alt="Grainulator and Irrigator mascots connected across evidence ledger lines and parallel DAG tracks"> | |
| </section> | |
| <div class="tabs" role="tablist" aria-label="Sandbox views"> | |
| <button class="tab-btn active" role="tab" aria-selected="true" data-tab="tab-grainulator">Grainulator & OVERTURN</button> | |
| <button class="tab-btn" role="tab" aria-selected="false" data-tab="tab-irrigator">Irrigator DAG & Recovery</button> | |
| </div> | |
| <section id="tab-grainulator" class="panel active" role="tabpanel"> | |
| <div class="section"> | |
| <div class="section-head"> | |
| <h2>Sealed OVERTURN decisive conflicts</h2> | |
| </div> | |
| <p class="section-note"> | |
| Eight primary (<code>P</code>) confirmatory items from Pool 1 (<code>v5</code>) and Pool 2 (<code>v6</code>), showing plurality vote against passage-checked arbitration (<code>BE-G</code>, <code>BE-G/VDF</code>) and the Sonnet judge reference (<code>J</code>). | |
| </p> | |
| <div class="controls"> | |
| <label for="overturn-select" style="position:absolute;left:-9999px;">Select benchmark item</label> | |
| <select id="overturn-select"></select> | |
| </div> | |
| <div class="specimen" id="overturn-detail">Loading sealed samples…</div> | |
| </div> | |
| <div class="section"> | |
| <div class="section-head"> | |
| <h2>Claim compiler and conflict surfacing</h2> | |
| </div> | |
| <p class="section-note"> | |
| Recorded output of <code>grainulator init</code>, <code>add</code>, and <code>compile</code> with a clean ledger vs. an explicit <code>--conflicts-with c002</code> claim. | |
| </p> | |
| <div class="controls"> | |
| <button class="seg-btn active" id="btn-compile-conflict" aria-pressed="true">With conflict (c003 → c002)</button> | |
| <button class="seg-btn" id="btn-compile-clean" aria-pressed="false">Clean ledger</button> | |
| </div> | |
| <pre id="out-grainulator-compile">Loading…</pre> | |
| </div> | |
| <div class="section"> | |
| <div class="section-head"> | |
| <h2>Offline verifier protocol fixture</h2> | |
| </div> | |
| <p class="section-note"> | |
| Verbatim output of <code>grainulator demo</code> (synthetic offline fixture; does not measure model quality). | |
| </p> | |
| <pre id="out-grainulator-demo">Loading…</pre> | |
| </div> | |
| </section> | |
| <section id="tab-irrigator" class="panel" role="tabpanel"> | |
| <div class="section"> | |
| <div class="section-head"> | |
| <h2>Mock swarm scheduling and child graphs</h2> | |
| </div> | |
| <p class="section-note"> | |
| Verbatim output of <code>irrigator demo</code>: real graph scheduling and recursive child tasks under mock workers ($0 API spend). | |
| </p> | |
| <pre id="out-irrigator-demo">Loading…</pre> | |
| </div> | |
| <div class="section"> | |
| <div class="section-head"> | |
| <h2>Init → Plan → Apply (mock) → Status</h2> | |
| </div> | |
| <p class="section-note"> | |
| Generated <code>swarm/v1</code> plan, state transitions, and the recovery boundary: in real coding cells (<code>irrigator code --verify</code>), exit 77 or timeout leaves status uncertain instead of silently replaying side effects. | |
| </p> | |
| <pre id="out-irrigator-plan">Loading…</pre> | |
| </div> | |
| </section> | |
| </div> | |
| <script> | |
| for (const btn of document.querySelectorAll('.tab-btn')) { | |
| btn.addEventListener('click', () => { | |
| document.querySelectorAll('.tab-btn').forEach(b => { | |
| b.classList.remove('active'); | |
| b.setAttribute('aria-selected', 'false'); | |
| }); | |
| document.querySelectorAll('.panel').forEach(p => p.classList.remove('active')); | |
| btn.classList.add('active'); | |
| btn.setAttribute('aria-selected', 'true'); | |
| document.getElementById(btn.dataset.tab).classList.add('active'); | |
| }); | |
| } | |
| function esc(s) { | |
| return String(s ?? '').replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); | |
| } | |
| let OVERTURN_SAMPLES = []; | |
| function renderSample(idx) { | |
| const s = OVERTURN_SAMPLES[idx]; | |
| if (!s) return; | |
| const methodRows = Object.entries(s.methods).map(([k, v]) => { | |
| const cls = v.correct === true ? 'status-ok' : (v.correct === false ? 'status-bad' : 'status-na'); | |
| const label = v.correct === true ? 'correct' : (v.correct === false ? 'wrong' : 'n/a'); | |
| return `<tr><td><code>${esc(k)}</code></td><td>${esc(v.selected)}</td><td class="${cls}">${label}</td></tr>`; | |
| }).join(''); | |
| const agentRows = s.agents.map(a => | |
| `<tr><td><code>${esc(a.model_tag)}</code> (${esc(a.quantization)})</td><td>${esc(a.answer)}</td><td>${esc(a.confidence)}</td><td>${esc((a.citations || []).join(', ') || '—')}</td></tr>` | |
| ).join(''); | |
| const goldDisplay = (s.gold && typeof s.gold === 'object' && 'answer' in s.gold) | |
| ? String(s.gold.answer) | |
| : (Array.isArray(s.gold) ? s.gold.join(', ') : String(s.gold ?? '—')); | |
| document.getElementById('overturn-detail').innerHTML = ` | |
| <div class="meta-line"> | |
| <span>pool <strong>${esc(s.pool_id)}</strong></span> | |
| <span>item <strong>${esc(s.item_id)}</strong></span> | |
| <span>source <strong>${esc(s.source_dataset)}</strong> (${esc(s.analysis_set)})</span> | |
| <span>gold <strong>${esc(goldDisplay)}</strong></span> | |
| </div> | |
| <p class="question">${esc(s.question)}</p> | |
| <p class="licenses">Component licenses: ${s.license_ids.map(esc).join(' · ')}</p> | |
| <div class="two-col"> | |
| <div><h3>Decisions</h3><table><tr><th>Method</th><th>Selected</th><th>Outcome</th></tr>${methodRows}</table></div> | |
| <div><h3>Agent answers</h3><table><tr><th>Model</th><th>Answer</th><th>Conf.</th><th>Citations</th></tr>${agentRows}</table></div> | |
| </div>`; | |
| } | |
| fetch('./sample_overturn.json').then(r => r.json()).then(data => { | |
| OVERTURN_SAMPLES = data.samples || []; | |
| const sel = document.getElementById('overturn-select'); | |
| sel.innerHTML = OVERTURN_SAMPLES.map((s, i) => | |
| `<option value="${i}">${esc(s.pool_id)} · ${esc(s.item_id)} (${esc(s.source_dataset)}) — MAJ: ${s.methods.MAJ?.correct ? 'correct' : 'wrong'}</option>` | |
| ).join(''); | |
| sel.addEventListener('change', () => renderSample(Number(sel.value))); | |
| renderSample(0); | |
| }).catch(err => { | |
| document.getElementById('overturn-detail').textContent = 'Failed to load samples: ' + err.message; | |
| }); | |
| let RECORDED = null; | |
| function showCompile(withConflict) { | |
| if (!RECORDED) return; | |
| const b1 = document.getElementById('btn-compile-conflict'); | |
| const b2 = document.getElementById('btn-compile-clean'); | |
| b1.classList.toggle('active', withConflict); | |
| b1.setAttribute('aria-pressed', String(withConflict)); | |
| b2.classList.toggle('active', !withConflict); | |
| b2.setAttribute('aria-pressed', String(!withConflict)); | |
| const d = withConflict ? RECORDED.grainulator_compile_with_conflict : RECORDED.grainulator_compile_clean; | |
| document.getElementById('out-grainulator-compile').textContent = | |
| `exit=${d.returncode} · claims=${d.claims_count} · inject_conflict=${d.inject_conflict}\n\n` + | |
| `${d.compile_stdout || d.compile_stderr}\n\nclaims.json:\n` + | |
| JSON.stringify(d.claims_preview, null, 2); | |
| } | |
| fetch('./recorded_runs.json').then(r => r.json()).then(rec => { | |
| RECORDED = rec; | |
| document.getElementById('out-grainulator-demo').textContent = | |
| `exit=${rec.grainulator_demo.returncode}\n${rec.grainulator_demo.stdout}`; | |
| showCompile(true); | |
| document.getElementById('btn-compile-conflict').addEventListener('click', () => showCompile(true)); | |
| document.getElementById('btn-compile-clean').addEventListener('click', () => showCompile(false)); | |
| document.getElementById('out-irrigator-demo').textContent = | |
| `exit=${rec.irrigator_demo.returncode}\n${rec.irrigator_demo.stdout}`; | |
| const p = rec.irrigator_mock_plan; | |
| document.getElementById('out-irrigator-plan').textContent = | |
| (p.simulate_uncertain_note ? `Note: ${p.simulate_uncertain_note}\n\n` : '') + | |
| `--- irrigator plan ---\n${p.plan.stdout}\n--- irrigator apply --backend mock ---\n${p.apply.stdout}\n--- irrigator status ---\n${p.status.stdout}\n--- generated swarm/v1 plan.json ---\n` + | |
| JSON.stringify(p.plan_json, null, 2); | |
| }).catch(err => { | |
| document.getElementById('out-grainulator-demo').textContent = 'Failed to load recorded runs: ' + err.message; | |
| }); | |
| </script> | |
| </body> | |
| </html> | |