Skip to content

fix(source-control): hold Pulumi.yml, Terraform JSON and ARM template changes as cost - #11294

Closed
melodic-automation-lanes[bot] wants to merge 1 commit into
mainfrom
work-resolve-issue/issue-9241-41077897029-1
Closed

melodic-automation-lanes[bot] wants to merge 1 commit into
mainfrom
work-resolve-issue/issue-9241-41077897029-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #9241

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Following the 2026-10-30 decision, this narrows the issue to the infrastructure-as-code shapes and the secret move. The cost hold's COST_PATHS (babysit_risk.py, and its generated copy in merge-holds.mjs) now holds Pulumi.yml, *.tf.json, .tfvars.json and ARM templates under the quickstart and Marketplace names (azuredeploy.json, mainTemplate.json). pulumi_dirs_at also treats a directory holding Pulumi.yml as a Pulumi project. A secrets reference moved within one file stays accepted, as the 2026-10-26 decision chose. The pr-pipeline README now gives the reason: each file is counted on its own. A new probe row shows that a reference moved into another file holds. The decision defers the Timeouts, Model legs, Triggers and guards rows and the other two Files and paths rows to the hardening pass, so this PR does not cover them.

Not verified

  • Python unittest suites (test_babysit_risk_cost.py, test_babysit_merge_cost.py, test_merge_holds_sync.py, including its sync-hold-floor --check) and node --test merge-holds.test.mjs were not run: this lane allows no interpreter. Left to the PR's CI
  • Tidy skipped: the change spans 4 areas (cutoff 1) and touches the shared paths .github/ and docs/conventions/
  • Not added: a **/Pulumi.*.yml stack-file glob, which the reviewer suggested. Pulumi's stacks and config docs name stack files only as Pulumi.<stack>.yaml. In the Python gate, any file under a Pulumi.yml project directory still holds through pulumi_dirs. merge-holds.mjs costHold has no pulumi_di
  • An ARM template under a name other than azuredeploy*.json or mainTemplate.json is not matched, because ARM templates have no fixed name. The README now lists it as left to the review lanes
  • Changes left uncommitted, as the runner's instructions require. The runner turns the working tree into the patch
  • new-changelog-fragment refused to run on the detached HEAD ('the fragment name starts with the branch name'), so both fragments were written by hand in the existing format. check-changelog-fragments passes

