Agentic exe: ashlar export native — portable self-proving app bundle (mesh slice 3) - #394
Merged
Conversation
…ndle (mesh slice 3) Turn a certified project into something you can hand someone: the project staged beside a self-contained runtime and a launcher that VERIFIES before it runs. Download, unzip, run — offline, no install, and it proves its own certification on launch. - `ashlar export native --path <proj> --out <dir> [--rid <rid>] [--zip]` refuses to export a project that does not verify, stages app/ (contract, operator-owned policy, signed ledger, bricks), writes run.sh/run.cmd (verify-then-run), bundle.json, and a README. With --runtime it publishes a self-contained single-file runtime beside the app; the staging is deterministic and unit-tested, the publish is a separate step that degrades gracefully (RUNTIME.md) when the CLI is not publish-clean. - The staged app self-verifies OFFLINE with no origin key: the provenance course confirms the signed ledger chain intrinsically — the download proving its own certification. Fixes a real integrity hole a review surfaced (present since the ledger landed, #390), HIGH: the ledger's Subject (hash of the certified documents) was WRITE-ONLY — the provenance course checked chain integrity but never that the ledger covered the CURRENT documents. So an edited ashlar.yaml/ashlar.policy.yaml with an intact ledger passed as CERTIFIED, and a tampered downloaded bundle would have run. Now: - the provenance course FAILS unless the ledger head attests the current documents; - a keyed `verify` re-certifies (appends an entry covering the current documents, then the head matches) so the normal edit→verify loop still works; - a keyless `verify` of altered documents fails closed (exit 65) — the launcher aborts, the tampered app never runs; - export's "certified" and bundle.json require the head to cover the staged documents. Kernel 394/394 (incl. edit-after-certification fails provenance); CLI 18/18; e2e 90/90 with a full export: certified bundle staged, launcher self-proves, a keyless downloader confirms the chain offline, a tampered contract is refused, unverified projects refused. Also flags (as a follow-up task) that the product CLI references three test projects, which blocks the self-contained single-file publish (NETSDK1191). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # scripts/e2e-loop.sh
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice 3 of the mesh — the agentic exe. Turn a certified project into something you can hand someone: the project staged beside a self-contained runtime and a launcher that verifies before it runs. Download, unzip, run — offline, no install, and it proves its own certification on launch.
What lands
ashlar export native --path <proj> --out <dir> [--rid <rid>] [--zip]— refuses to export a project that doesn't verify; stagesapp/(contract, operator-owned policy, signed ledger, bricks), writesrun.sh/run.cmd(verify-then-run),bundle.json,README.md. With the runtime it publishes a self-contained single-fileashlarbeside the app; staging is deterministic + unit-tested, and the publish degrades gracefully (RUNTIME.md) when the CLI isn't publish-clean.Fixes a real integrity hole a review surfaced (present since #390, HIGH)
The ledger's
Subject(hash of the certified documents) was write-only — the provenance course checked chain integrity but never that the ledger covered the current documents. So an editedashlar.yaml/ashlar.policy.yamlwith an intact ledger passed as CERTIFIED, and a tampered downloaded bundle would have run. Now:verifyre-certifies (appends an entry covering the current docs), so the edit→verify loop still works;verifyof altered documents fails closed (exit 65) — the launcher aborts, the tampered app never runs;bundle.jsonrequire the head to cover the staged documents.Verification
Kernel 394/394 (incl. edit-after-certification fails provenance); CLI 18/18; e2e 90/90 — certified bundle staged, launcher self-proves, a keyless downloader confirms the chain offline, a tampered contract is refused, unverified projects refused.
Flags as a follow-up task: the product CLI references three test projects, which blocks the self-contained single-file publish (
NETSDK1191).[coordinated-integration]
Kernel (
src/— the provenance/document-binding fix) and its CLI surface (application/—export native, the re-certification flow) are one slice: the fix is meaningless without the verb that exercises it. No newsrc/-vs-application/layering crossed.cert-gategates the merge.