feat(cli): unstable [build] manifest — per-canister build record with fresh-install compatibility - #799
Open
Kamirus wants to merge 2 commits into
Open
feat(cli): unstable [build] manifest — per-canister build record with fresh-install compatibility#799Kamirus wants to merge 2 commits into
[build] manifest — per-canister build record with fresh-install compatibility#799Kamirus wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Cursor AI review👍 APPROVE — looks safe to merge
VerdictDecision: APPROVE Generated for commit d57adf2 |
automation-sa-sre
previously approved these changes
Sep 4, 2026
automation-sa-sre
left a comment
There was a problem hiding this comment.
Automated approval: the AI review verdict for 3c7b72a is APPROVE. See the "Cursor AI review" comment for details.
… write, spawn-failure error Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
automation-sa-sre
approved these changes
Sep 4, 2026
automation-sa-sre
left a comment
There was a problem hiding this comment.
Automated approval: the AI review verdict for d57adf2 is APPROVE. See the "Cursor AI review" comment for details.
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 free
to 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.
Deployment platforms and CI pipelines that drive
mops buildneed to know, per artifact, whether the wasm can land on a fresh canister or only works as an upgrade over pre-existing state — and today they have to reconstruct that themselves from the.most. With the unstable[build] manifest = truesetting,mops buildwrites a machine-readable record per canister, next to the artifacts it describes.Before:
mops buildemits<canister>.wasm/.did/.mostonly.After (with
[build] manifest = trueinmops.toml), additionally<outputDir>/<canister>.build.json:{ "version": 1, "canister": "fresh", "moc": "1.5.0", "outputs": { "wasm": { "path": "fresh.wasm", "sha256": "2b6e0f37…" }, "did": { "path": "fresh.did", "sha256": "6458b9c3…" }, "most": { "path": "fresh.most", "sha256": "5354d987…" } }, "checks": [ { "name": "stable-compatibility", "baseline": "empty", "passed": true } ] }Design follows the "record facts, let the consumer derive policy" convention of cargo's SBOM precursor files and Vite's
build.manifest:checksrecords the outcome ofmoc --stable-compatiblefrom an empty-actor baseline to the built.most.passed: false(a migration requires pre-existing state → upgrade-only wasm) is recorded, never fails the build — unlike the gating build checks, this one is observational. A check that fails to run (moc unspawnable) errors instead of masquerading aspassed: false.outputshashes the artifacts as finally written, after candid metadata embedding and the[optimize]pass.mops builddeletes any existing<canister>.build.jsonat the start of each canister build — even with the feature off — and writes the new one atomically (temp + rename) as the final step, so a watcher never observes a partial or outdated record.Unstable
Enablement is config-only (
[build] manifest = true): no CLI flag, no--helpchange. Documented solely on a new Unstable features docs page (/unstable), which states the schema and behavior may change in any release; the stable reference pages (mops.toml,mops build) deliberately don't mention it until stabilization.What is unchanged
The empty-baseline check is not new logic:
EMPTY_ACTOR_MOSTand the--stable-compatibleinvocation existed in duplicate incheck-deploy.tsanddeployed.ts, and are now extracted into a sharedhelpers/empty-baseline.tsthat all three consumers use.check-deploybehavior is identical (its suite passes unchanged). When bothcheck-deployandmanifestare enabled, the empty-baseline check runs twice per canister — a single cheapmocinvocation, deliberately left unshared.🤖 Generated with Claude Code