Skip to content

fix: hcl-edit lock job and mergeable-now auto-merge refusals from the first source run - #113

Merged
sweepies merged 3 commits into
mainfrom
fix/source-run-1
Oct 31, 2026
Merged

sweepies merged 3 commits into
mainfrom
fix/source-run-1

Conversation

@sweepies

@sweepies sweepies commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

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 a 0.x crate both have branch line 0, so both landed on patchula/hcl-edit-0.x as two lock jobs. The 0.10.0 job moved the lock first (cargo update --workspace replaced 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_update also 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 by jsonwebtoken) is unchanged.

#91 Pull request is in unstable status.
GitHub refuses enablePullRequestAutoMerge with "is in <state> status" whenever nothing required stands in the way, and the earlier fix matched only clean. The refusal's state is now read and the documented set CLEAN, UNSTABLE and HAS_HOOKS is accepted (the same set gh pr merge --auto treats as mergeable now). The Count's own merge gate is unchanged: it still needs clean and every check passing, so an UNSTABLE PR waits. Other states, such as dirty, 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 unstable case).

View guided diff Turn on auto-fix

… 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.
@deepsource-io

deepsource-io Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in f45661b...fff73cb on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread crates/update/src/lockfiles.rs Resolved
Comment thread crates/update/src/lockfiles.rs Resolved
@context7

context7 Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Docs7 for sweepies/count-patchula

Result Status Action
Deployment ➖ Not used —
Content review ➖ Did not run. This site has no agent runs available this month. Wait for the monthly reset or check your Docs7 plan. —

Commit fff73cb

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.
@sweepies
sweepies merged commit 9a3b464 into main Oct 31, 2026
16 checks passed
@sweepies
sweepies deleted the fix/source-run-1 branch October 31, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant