chore(skills): add deps triage skill - #9
Conversation
Walks the open Dependabot queue: classifies each bump, gates on CI and on intentional pins, merges the safe ones and reports what needs a decision. Tailored to this repo's ecosystems, protection rules and merge behaviour.
Greptile SummaryThe PR adds a dependency-triage skill that classifies Dependabot updates, requires CI and a no-op Stage plan, binds merges to the planned commit, and waits for the resulting deployment. The plan procedure still needs to ensure that local Terraform inputs cannot differ from the printed commit.
Confidence Score: 4/5The PR is not yet safe to merge because Gate C can authorize a dependency update using a plan influenced by local Terraform files outside the recorded commit. The branch and workspace checks bind the plan to the intended PR context, but no clean-worktree check prevents surviving local Terraform inputs from changing the plan relative to the commit later merged and applied. Files Needing Attention: .claude/skills/deps/SKILL.md
|
| Filename | Overview |
|---|---|
| .claude/skills/deps/SKILL.md | Adds the complete dependency-triage workflow, but its plan gate does not prove that the planned working tree matches the recorded commit. |
Reviews (7): Last reviewed commit: "chore(skills): pass the planned SHA lite..." | Re-trigger Greptile
…ps triage Gate C allowed patch bumps and in-place plan changes through without a confirmed no-op plan, and step 4's 'watch the Stage apply' was a one-shot run listing that neither identified the run for the merged commit nor waited on it. Both let an unreviewed change reach the unattended Stage apply, and let the next merge start before the previous one landed.
|
Both findings were valid — thanks. Fixed in db41ddd. Gate C permits unchecked changes — the gate said "before merging anything beyond a trivial patch", which contradicted the file's own premise that Deployment monitoring does not wait — replaced the one-shot The report template now distinguishes "merged, Stage apply succeeded" from merely enqueued. 🤖 |
`|| break` exited only the per-workflow loop and discarded the non-zero status, so a failed Stage apply left no signal and the triage could go on to merge the next bump. Fail loudly with the run log and a non-zero exit.
|
Valid again — fixed in 5dee706.
Now the failure branch prints a |
The Gate C snippet ran four unchained commands, so a failed checkout or workspace select fell through to a plan against the previous branch or workspace — a false `No changes.` that reads as a passing gate. Abort on setup failure and assert branch and workspace before planning.
|
Valid, and the sharpest of the four — fixed in cf5ff8c. The Gate C snippet was four unchained commands, so a failed The snippet now opens with |
A clean Gate C plan is evidence about one commit, but the merge targeted whatever the PR head was by then. Dependabot force-pushes the branch when a newer release lands, so the plan and the merged code could differ. Record the planned SHA and pass it as --match-head-commit.
|
Valid — fixed in 765457c. A clean plan is evidence about one commit, not about the PR, and nothing tied the two together. Dependabot force-pushes these branches whenever a newer release lands — the same behavior step 2 already warns about for stale titles — so the head could move between Gate C and Gate C now records One structural note while this is open: every finding in this review has been a variant of "an unplanned change reaches the unattended Stage apply", and prose in a skill file can't enforce what a required check can. The durable fixes are on the repo side — a protection rule on the |
Each command runs in a fresh shell, so the $planned_sha set in Gate C expanded to empty at merge time, and --match-head-commit "" disables the guard silently. Print a PLANNED SHA to copy and paste literally instead.
|
|
||
| #### Gate D — mergeable state | ||
|
|
There was a problem hiding this comment.
Plan includes uncommitted inputs
When an ignored untracked Terraform override or another surviving local Terraform change is present, the branch and workspace assertions still pass and terraform plan evaluates content not represented by PLANNED SHA, causing a clean result to authorize a provider update whose committed configuration can produce changes during the unattended Stage apply.
|
Fixed in a03fe06 — and this one was my bug, not a reviewer artifact.
Separately, merging this PR turned up a repo fact the skill gets wrong: That correction needs its own PR since this branch is already enqueued. Follow-ups I'm opening: the merge-command fix, and the enforcement side — a protection rule on the |
Adds a
/depsskill that works through the open Dependabot queue. Companion to the same skill in the other repos, but the gating here is different in kind, not just in detail.Merging in this repo applies infrastructure. A merge to
mainrunsMain, and a successfulMaintriggersDeploy, whosestagejob runsterraform init→terraform plan -out=tfplan→terraform apply tfplan. TheStageenvironment has no protection rules, so that apply is unattended — a merged provider bump changes real infrastructure within minutes. (Liveis safe:live-planandlive-applyonly run onworkflow_dispatchwithtarget: live.)So a green check is not sufficient evidence. CI runs
terraform init -backend=false,validateandtest; it never plans against real state. A provider bump that changes a default, deprecates an attribute, or alters how an existing resource is read passesvalidateand then shows up as a change — or a replacement — in the Stage apply.The skill therefore makes the plan the primary gate rather than CI: check out the PR,
terraform workspace select stage,terraform plan, and merge only onNo changes.Anymust be replaced/-/+stops the merge and gets reported with the resource addresses. If credentials for the S3 backend or the 1Password provider are unavailable, the PR is reported as unverified rather than merged on CI alone, and the report must say whether a plan actually ran.Other repo-specific notes it encodes:
hetznercloud/hcloud,hashicorp/aws,hashicorp/cloudinitand1Password/onepassword— the last is why local plans needOP_SERVICE_ACCOUNT_TOKEN.versions.tfare floors (>= 1.60), so bumps normally touch only.terraform.lock.hcl. Aversions.tfchange is worth reading..terraform.lock.hcl, so each merge conflicts the rest — merge one at a time, watch the Stage apply, then@dependabot recreatethe remainder.mainis protected by a ruleset (terraform_test+ merge queue); the classic protection API returns 404, which reads as "unprotected" if you do not know to check/rulesets.The queue is empty right now, so this lands before it is needed rather than during a backlog.
Docs only — no Terraform changes. 🤖