Skip to content

fix(source-control): hold Pulumi.yml, Terraform JSON and ARM templates as cost paths - #11170

Closed
melodic-automation-lanes[bot] wants to merge 2 commits into
mainfrom
work-resolve-issue/issue-9241-41010223604-1
Closed

melodic-automation-lanes[bot] wants to merge 2 commits into
mainfrom
work-resolve-issue/issue-9241-41010223604-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:

Under the 2026-10-30 decision that narrows #9241 to its infrastructure-as-code shapes and the secret move, the merge gate's cost-review-required hold now catches Pulumi.yml, Terraform JSON syntax (*.tf.json, *.tfvars.json) and ARM templates under the quickstart names (azuredeploy.json), and pulumi_dirs_at counts a directory holding Pulumi.yml as a Pulumi project. A secrets reference moved within one file stays accepted: the file reads no new secret, and gained privileged triggers or write scopes hold on their own. The README now gives that reason and what it leaves to the security review. The generated COST_PATHS copy in merge-holds.mjs, the probe rows and the cross-matcher samples are updated to match.

Not verified

  • Python unit tests (test_babysit_risk_cost.py, test_babysit_merge_cost.py, test_merge_holds_sync.py, which also runs sync-hold-floor.py --check) and node --test merge-holds.test.mjs were not run: this lane allows no interpreter, so they are left to the PR's CI
  • The merge-holds.mjs COST_PATHS block was written by hand to match scripts/sync-hold-floor.py output because the generator cannot run here; test_merge_holds_sync.py's --check in CI confirms it
  • tidy skipped: the change spans more than 1 area (plugins/source-control, docs/conventions, .github) and touches the shared path .github/
  • Rows the 2026-10-30 decision defers to the hardening pass (Timeouts, Model legs, Triggers and guards, a workflow in a subdirectory, spend logic in .github/actions/resolve-config/*.mjs) are out of this narrowed issue's scope and not done here; the README's Not detected line names them
  • An ARM template under a name other than one holding azuredeploy is not held; detecting it would need the template's $schema from head text, which the caller does not read for JSON files, so it is left to the review lanes

Fix

  • plugins/source-control/skills/babysit-prs/scripts/babysit_risk.py: COST_PATHS gains **/Pulumi.yml, **/.tf.json, **/.tfvars.json and **/azuredeploy.json, with a comment giving the basis; 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 base directory holding Pulumi.yml as well as Pulumi.yaml
  • .github/scripts/pr-merge/merge-holds.mjs: the generated COST_PATHS block written as scripts/sync-hold-floor.py's cost_rows renders the new COST_PATHS
  • .github/scripts/pr-merge/merge-holds.test.mjs: costHold probe rows for Pulumi.yml, *.tf.json, terraform.tfvars.json and the azuredeploy names, and deploy/template.json as a non-cost path
  • plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_risk_cost.py: probe rows for each new IaC shape scoring cost-review-required HIGH, and a negative test (other .json names, a Pulumi.<stack>.yml)
  • plugins/source-control/skills/babysit-prs/scripts/tests/test_babysit_merge_cost.py: PulumiDirs covers a Pulumi.yml project and ignores a stack file; test renamed
  • plugins/source-control/skills/babysit-prs/scripts/tests/test_merge_holds_sync.py: PATHS samples for the new globs so the Python and Node cost matchers are compared on them
  • docs/conventions/pr-pipeline/README.md: cost hold lists the new IaC paths with cited sources; the accepted secret move gives its reason and its residual; Pulumi.yml, ARM and *.tf.json no longer listed as left to the review lanes; the Not detected line names only the rows #9241 defers
  • .changes/source-control/fix-9241-iac-cost-paths-5e1c7a39.md: patch fragment for the source-control change
  • .changes/pr-pipeline/fix-9241-iac-cost-paths-8b2d4f60.md: patch fragment for the pr-pipeline convention change

Verification

The runner ran each check from the base copy against 050c3d5:

  • 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/projects/stack-settings-file/: a stack settings file must be named exactly Pulumi.<stack-name>.yaml
  • read https: //developer.hashicorp.com/terraform/language/syntax/json: JSON syntax is used for files named with a .tf.json suffix
  • read https: //developer.hashicorp.com/terraform/language/values/variables: Terraform auto-loads terraform.tfvars.json and *.auto.tfvars.json, and parses a variable file ending .json as JSON
  • read https: //github.com/Azure/azure-quickstart-templates/blob/master/1-CONTRIBUTION-GUIDE/README.md: the JSON template must be named azuredeploy.json, parameters azuredeploy.parameters.json (azuredeploy.parameters.us.json for government cloud), prereqs prereq.azuredeploy.json and prereq.azuredeploy
  • read https: //learn.microsoft.com/en-us/azure/azure-resource-manager/templates/best-practices: names no required ARM template file name, so templates under other names are left to the review lanes
  • check-changelog-fragments: all 12 fragments valid (run before and after the review fixes)
  • check-affected: 12 passed, 6 skipped, over 10 changed files (run before and after the review fixes)
  • fresh-context review subagent over the whole diff: no code bugs. One doc finding (the reason given for accepting a moved secret overstated what the code checks) and four nits (stale Not detected line, glob wording, test name, a missing .yml stack-file row); all fixed
  • review subagent traced sync-hold-floor.py cost_rows: the hand-written merge-holds.mjs block matches its output in order, quoting and indent; traced Python glob_match and Node costHold on every new sample path: they agree
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41010223604

Left out: the items under Not verified.

Related

#9241

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

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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

No security findings in this pull request.

The change only widens the merge gate's cost hold. It adds **/Pulumi.yml, **/*.tf.json, **/*.tfvars.json and **/*azuredeploy*.json to COST_PATHS, in both babysit_risk.py and the generated copy in merge-holds.mjs. pulumi_dirs_at now also counts a directory holding Pulumi.yml.

I read the diff for the trusted-path files merge-holds.mjs, babysit_risk.py and babysit_merge_policy.py:

  • Hold direction: every code change adds paths to a hold. Nothing removes or narrows one, no actor or token scope changes, and no kill-switch, signer or trusted-trigger code is touched. This is not a widening of a trust control.
  • pulumi_dirs_at: the new match is casefold() in ("pulumi.yaml", "pulumi.yml"). A stack file such as Pulumi.prod.yml still does not count, and the tests cover that. The match only adds directories, so more files hold.
  • Python/Node match: the two COST_PATHS copies are identical in content and order. test_merge_holds_sync.py compares them on the new sample paths and runs the generator's --check. I did not run those tests (the review has no interpreter), and the PR says they were not run either. A drift between the copies would fail that CI test. The sync test, not the gate, would catch it, so I rate this no finding.
  • README text: it keeps accepting a secrets reference moved within one file, as the base did. This documents existing behavior and loosens nothing. It also states that a privileged trigger or write scope gained in the same change holds on its own, and that a move into a job with a different if: is left to the security review. This is the residual the issue asked to be named.
  • Left out: an ARM template under a name without azuredeploy is not held. The PR states this, and that case was already unheld at the base. The change adds no new bypass.
  • Embedded text: the PR description and issue comments contain no instructions aimed at this review.
  • Manifests: the diff touches no plugin.json or marketplace.json, so there are no manifest <field> lines.
  • Cost: the change adds a hold and starts no charge, so it sets no hold.

critical-findings: 0

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 6fc75def963ce2b88d8e799caee71829380f3dd9: 0 finding(s), 0 as inline comments.

No findings. I read the full diff and the PR context, and checked scripts/sync-hold-floor.py for what else mirrors COST_PATHS. I ran no tests, so everything the PR says about passing tests is author-claimed and unverified.

Closing issue #9241, narrowed by the last decision comment. It has two acceptance items:

  • IaC shapes: Pulumi.yml, ARM templates under the azuredeploy names and *.tf.json are triaged as holds.
    • COST_PATHS in babysit_risk.py:983-992 and in the generated block in merge-holds.mjs both gain **/Pulumi.yml, **/*.tf.json, **/*.tfvars.json and **/*azuredeploy*.json.
    • pulumi_dirs_at now counts a directory holding Pulumi.yml.
    • Probe rows exist in test_babysit_risk_cost.py and merge-holds.test.mjs.
    • The Python and Node matchers are compared on the new globs in test_merge_holds_sync.py.
    • I did not read test_merge_holds_sync.py's own code for how it compares them.
  • Secret reference moved within one file: the diff accepts it, and docs/conventions/pr-pipeline/README.md now gives the reason and what it leaves to the security review.
    • I checked this against the issue's "accept it with a reason" option.
    • The README text matches what the code does: _net_added counts only net matches, as the issue cites.

Generated copy. The hand-written COST_PATHS block in merge-holds.mjs matches what cost_rows in sync-hold-floor.py renders (json.dumps of each glob, in the order of babysit_risk.COST_PATHS). The other generated copies are the review callers' hold-paths and hold_patterns. They are built from FLOOR_CLASSES, not COST_PATHS, so they need no change.

Manifest items. The diff touches no plugin.json or marketplace.json. The two changelog fragments are bump: patch, which fits a gate-coverage fix.

Spend. The change adds holds and spends no credits or minutes, and nothing in it can start a real charge. No hold applies.

Embedded text. The PR context contains no instructions aimed at the reviewer.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 30, 2026
Lane-Activity: pr-unblock/resolve-conflicts
@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 30, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 30, 2026
@kyle-sexton

Copy link
Copy Markdown
Member

Closing for a fresh attempt at #9241: at the verify cap (verify:repeated-fail across 3 heads for the issue). Under #10998 pr-merge closes it for a fresh attempt, but its sweep has not reached it.

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

1 participant