Repository navigation
feat(dev): a4 dev promote --check lists what exists only in the environment - #481
Conversation
…onment Local protocol builds, program release overrides and project stacks under a dependency's alias, each with the command that publishes it; exits non-zero while any remain so CI can gate a production deploy.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
[Medium impact] The PR appears safe to merge, with a non-blocking correction needed in the suggested program recovery command.
|
…and sees protocol stacks - A malformed or unreadable environment selection fails the check; only a missing one checks the lock alone. - Stack alias overrides also match the stacks a protocol pins, reported under the protocol. - A protocol never published is fixed with `a4 install`; `--locked` is offered only to go back to a pinned release. - An overrides answer without an `overrides` list is an error, not a clean environment.
# Conflicts: # cli/src/commands/dev/mod.rs # rust/arete-mcp/src/dev_env.rs
| "program {key} runs a changed release in the environment ({target}); arete.lock pins {}", | ||
| pinned.unwrap_or("no release") | ||
| ), | ||
| fix: "Deploy the program to mainnet and push its IDL (`a4 program push <idl>`), then `a4 install` the new release".into(), |
There was a problem hiding this comment.
Suggested fix keeps old release
For an already-installed registry program, publishing a new release and running a4 install keeps the old release in arete.lock when the dependency declaration is unchanged. The reported program-release-override therefore remains pending after the user follows this fix.
Recommend a4 update program <alias> to select the new release, and update the matching documentation row.
Knowledge Base Used: CLI workflows
Prompt To Fix With AI
This is a comment left during a code review.
Path: cli/src/commands/dev/promote.rs
Line: 113
Comment:
**Suggested fix keeps old release**
For an already-installed registry program, publishing a new release and running `a4 install` keeps the old release in `arete.lock` when the dependency declaration is unchanged. The reported `program-release-override` therefore remains pending after the user follows this fix.
Recommend `a4 update program <alias>` to select the new release, and update the matching documentation row.
**Knowledge Base Used:** [CLI workflows](https://app.greptile.com/arete/-/custom-context/knowledge-base/aretea4/arete/-/docs/cli-workflows.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
a4 dev promote --checklists what an app uses that exists only in the dev environment, each with the command that publishes it, and exits non-zero while anything remains, so CI can gate a production deploy on it.local-protocol-buildarete.lockentry withlocal_builda4 protocol deployin the protocol's project, thena4 install --lockedprogram-release-overrideprogram_releaseoverride for a program the lock pins (a program dependency, or a program of a stack or protocol) at another releasea4 program push <idl>,a4 installstack-alias-overridestack_aliasoverride whose StackManifest is a locked stacka4 up, point the dependency at it,a4 installarete.lockonly, and says so.--jsonprints{clean, environment, pending: [{kind, name, detail, fix}]}.a4 dev promotewithout--checkrefuses; the check is the only mode for now.Not covered yet:
local_extensionlock marker, which lands with the local-extensions change; the check gains it there.Independent of the edge PR (#475): based on main.
Tests: unit tests for the lock and override rules, run locally. Clippy was clean on the edge branch before the rebase; the rebase onto main changed only
mod.rsand thedev_env.rsmethod placement. CI compiles it on main.