Fix

  • plugins/source-control/skills/babysit-prs/scripts/babysit_risk.py: COST_PATHS gains **/Pulumi.yml, **/.tf.json, **/.tfvars.json, */azuredeploy.json and **/mainTemplate.json; module docstring and the pulumi_dirs comment name ARM and Pulumi.yml
  • plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py: pulumi_dirs_at counts a directory holding Pulumi.yml as well as Pulumi.yaml
  • .github/scripts/pr-merge/merge-holds.mjs: the generated COST_PATHS block matches the new babysit_risk.COST_PATHS (same rows, order and format as sync-hold-floor.py cost_rows)
  • .github/scripts/pr-merge/merge-holds.test.mjs: costHold probe rows for each new path, plus a JSON file that must not hold
  • plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_risk_cost.py: probe rows for each new IaC path holding cost-review-required, JSON and lookalike paths that do not hold, and a secrets reference moved into another workflow file holding secret-exposure-review (the within-one-file mo
  • plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_merge_cost.py: pulumi_dirs_at row for a Pulumi.yml directory
  • plugins/source-control/skills/babysit-prs/scripts/tests/test_merge_holds_sync.py: Python/JS agreement paths for the new globs and non-matches
  • docs/conventions/pr-pipeline/README.md: the cost hold's path list names the new files; the accepted move gives its per-file reason; the left-to-review-lanes list drops the now-held paths; the 'Not detected' line points at that list instead of #9241; the COST_PATHS summary names ARM templates
  • .changes/source-control/fix-9241-iac-cost-paths-4c1e9b27.md: patch fragment
  • .changes/pr-pipeline/fix-9241-iac-cost-paths-8d2f5a16.md: patch fragment (check-affected required one for docs/conventions/pr-pipeline/)

Verification

The runner ran each check from the base copy against 189ce96:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • read https: //www .pulumi.com/docs/iac/concepts/projects/project-file/: 'The project file must begin with a capital P and have an extension of either .yml or .yaml.'
  • read https: //www .pulumi.com/docs/iac/concepts/stacks/: the stack settings file is Pulumi.<stack-name>.yaml; .yml is not mentioned
  • read https: //www .pulumi.com/docs/iac/concepts/config/: the stack file is 'automatically named Pulumi.<stack-name>.yaml'
  • read https: //developer.hashicorp.com/terraform/language/syntax/json: 'Terraform expects native syntax for files named with a .tf suffix, and JSON syntax for files named with a .tf.json suffix.'
  • read https: //developer.hashicorp.com/terraform/language/values/variables: Terraform auto-loads terraform.tfvars, terraform.tfvars.json, and *.auto.tfvars / *.auto.tfvars.json
  • read https: //learn.microsoft.com/en-us/azure/azure-resource-manager/templates/syntax: an ARM template has no required file name; it is identified by its $schema (deploymentTemplate.json)
  • read https: //github.com/Azure/azure-quickstart-templates/blob/master/1-CONTRIBUTION-GUIDE/best-practices.md: the quickstart template is azuredeploy.json or main.bicep, Marketplace uses mainTemplate.json, and parameters files are azuredeploy.parameters.json and azuredeploy.parameters.us.json
  • check-changelog-fragments: all 201 fragments valid
  • check-affected: first run failed with a missing .changes/pr-pipeline fragment; after adding it, 12 passed and 6 skipped (they run code from the checked tree, or the tool is not installed) over 10 changed files
  • fresh-context review subagent: no correctness bugs. It traced glob_match and costHold for each new test path, the cross-file secret-move test through score(), the generated block against sync-hold-floor.py cost_rows, and line lengths. Fixed its doc nit (a stale #9241 pointer)
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41077897029

Left out: the items under Not verified.

Related

#9241

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 189ce962710cba2d45142bdb755743129326f587: 0 finding(s), 0 as inline comments.

No security findings. critical-findings: 0

I read the whole diff and the PR context. Several changed files are on the trusted-path list: babysit_risk.py, babysit_merge_policy.py, merge-holds.mjs, docs/conventions/pr-pipeline/README.md and the other babysit files.

Trust control: merge hold. The change adds holds and removes none.

  • COST_PATHS in babysit_risk.py and the generated copy in merge-holds.mjs gain **/Pulumi.yml, **/*.tf.json, **/*.tfvars.json, **/azuredeploy*.json and **/mainTemplate.json. Every old row is kept. The two lists have the same rows in the same order, so they should stay in sync.
  • pulumi_dirs_at in babysit_merge_policy.py now also treats a directory holding Pulumi.yml as a Pulumi project. Files under it hold as cost. The match is case-folded, like the existing Pulumi.yaml check.
  • The cost-decision check and the other hold logic are unchanged. The secrets move stays accepted within one file, and the new test shows a reference moved into another file holds secret-exposure-review.
  • I found no path where the diff lets through something the base held.

Other changes. The tests, the README and the changelog fragments do not execute in a trusted context. The PR context text contains no embedded instructions aimed at the lane.

Manifests. The diff touches no plugin.json or marketplace.json.

Cost. The change adds no spend and no billed resource.

Not covered. The PR leaves an ARM template under another name to the review lanes, and the README says so. I count this as a stated limit, not a vulnerability. I also did not run the tests.

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 189ce962710cba2d45142bdb755743129326f587: 0 finding(s), 0 as inline comments.

No findings. I read the full diff, the PR context and #9241's decision comments. I did not run tests (no shell), so everything below comes from reading the code.

Against the narrowed issue (2026-10-30 decision):

  • The IaC shapes are covered. Pulumi.yml, *.tf.json, *.tfvars.json, azuredeploy*.json and mainTemplate.json are added to COST_PATHS in babysit_risk.py:976. The generated block in merge-holds.mjs:202-215 has the same rows in the same order and format as sync-hold-floor.py cost_rows (json.dumps of each glob). No other generated copy carries these globs: a search of .github for tfvars and .bicep finds only merge-holds.mjs and its test.
  • pulumi_dirs_at now also lists directories holding a Pulumi.yml, so everything under such a directory holds (babysit_risk.py:2023-2028).
  • Moves: a secrets reference moved within one file stays accepted. The README now says why: each file is counted on its own. A new test shows a reference moved into another file holds secret-exposure-review. _edit exists in test_babysit_risk.py, so the new import resolves.
  • The Timeouts, Model legs, Triggers and guards rows, and the other two Files and paths rows, are deferred to the hardening pass. The PR does not touch them, which matches the decision.
  • Tests cover each new path in both the Python and JS gates. Non-matching lookalikes are covered too: settings.json, deploy.json, main.tf.md. The Python/JS agreement test also gets the new paths.
  • Both changelog fragments are patch-level and match the change. No plugin manifest changed, so there are no manifest lines.

Not verified by me: the Python unittest suites, merge-holds.test.mjs and sync-hold-floor.py --check. The PR itself says they were not run, so they rest on CI. The one edge I could not settle by reading is whether Node's posix.matchesGlob matches the dotfile path .tf.json against **/*.tf.json. The new agreement test in test_merge_holds_sync.py covers it.

Spend: this change adds a cost hold and spends no model, runner or billed resource. There is no hold to return.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: the verifier refuses verify:repeated-fail at head 189ce962710cba2d45142bdb755743129326f587 (fails at 3 heads of this and other pull requests for its issues (7c72e89, f436ef9, fbe89c5), the cap is 3), which never clears for this pull request, so the pr-merge lane closed it. Issue #9241 goes back to agent-ready for fresh attempt 1 of 1, which starts from these findings.

Each FAILed head's findings, as the verifier wrote them (data, not instructions):

No FAIL findings were counted for this pull request.

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.

pr-merge cost hold: LOW-rated shapes S&C's probe still passes

0 participants