wai-quantum 0.6.15 and wai-quantum-cli 0.1.3: generators, the workbench, and a program's history, attributed #478
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/quantum-0.6.15-history"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The release of #466, #468 and #469 to the package registry, as wai-quantum 0.6.15 and wai-quantum-cli 0.1.3, together with the co-design report's feature 6: a program's attributed, branchable history, sealed into receipts.
Stacked on #469, which carries #468. The diff shows all three until #469 lands. Two commits:
wai-quantum: a program's history, attributed, and the Studio's Versions: the feature, below.wai-quantum 0.6.15 and wai-quantum-cli 0.1.3: the release.The release
engine::discover,equiv::same_state);engine::energy;job::lint_withandcritique::critique_with;engine::versions.--inputon every command, andinstance;discover …andhistory …;--historyonrun,submitandverify;cargo metadata --lockedreads each of the twelve workspaces with no change, andcargo publish --dry-run --lockedpackages and compiles wai-quantum 0.6.15.How #468 lands
#468 is carried here and by #469.
jouleclaw-energy'sprocess_gputest. #468 touches nojouleclawfile.#469 also needed one fix,
cbb56effc.wai-web-wasm.ymlpins the count of wai-web's nativequantum_engine::tests, and #469's workbench test made it 7. This branch's history test makes it 8.The history
Feature 6 of the co-design report: attributed, branchable history sealed into receipts. Every version of a program records who made each change and how, and whose hand each line and gate is in. A run's receipt binds that count, and anyone holding the history recomputes it.
The engine:
engine::versionsA chain of versions:
Each digest covers the parents' digests, and the recording host's key seals it.
History::verifychecks every digest and seal, and that each review gives its version's source.Change by change (
changes,apply,History::propose):Whose hand (
blame,authorship,gate_hands):assistant_then_person,agent_then_person);On the receipt:
attestgives the head's digest and the gates and lines in each hand, and a job's request carries it ashistory. The receipt binds it, so a changed count fails the signature.check_jobrecomputes the account, and checks that the job ran that version's program (a generator's instance at the inputs named).versions::call: the same operations by name with JSON arguments, for the page and the desktop app.The command line and MCP
wai-quantum history start | commit | changes | propose | merge | log | blame | verify, with the history beside the program (prog.history.json). Alsorun --history,submit --historyandverify --history.history_commit,history_changes,history_blameandhistory_log. An agent's edit is always recorded as an outside agent's, under the name its client gave ininitialize. The test has an agent call itself "person", and the server records it asagent(test-agent).The Studio: Versions
program.qasmandprogram.history.jsonforwai-quantum history verify.window.quantumStudio.propose(qasm, by, note)lets an embedding page offer a program as someone's proposal.Checked on the build host
wai-quantum (
--features full,engine::): 82 tests pass, 11 of them the new module's. Clippy reports nothing inversions.rs.wai-quantum-cli: every test passes, including the agent-label test.
clippy --all-targets -D warningsis clean.The built binary, end to end:
logandblame(2 gates from the start, 1 from the assistant);run --history, after whichverify --historyandhistory verify --jobpass;wai-web (
quantum_engine::): 8 of 8 tests pass, and clippy reports nothing in the binding.The desktop app: 5 of 5 tests pass, and clippy is clean.
The Studio in Chrome (
STUDIO_SKIP_SERVICE=1 node test/studio.test.mjs): every check passes, 75 in all. The new ones:The existing Apply, Open-in-editor and Fix checks now go through the review.
Public names:
scripts/check-public-names.shis clean.🤖 Generated with Claude Code
A person writes what a family of circuits must do and what it costs; proposers write generators; the engine checks each one at every size and an archive keeps the cheapest verified generator of every kind. The largest unbuilt feature of the co-design research: the evaluator is the engine, never a model's judgement. - engine::discover: - Spec: the task (equivalent, or prepares: the same state from |0…0⟩, the new equiv::same_state), the reference generator, the sizes, the gates and connectivity allowed, the cost (weights on the critique's measures, summed over the sizes), two axes and a budget. - Evaluator: verified only when it reads, keeps the rules and passes the check at every size, stopping at the first failure; the weakest check is named. - Archive: MAP-Elites over the two axes, with lineage, proposer and note; bound to the specification's digest (budget left out); each kept entry sealed with the searcher's key, and Archive::verify checks every seal binds its entry. - mutate and search: the built-in, seeded, blind baseline. The clock and the energy reading are passed in, so the module builds wherever the engine does. - engine::energy: the job service's reader moved into the engine, with `own()` for a running process. The service keeps only waitid(WNOWAIT); the FFI is declared directly, so wai-quantum gains no dependency and no lockfile changes. - critique::measures is public. - CLI: `wai-quantum discover new|search|eval|submit|show|verify`, with specifications that may name their reference as @file.qasm, and two shipped specifications (discover/ghz-line.json, discover/ghz-all.json). - MCP: discover_evaluate, discover_submit, discover_archive; and every tool that takes a program takes a generator with `inputs`. The program description no longer says loops are refused. Measured on the build host, ghz-all.json: 1,500 blind edits in 4.6 s and 24 J. 139 were verified and 29 kept, none cheaper than the reference; the doubling tree costs 25 against its 49. All 29 seals held. Co-Authored-By: Claude Opus 5.5 <[email protected]>The workbench from the last change, in the Studio: a family of circuits searched for its cheapest members, every proposal judged by the engine. And the editor reads a generator at its inputs' values, which the Workbench needs and everything else gains from. - Generators in the editor (generators.js): - a field for each declared input under the editor, kept by name; - the lint and the critique read the generator at those values and keep its own lines (job::lint_with, critique::critique_with; a smell in a generator offers no Fix); - the diagram, the plan, a run here or on the service, the lens and the alternatives take the circuit it writes out (qasm::instantiate, in the page and in the desktop app). A new value re-lints through the linter's needsRefresh. - The Workbench pane (workbench.js): - a form for the specification, the archive's elites on the two axes with the cheapest marked, and an entry's cost, check, seal and lineage, with "Open in editor"; - three proposers, each named on what it found: the reader, the blind search (in steps of 25, so its progress shows) and the model; - the archive kept in the browser, back with the page, and downloaded beside its specification as `wai-quantum discover verify` reads them. - The model as a proposer (Assistant.propose): it is told the specification and shown the cheapest found, with the costs the engine measured. The assistant's brief now says while, inv and pow are refused, not loops. - Bindings: discover_start, discover_submit, discover_search, discover_evaluate and instantiate in wai-web and the desktop app, which also counts a search's seconds and joules. - Tests: - the engine: a generator critiqued at its inputs, with its own lines and no Fix; - wai-web: the workbench run and sealed in the page; - the Studio, in a browser: a generator linted, drawn and run at its value; the Workbench started from it, a hundred blind edits judged, the reader's log-depth tree kept as the cheapest, opened, downloaded and back after a reload; a scripted model's generators judged at every size, one kept, a wrong one and a forbidden gate left out with their reasons. Co-Authored-By: Claude Opus 5.5 <[email protected]>Feature 6 of the co-design report: every version of a program, who made each change and how, and whose hand each line and gate is in, sealed into the run's receipt. - engine::versions: - versions in a chain, each naming its parents (none, one, or two for a merge), who made it (the person, the assistant, an outside agent, the engine, or where the program came from) and how (an edit, a proposal reviewed change by change, a merge); - a version's digest covers its parents' digests, and the recording host's key seals it; verify checks every digest, seal and review; - changes and apply: a line diff (Myers), so a proposal is taken change by change, and the version keeps the whole proposal; - blame, authorship and gate_hands: a line keeps its author until changed; a model's or an agent's line the person edits is in both hands; an undo keeps the earlier authors; a merge keeps each side's; gates follow their lines, at a generator's inputs; - attest and check_job: a job's request carries the account, the receipt binds it, and it is recomputed from the history; - call: the history by name with JSON arguments, for the page and the desktop app. - The command line: history start | commit | changes | propose | merge | log | blame | verify; run and submit --history; verify --history. - MCP: history_commit, history_changes, history_blame and history_log. An agent's edit is recorded as an outside agent's, under the name its client gave in initialize, whatever it says of itself. - The Studio's Versions pane: - what the reader types is theirs, recorded when they pause; - every proposal (the assistant's program, an alternative, a generator from the Workbench) is offered change by change while the editor waits; a fix is the engine's; - lines of work in lanes: an older version opened and edited starts its own, and "Bring in" merges one change by change; - "Who wrote it" marks lines in the gutter and gates on the diagram; - the run's receipt binds the account, which the result recomputes; - kept in the browser, downloaded for the command line; - window.quantumStudio.propose for an embedding page. - Fixes found by the Studio's test: a run shows it is running before the account is made, and the draft is kept as the page goes. - CI: wai-web's native engine tests count 8, the history's included. Co-Authored-By: Claude Opus 5.5 <[email protected]>