Repository navigation
fix: hcl-edit lock job and mergeable-now auto-merge refusals from the first source run - #113
Merged
Merged
Conversation
… read the lock as it stands For a 0.x crate the in-range release (hcl-edit 0.9.9, lock only) and the next minor (0.10.0) share a branch line, so both reached patchula/hcl-edit-0.x. The 0.10.0 job moved the lock first, and the 0.9.9 job then addressed the [email protected] entry that no longer existed. Keep the highest update for each occurrence of a dependency in a group, as it contains the lower one. Cargo jobs now re-read the lock before every command: a target already locked runs nothing, and an entry that moved is addressed by the version it has now.
…merge being off GitHub refuses enablePullRequestAutoMerge with 'Pull request is in <state> status' when nothing required stands in the way, and the first fix recognised only clean. #91 came back as 'unstable' (non-required checks still running). Read the state from the refusal and accept the documented set CLEAN, UNSTABLE and HAS_HOOKS (the same set gh pr merge --auto takes as mergeable now), not one exact phrase. The Count's own merge still needs a clean state and every check passing, so an unstable PR waits; other states, such as dirty, stay errors.
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Rust | Oct 31, 2026 3:03a.m. | Review ↗ | |
| JavaScript | Oct 31, 2026 3:03a.m. | Review ↗ | |
| Shell | Oct 31, 2026 3:03a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | ef57837 | Commit Preview URL Branch Preview URL |
Oct 31 2026, 02:51 AM |
There was a problem hiding this comment.
2 issues found across 7 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="crates/update/src/lockfiles.rs">
<violation number="1" location="crates/update/src/lockfiles.rs:908">
P2: This treats a same-name, same-version entry from Git or another registry as the crates.io target. If Cargo.lock still has the old crates.io version, the early return skips its update and leaves the lock inconsistent with the edited requirement; match the target against the crates.io entry specifically.</violation>
<violation number="2" location="crates/update/src/lockfiles.rs:913">
P2: This selects every same-name version compatible with `target`, including versions unrelated to this job’s resolved package; a conflicting transitive requirement can then make Cargo reject the lock update. Select only the entry represented by this job, including its moved version when an earlier job changed it.
(Based on your team's feedback about Cargo compatible-range resolution.)</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
Docs7 for sweepies/count-patchula
Commit |
The cargo job read same-name lock entries by version alone, so a Git or alternate-registry copy at the target's version made a pending crates.io update look done, one in the target's range was moved with it, and an equal name and version made a bare -p spec ambiguous. Read only entries whose source is crates.io (in the post-lock check too) and address each by its source, as source#name@version, which cargo accepts as a package ID.
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.
Two bugs in fixes from #108, found by the first run of main built from source (run 41158974210). One commit each.
patchula/hcl-edit-0.x:package ID specification [email protected] did not match any packages.The lookup reports two updates for
hcl-edit: an in-range patch (0.9.9, lock only) and the next minor (0.10.0). For a0.xcrate both have branch line0, so both landed onpatchula/hcl-edit-0.xas two lock jobs. The 0.10.0 job moved the lock first (cargo update --workspacereplaced 0.9.7), and the 0.9.9 job then addressed the[email protected]entry that no longer existed. The planner now keeps the highest update for each occurrence of a dependency in a branch, since it contains the lower one.cargo_updatealso re-reads the lock before every command: a target already locked runs nothing, and an entry that moved is addressed by the version it holds now. The base64 case (old version still required byjsonwebtoken) is unchanged.#91
Pull request is in unstable status.GitHub refuses
enablePullRequestAutoMergewith "is in<state>status" whenever nothing required stands in the way, and the earlier fix matched onlyclean. The refusal's state is now read and the documented setCLEAN,UNSTABLEandHAS_HOOKSis accepted (the same setgh pr merge --autotreats as mergeable now). The Count's own merge gate is unchanged: it still needscleanand every check passing, so anUNSTABLEPR waits. Other states, such asdirty, stay errors.Tests fail without each fix: the planner test (2 changes instead of 1), the lock test (reproduces the logged cargo error), and the engine test (fails at the
unstablecase).