feat(cli): add mops deployed post-deploy hook + init bootstrap#562
Open
Kamirus wants to merge 3 commits into
Open
feat(cli): add mops deployed post-deploy hook + init bootstrap#562Kamirus wants to merge 3 commits into
mops deployed post-deploy hook + init bootstrap#562Kamirus wants to merge 3 commits into
Conversation
Implements specs/mops-deployed.md. `mops deployed [canisters...]` promotes the just-built `<outputDir>/<name>.most` into `<deployed-dir>/<name>.most` so `mops check-stable` always compares against the deployed version. `mops deployed init` writes an empty-actor baseline and wires `[canisters.<name>.check-stable].path` to it. New `[deployed].dir` config (default `deployed`); overridable per invocation with `--dir`. Source overridable with `--output`. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Cursor AI review👍 APPROVE — looks safe to merge
VerdictDecision: APPROVE Generated for commit cf80a1b |
…ests - `mops deployed --output` description disambiguated vs `mops build --output` - Drop dead `output: options.output` (already in `...options`) - Add tests for `init` preserving an existing baseline file and for the hook reading `[deployed].dir` from config Co-authored-by: Cursor <cursoragent@cursor.com>
- Extract `resolveBuildOutputDir` from `build.ts`; `mops deployed --output` now shares the same precedence (CLI override → [build].outputDir → default). - Collapse the duplicated canister-validation preamble in `deployed`/`deployedInit` into a single `selectCanisters` helper. - Unify the two `[check-stable].path`-divergence warnings (post-deploy hook and `init`) into one `warnIfStablePathDiverges` helper with a single message. - Hoist the `_tmp_<fixture>_<suffix>` + `afterEach` cleanup pattern out of `migrate.test.ts` and `deployed.test.ts` into a shared `useTempFixtures` helper in `tests/helpers.ts`. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
What
Implements
specs/mops-deployed.md.After a successful deploy,
mops deployedpromotes the just-built.mostinto a committeddeployed/<name>.mostsomops check-stablecompares against the deployed version on the next build. Closes the manual gap that today silently rots the stable-check baseline whenever someone forgets to copy the file.CLI surface
[build].outputDir(default.mops/.build); override with--output.[deployed].dirconfig (defaultdeployed); override with--dir.mops build/mops check.[check-stable].pathdoesn't point at<dir>/<name>.mostso silent baseline drift is visible.initis idempotent and only rewritesmops.tomlwhen something actually changes.Lifecycle (from the spec)
Out of scope
.didhandling — interface-change-driven, lives inmops generate candid(separate spec).Made with Cursor