Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/check-run.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(270px,.8fr);align-items:end;gap:35px;padding:clamp(48px,8vw,94px) 0 45px}.eyebrow{color:var(--gold);font:850 .72rem ui-monospace,monospace;letter-spacing:.16em}.hero h1{max-width:700px;margin:15px 0 20px;font-size:clamp(3rem,6vw,5.5rem);line-height:.99;letter-spacing:-.055em}.hero h1 em{font-style:normal;background:linear-gradient(90deg,var(--cyan),#b8a7ff,var(--gold));background-clip:text;color:transparent}.hero p{max-width:665px;margin:0;color:#d1e2e9;font-size:1.08rem}.hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:23px}.hero-actions button,.hero-actions a{display:inline-block;padding:11px 16px;border:1px solid var(--cyan);border-radius:9px;text-decoration:none;font-weight:850}.hero-actions button{background:var(--cyan);color:#06202b}.hero-actions button:disabled{opacity:.55;cursor:wait}.hero-actions a{background:#13404a}.manifest{padding:25px;border:1px solid #6a979d;border-radius:20px;background:radial-gradient(circle at 100% 0,#83edec1f,transparent 60%),#102b3a;box-shadow:0 25px 65px #0005}.manifest b{color:var(--cyan);font:.68rem ui-monospace,monospace;letter-spacing:.13em}.manifest ol{list-style:none;margin:17px 0 0;padding:0}.manifest li{display:flex;align-items:center;gap:12px;padding:13px 0;border-top:1px solid #ffffff23;font-weight:750}.manifest span{color:var(--gold);font:.7rem ui-monospace,monospace}.manifest small{display:block;margin-top:8px;color:var(--muted);font-size:.75rem}
.bench{border:1px solid #638692;border-radius:23px;overflow:hidden;background:#0c1e2e;box-shadow:0 30px 90px #0006}.bench-bar{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;padding:16px 22px;border-bottom:1px solid var(--line);color:var(--cyan);font:750 .7rem ui-monospace,monospace;letter-spacing:.12em}.bench-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.input-panel,.output-panel{min-width:0;padding:25px}.input-panel{border-right:1px solid var(--line)}h2{margin:0 0 6px;font-size:1.4rem}.bench p{color:var(--muted);font-size:.83rem}.file-picker{display:block;margin:21px 0 15px;padding:18px;border:1px dashed #81b6ba;border-radius:14px;background:#83edec0d;cursor:pointer}.file-picker strong{display:block;color:var(--cyan)}.file-picker small{color:var(--muted)}.file-picker input{display:block;max-width:100%;margin-top:12px;font-size:.8rem}.file-picker[data-drag=on]{background:#83edec2a;border-style:solid}.separator{display:flex;align-items:center;gap:12px;margin:13px 0;color:var(--gold);font:.69rem ui-monospace,monospace;letter-spacing:.1em}.separator:before,.separator:after{content:"";height:1px;flex:1;background:var(--line)}textarea{display:block;width:100%;min-height:225px;resize:vertical;padding:15px;border:1px solid var(--line);border-radius:12px;background:#04121e;color:#d6eeed;font:12px/1.55 ui-monospace,monospace}.actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:15px}.actions button{padding:11px 17px;border:1px solid var(--cyan);border-radius:9px;background:var(--cyan);color:#06202b;font-weight:900}.actions button:hover{filter:brightness(1.08)}.status{min-height:2em;margin:0;color:var(--muted);font-size:.78rem}.privacy{margin-top:17px!important;border-top:1px solid var(--line);padding-top:14px}
.output-panel{background:radial-gradient(circle at 100% 0,#83edec11,transparent 62%),#0c2432}.results[hidden],.empty[hidden],[hidden]{display:none!important}.empty{display:grid;place-items:center;min-height:345px;padding:25px;border:1px dashed #5a8190;border-radius:14px;text-align:center;color:var(--muted)}.empty b{display:block;margin:0 0 9px;color:var(--ink);font-size:1.13rem}.result-head{margin:19px 0;padding:19px;border:1px solid #7bbfa3;border-radius:15px;background:#a9f1c014}.result-head[data-state=fail]{border-color:#ce8498;background:#ffadc015}.result-head span{display:block;color:var(--gold);font:.65rem ui-monospace,monospace;letter-spacing:.12em}.result-head strong{display:block;margin:7px 0;font-size:1.45rem}.result-head p{margin:0}.checks{display:grid;gap:9px}.check{padding:14px;border:1px solid #719b9b;border-radius:11px;background:#0d3037}.check[data-state=fail]{border-color:#b7788a;background:#332331}.check strong{display:block;color:var(--green);font-size:.9rem}.check[data-state=fail] strong{color:var(--rose)}.check p{margin:5px 0 0}.hash{display:block;margin:15px 0;color:var(--cyan);font:.67rem/1.5 ui-monospace,monospace;overflow-wrap:anywhere}.gates{display:grid;gap:9px;margin-top:20px}.gates h3{margin:0;font-size:1rem}.gate{padding:12px 14px;border-left:3px solid var(--green);background:#a9f1c00c}.gate[data-state=fail]{border-left-color:var(--rose);background:#ffadc00b}.gate b{color:var(--ink)}.gate p{margin:3px 0 0}.limit{margin:30px 0 60px;padding:20px 22px;border:1px solid #6e8391;border-radius:14px;background:#102634;color:var(--muted);font-size:.83rem}.limit strong{color:var(--gold)}
.sample{margin:20px 0 7px;padding:20px;border:1px solid #719e9f;border-radius:16px;background:linear-gradient(120deg,#83edec16,#0c3140)}.sample span,.challenge span{color:var(--gold);font:850 .68rem ui-monospace,monospace;letter-spacing:.13em}.sample strong{display:block;margin:7px 0 3px;font-size:1.08rem}.sample p{margin:0 0 14px}.sample button,.challenge button{padding:10px 14px;border:1px solid var(--cyan);border-radius:9px;background:var(--cyan);color:#06202b;font-weight:900}.sample button:disabled,.challenge button:disabled{opacity:.55;cursor:wait}.challenge{margin-top:19px;padding:18px;border:1px solid #b89465;border-radius:14px;background:linear-gradient(120deg,#f5cc7e17,#172d39)}.challenge p{margin:8px 0 13px}.challenge button{background:transparent;color:var(--gold);border-color:var(--gold)}
.sample{margin:20px 0 7px;padding:20px;border:1px solid #719e9f;border-radius:16px;background:linear-gradient(120deg,#83edec16,#0c3140)}.sample span,.challenge span{color:var(--gold);font:850 .68rem ui-monospace,monospace;letter-spacing:.13em}.sample strong{display:block;margin:7px 0 3px;font-size:1.08rem}.sample p{margin:0 0 14px}.sample button,.challenge button{padding:10px 14px;border:1px solid var(--cyan);border-radius:9px;background:var(--cyan);color:#06202b;font-weight:900}.sample button:disabled,.challenge button:disabled{opacity:.55;cursor:wait}.challenge{margin:15px 0 18px;padding:20px;border:1px solid #b89465;border-radius:14px;background:linear-gradient(120deg,#f5cc7e17,#172d39);scroll-margin-top:20px}.challenge[data-stage=changed]{border-color:#cf8495;background:linear-gradient(120deg,#ffadc01c,#172d39)}.challenge:focus{outline:3px solid var(--gold);outline-offset:3px}.challenge h3{margin:7px 0 4px;font-size:1.18rem;line-height:1.2}.challenge p{margin:0 0 13px}.challenge button{background:var(--gold);color:#1c1a17;border-color:var(--gold)}.challenge[data-stage=changed] button{background:transparent;color:var(--gold)}
@media(max-width:850px){.hero,.bench-grid{grid-template-columns:1fr}.manifest{max-width:700px}.input-panel{border-right:0;border-bottom:1px solid var(--line)}}@media(max-width:520px){.input-panel,.output-panel{padding:18px}.hero h1{font-size:clamp(2.8rem,12vw,4rem)}}
</style>
</head>
Expand All @@ -24,9 +24,9 @@
<header class="hero"><div><span class="eyebrow">LOCAL JSON / CURRENT ENGINE / NO UPLOAD</span><h1>Recheck the record.<br><em>Keep the doubt.</em></h1><p>Load a JSON run saved by the ĀML playground. This page recalculates the source fingerprint, recompiles that source, and compares the saved gate claims with the current project rule.</p><div class="hero-actions"><button id="load-example-hero" type="button">Try a captured run ↓</button><a href="playground.html?example=compare#live-stage">Create your own run ↗</a></div></div><aside class="manifest"><b>WHAT THIS CHECKS</b><ol><li><span>01 /</span> Exact source SHA-256</li><li><span>02 /</span> Current compiler replay</li><li><span>03 /</span> Saved gate claims</li></ol><small>The JSON is processed in this browser. A consistent result is still an unsigned self-check.</small></aside></header>
<section class="bench" id="checker" aria-label="Local run checker"><div class="bench-bar"><span>ĀML / INSPECT THE SAVED RUN</span><span>PROCESSED IN YOUR BROWSER</span></div><div class="bench-grid">
<div class="input-panel"><h2>Bring a local record.</h2><p>Export <b>Download local run JSON</b> from the playground, then choose that file or paste its contents.</p><div class="sample"><span>NO FILE YET? / START HERE</span><strong>Watch a real project run get checked.</strong><p>Captured from the live two-gate playground: one withheld, one visible. It is a project-authored, unsigned example.</p><button id="load-example" type="button">Load the example run ↗</button></div><label class="file-picker" id="file-picker"><strong>Choose or drop a JSON file ↓</strong><small>Up to 1 MB · the file stays on your device</small><input id="record-file" type="file" accept=".json,application/json"></label><div class="separator">OR PASTE JSON</div><label for="record-input" class="eyebrow">EXACT SAVED RECORD</label><textarea id="record-input" spellcheck="false" placeholder="{ &quot;format&quot;: &quot;aml-playground-local-run/v1&quot;, … }" aria-describedby="input-status"></textarea><div class="actions"><button id="check" type="button">Recheck this run ↗</button><p id="input-status" class="status" role="status" aria-live="polite">Load the example or bring your own local record.</p></div><p class="privacy">The source may contain sensitive text. Review it before sharing the JSON, report, or a replay link.</p></div>
<div class="output-panel"><h2>The result, with limits.</h2><p>Each step can fail independently. A passed check says the saved claims agree internally under this version of the project compiler.</p><div id="empty" class="empty"><div><b>Ready to inspect.</b><span>Load the example run to see a PASS, then change one saved claim.</span></div></div><div id="results" class="results" hidden><div id="result-head" class="result-head" role="status" aria-live="polite"><span>LOCAL RECHECK</span><strong id="result-title"></strong><p id="result-detail"></p></div><div id="checks" class="checks"></div><code id="result-hash" class="hash"></code><div id="gates" class="gates"></div><div id="sample-challenge" class="challenge" hidden><span>TRY TO BREAK THE RECORD</span><p id="challenge-copy">Flip the saved browser outcome for the withheld gate. The source fingerprint will still match, but the gate claim should fail.</p><button id="challenge-button" type="button">Change one saved claim ↗</button></div></div></div>
<div class="output-panel"><h2>The result, with limits.</h2><p>Each step can fail independently. A passed check says the saved claims agree internally under this version of the project compiler.</p><div id="empty" class="empty"><div><b>Ready to inspect.</b><span>Load the example run to see a PASS, then change one saved claim.</span></div></div><div id="results" class="results" hidden><div id="result-head" class="result-head" role="status" aria-live="polite"><span>LOCAL RECHECK</span><strong id="result-title"></strong><p id="result-detail"></p></div><div id="sample-challenge" class="challenge" tabindex="-1" hidden><span id="challenge-stage">01 / CAPTURED RECORD</span><h3 id="challenge-title">Now challenge the claim.</h3><p id="challenge-copy">Flip the saved browser outcome for the withheld gate. The source fingerprint will still match, but the gate claim should fail.</p><button id="challenge-button" type="button">Change one saved claim ↗</button></div><div id="checks" class="checks"></div><code id="result-hash" class="hash"></code><div id="gates" class="gates"></div></div></div>
</div></section>
<p class="limit"><strong>Boundary of this result.</strong> This page cannot authenticate who made the file, prove that a historical browser event happened, measure attention or restoration, or establish production behavior. A coherent file can be fabricated. Source replay uses the current project compiler and may change as the prototype evolves.</p>
</main>
</div><script type="module" src="./check-run.js?v=example-run-1"></script></body>
</div><script type="module" src="./check-run.js?v=challenge-flow-2"></script></body>
</html>
21 changes: 15 additions & 6 deletions docs/check-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ function render(result) {
row.append(textNode("b", `${item.pass ? "MATCH" : "MISMATCH"} · ${item.identifier} · ${item.recorded}`), textNode("p", item.detail));
gates.append(row);
}
$("sample-challenge").hidden = !originalExample || (!result.consistent && !exampleChanged);
const challenge = $("sample-challenge");
challenge.hidden = !originalExample || (!result.consistent && !exampleChanged);
challenge.dataset.stage = exampleChanged ? "changed" : "captured";
$("challenge-stage").textContent = exampleChanged ? "02 / CHANGED SAVED CLAIM" : "01 / CAPTURED RECORD";
$("challenge-title").textContent = exampleChanged ? "The source stayed. The claim broke." : "Now challenge the claim.";
$("challenge-button").textContent = exampleChanged ? "Restore the captured example ↺" : "Change one saved claim ↗";
$("challenge-copy").textContent = exampleChanged ?
"The source still matches. Restoring the captured gate claim should bring this self-check back to PASS." :
"Flip the saved browser outcome for the withheld gate. The source fingerprint will still match, but the gate claim should fail.";
"SHA-256 and compiler replay still pass. One saved gate outcome now disagrees. Restore the captured claim to check it again." :
"Flip the withheld gate’s saved browser outcome. The source fingerprint will still match while the gate claim fails.";
}

async function loadFile(file) {
Expand Down Expand Up @@ -113,7 +117,7 @@ async function recheck() {
}

$("check").addEventListener("click", recheck);
async function loadExample(jumpToChecker = false) {
async function loadExample(focusChallenge = false) {
const before = input.value;
$("load-example").disabled = true;
$("load-example-hero").disabled = true;
Expand All @@ -131,16 +135,20 @@ async function loadExample(jumpToChecker = false) {
originalExample = formatted;
clearResult();
await recheck();
if (jumpToChecker) $("checker").scrollIntoView();
if (focusChallenge) {
$("sample-challenge").scrollIntoView({ block: "center" });
$("sample-challenge").focus({ preventScroll: true });
}
} catch {
if (input.value === before) status.textContent = "The example record could not be loaded here. Create a run in the playground instead.";
} finally {
$("load-example").disabled = false;
$("load-example-hero").disabled = false;
}
}
$("load-example").addEventListener("click", () => loadExample());
$("load-example").addEventListener("click", () => loadExample(true));
$("load-example-hero").addEventListener("click", () => loadExample(true));
if (new URLSearchParams(window.location.search).get("example") === "challenge") loadExample(true);

$("challenge-button").addEventListener("click", async () => {
if (!originalExample) return;
Expand All @@ -149,4 +157,5 @@ $("challenge-button").addEventListener("click", async () => {
if (exampleChanged) record.gates[0].browser.effective_rendered = !record.gates[0].browser.effective_rendered;
input.value = JSON.stringify(record, null, 2);
await recheck();
$("sample-challenge").scrollIntoView({ block: "center" });
});
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<div class="eyebrow">ĀRU MEANING LANGUAGE™ · RESEARCH PROTOTYPE</div>
<h1>AI proposes.<br><span class="gradient">The host decides.</span></h1>
<p class="lede">An agent asks to use a tool. An app asks to show an interface. ĀML makes the host's policy decision and its evidence inspectable at both boundaries. Change one input below and follow the exact path.</p>
<div class="hero-actions"><a class="button" href="first-run.html">Begin the first decision ↗</a><a class="ghost" href="playground.html?example=compare#live-stage">Watch two live gates ↗</a><a class="ghost" href="check-run.html">Break a saved run ↗</a></div>
<div class="hero-actions"><a class="button" href="first-run.html">Begin the first decision ↗</a><a class="ghost" href="playground.html?example=compare#live-stage">Watch two live gates ↗</a><a class="ghost" href="check-run.html?example=challenge">Break a saved run ↗</a></div>
<div class="equation" id="hero-equation">proposal → exact rule → host decision → receipt</div>
<p class="hero-note" id="hero-note">Connecting to the project preview. No tool runs, no message is sent, and no person is asked to approve.</p>
</div>
Expand Down Expand Up @@ -82,11 +82,11 @@ <h1>AI proposes.<br><span class="gradient">The host decides.</span></h1>
<a class="path" href="agent-start.html"><span>03 / AGENT TOOL</span><b>Guard one function tool ↗</b><small>Run a safe callback rehearsal, then wire policy and approval in your host.</small></a>
<a class="path" href="https://github.com/aruintelligence/aml-core/blob/main/docs/CONSUMER_QUICKSTART.md"><span>04 / INTEGRATE</span><b>Start from a clean package ↗</b><small>Use the consumer rehearsal and inspect the release boundary.</small></a>
<a class="path" href="playground.html"><span>05 / WRITE ĀML</span><b>One line, new decision ↗</b><small>Edit a program, watch its live browser gate, and share your source.</small></a>
<a class="path" href="check-run.html"><span>06 / CHALLENGE</span><b>Break a saved run ↗</b><small>Load a captured example, change one saved outcome, and watch the claim fail.</small></a>
<a class="path" href="check-run.html?example=challenge"><span>06 / CHALLENGE</span><b>Break a saved run ↗</b><small>Open a checked example, change one saved outcome, and watch the claim fail.</small></a>
</section>

<section class="challenge-feature" aria-labelledby="challenge-title">
<div><span class="challenge-kicker">THE RECORD CAN DISAGREE</span><h2 id="challenge-title">Make a record <em>contradict itself.</em></h2><p>Start with a captured two-gate run. Change one saved browser outcome, then recheck it. The source fingerprint still passes while the gate claim fails. Restore the record to see the difference.</p><a class="challenge-link" href="check-run.html">Try the captured run ↗</a><small class="challenge-limit">A project-authored, unsigned consistency check. It cannot prove that a historical event occurred.</small></div>
<div><span class="challenge-kicker">THE RECORD CAN DISAGREE</span><h2 id="challenge-title">Make a record <em>contradict itself.</em></h2><p>Open a checked two-gate run. Flip one saved browser outcome and watch the claim fail while the source fingerprint still passes. Restore the record to see the difference.</p><a class="challenge-link" href="check-run.html?example=challenge">Try the captured run ↗</a><small class="challenge-limit">A project-authored, unsigned consistency check. It cannot prove that a historical event occurred.</small></div>
<div class="challenge-ledger" aria-label="Example: one changed saved outcome leaves the source hash intact but makes a gate claim fail">
<div class="ledger-head"><span>CAPTURED TWO-GATE EXAMPLE</span><b>LOCAL RECHECK / 01</b></div>
<div class="ledger-step"><span>ORIGINAL RECORD</span><strong>CONSISTENT</strong><small>SHA-256 ✓ &nbsp; compiler ✓ &nbsp; gate claims ✓</small></div>
Expand Down
Loading
Loading