GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — impl(deploy): the release verb — tag cutting, attestation, and the untagged-release refusal (#13306) by dezren39 · Pull Request #13329 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e882d539d
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| artifact = defn["package"] | ||
| refusal = release_claim_refusal(name, defn) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Realize the artifact before checking its release claim
When the target package is not already present in the Nix store, this check silently permits deployment: probe_artifact_version() returns None for the missing executable, which is treated as no release claim. The package is only realized afterward by install_generation() through ensure_artifact(), and its version is never checked again before activation. Because the registry deliberately avoids realizing target packages when building the CLI, this is a normal first-deployment path in both systemd and sandbox activation. Realize the artifact before probing it, while keeping the attestation check before profile changes or activation.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if rc == 0 and name not in tags: | ||
| _git(repo, "tag", "-d", name) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve local tags during release dry runs
If an unpublished local app or repo tag exists, deploy release --dry-run deletes it here before reaching the later dry-run return. This also happens when gate judgment subsequently fails, so an inspection command can destroy local release state despite reporting that no tags were cut. Guard this cleanup with not dry_run and report the proposed deletion instead. The root AGENTS.md operator-script contract explicitly requires parsed safety flags to be honored on every code path.
AGENTS.md reference: AGENTS.md:L43-L48
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| source_rev = _source_rev() | ||
| if not FULL_SHA_RE.fullmatch(source_rev): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Verify the source revision reported by the artifact
For an already-realized release artifact, _source_rev() reads only the caller's DEPLOY_SOURCE_REV environment variable, not the artifact's source revision. Neither the packaged deploy wrapper nor another production caller in the repository sets that variable, so an ordinary deployment of a correctly attested release is refused as working-tree. Conversely, setting it to an attested commit can authorize an artifact built from a different commit because the artifact's actual revision is never compared. Fleet already prints Source rev: alongside Derived version: in print_version(); read and verify that artifact provenance rather than treating caller-provided logging metadata as its source commit.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| f"registry definitions for app {app!r} disagree on " | ||
| f"evidenceWorkflow: {', '.join(sorted(workflows))}" | ||
| ) | ||
| return workflows.pop() if workflows else None |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Require the dedicated evidence workflows for registered apps
For deploy release pm-aggregator and deploy release ready-for-agent, this returns None because their definitions in pkgs/deploy/services.nix omit evidenceWorkflow. Both apps have dedicated suites outside WATCHED_WORKFLOWS: .github/workflows/pm-aggregator-tests.yml names pm-aggregator tests, and .github/workflows/ready-for-agent-tests.yml names ready-for-agent tests. Consequently, either app can receive a release attestation while its own suite is failing or has never run. The release design §3 explicitly requires those additional suites; populate the evidence field for these registered apps instead of treating the watched set as their complete evidence.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| ) | ||
| created.append(repo_tag) | ||
| _git_checked( | ||
| repo, "push", "origin", f"refs/tags/{app_tag}", f"refs/tags/{repo_tag}", |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Push the app and repository tags atomically
When two releases for different apps run concurrently, both can choose the same next repository tag from their initial remote snapshot. After one publishes, this push can publish the other's unique app tag while rejecting its now-occupied repository tag. _git_checked() then reports failure and skips the ledger append even though the app release is public, and retrying refuses the existing app tag as already released. Push the pair with --atomic; the locally inspected git push -h documents that option as “request atomic transaction on remote side,” preventing this partially published release.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| proc = subprocess.run( | ||
| [path, "version"], capture_output=True, text=True, timeout=15 | ||
| ) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Restrict version probes to entry points that support them
For already-built targets such as quota-recorder and laptop-agent, passing version runs their normal workload rather than a read-only query: pkgs/deploy/quota-recorder.py:348-367 ignores arguments and appends quota records and flushes them to Turso, while pkgs/laptop-agent/src/laptop_agent.py:1620-1632 loads and reaps persisted jobs before starting its HTTP server. This now happens before managed activation, under the deploy caller's environment rather than the service's configured environment; the 15-second timeout does not undo those effects. Make version probing an explicit supported command in the registry, or add a side-effect-free version command to these entry points before probing them unconditionally.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.