Skip to content

fix: preserve Terraform provider bindings and lint diagnostics - #257

Merged
Jared Holgate (jaredfholgate) merged 6 commits into
mainfrom
jaredholgate-microsoft-alz-unit-migration
Oct 19, 2026
Merged

Jared Holgate (jaredfholgate) merged 6 commits into
mainfrom
jaredholgate-microsoft-alz-unit-migration

Conversation

@jaredfholgate

@jaredfholgate Jared Holgate (jaredfholgate) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix the migration blocker affecting Azure/terraform-azurerm-avm-ptn-alz#357, preserving real local-library provider configuration, fixtures, assertions and the unchanged Azure/avm-utl-interfaces/azure 0.5.0 dependency.

  • Preserve proven existing ALZ bindings and implicit Random/Time defaults using per-run pre/post-transform source and binding evidence. Restore retained dependency requirements through the dedicated provider-restoration profile, preserving authored locations and constraints. Unknown/incomplete/cross-provider bindings, aliased target keys, mocked-to-real regressions and real introduced Azure/ModTM operations remain rejected.
  • Present threshold-blocking Terraform lint findings immediately as located GitHub errors and visible local diagnostics, preserving structured severities, thresholds, advisory notices and collect-all behavior. De-duplicate composed rendering and the actual dispatch/result/terminal-assertion path without changing typed exceptions, result identity or exit behavior.
  • Suppress recursive inspection-copy progress per call while preserving verbose diagnostics, copy/error behavior and caller preferences. The separate shared module-cache copying path is unchanged.
  • Serialize unchanged effective analyzer checks through public IncludeRule calls, runtime public builtin discovery and an unchanged custom-only exclusion partition. Preserve full inputs, settings, severities and discovery arguments. Keep actual parser records once by DiagnosticRecord/ParseError severity, not rule name; retain every ordinary finding, including duplicates. The unchanged default eight-attempt budget covers whole passes, and failed attempts emit no partial findings.

Integrated main: 1762857b0c916d96076204bf5612a769328582b3, including #254. No dependency upgrade is used as a workaround.

Current-head validation

Commit: 309c5b9f7985ee147ebb571d26c3ea6f25654b1f
Qualified tree: 082ab63564b9fe0dfbdcf0d5e32d94575ed9ce82

One complete unfiltered ./build.ps1 pre-commit passed on that exact unchanged tree:

  • Unit: 4,013 passed, 0 failed, 9 skipped.
  • Component: 2,199 passed, 0 failed, 3 skipped.
  • Layout, encoding, lint and generated-reference drift checks passed. Expected synthetic warning-path output did not bypass any gate.
  • Fresh PowerShell 7.4.21, original installed PSScriptAnalyzer 1.25.0, unchanged settings/module-discovery environment and original retry cap.

Focused analyzer coverage: 37/37 passed. The real fixture now deliberately produces a PSUseOutputTypeCorrectly informational finding instead of depending on version-varying casing severity. All original severity, parser and exact-multiset requirements remain; safe baseline diagnostics report the actual imported analyzer version and casing severity. This is a test-only portability correction, not a production rule/settings/version change. Recorded local PSScriptAnalyzer 1.25.0 public-inventory evidence preserved the original 57 effective builtins from 75 available names and the same 13 ordinary findings. That earlier 13/13 receipt contains no parser diagnostics because unchanged configured severity filters exclude ParseError. A separate genuinely invalid fixture uses identical explicit parse-inclusive severity arguments in both controls: success-stream MissingEndCurlyBrace appears once in the baseline, 76 times in naive serial collection, and once after correction, with full finding-multiset equality. Tests also preserve effective custom-file controls, ordinary duplicates, whole-pass retry limits and exception behavior.

Lint/terminal coverage exercises immediate annotation timing/locations, thresholds, notices, actual standalone/composed child dispatch, nonzero exits and retained distinct/non-issue failures. Earlier receipts remain separate, never stitched into current-tree qualification. Exact-head automatic CI passed: Authoring CI, package qualification, repository CI, and workflow CI. Unit, component, native compatibility, Terraform mock integration, Bicep integration and package matrix jobs succeeded on Windows, Ubuntu and macOS.

Successful hosted Windows/Ubuntu diagnostics confirm the fixture distinction: imported PSScriptAnalyzer 1.21.0 reports casing findings as Warning, versus the recorded local 1.25.0 / Information baseline. The explicit real output-type mismatch now supplies stable Information coverage without changing either runtime's versions, settings or effective checks. CI results remain separate from the complete local gate. The previous head (e2a5a40) passed its full local gate but failed this fixture precondition in hosted unit jobs; those receipts are retained separately and are not current-head CI qualification.

Limits and rollout

Native ALZ evidence proves source/configuration/fixture/assertion preservation only, not real-provider runtime equivalence. Fully mocked execution and compositional clock evidence are separate. Earlier loopback/native claims must not be treated as real-ALZ runtime or released qualification. The shared checkout and released package were not changed; no unmocked ALZ/Random/Time apply or Azure/remote-state operation was performed.

The pre-existing directory-based custom-rule discovery gap remains explicitly dormant, neither silently enabled nor claimed covered. Explicit custom-file controls separately prove preservation of rules already effective under those control arguments. Upstream PowerShell/PSScriptAnalyzer#2206 is not assumed merged or released.

Keep draft: SFI sign-off is outstanding and required before merge/release. No merge, release, force-push, workflow dispatch, weakened rule or safety/version-gate bypass was performed. After sign-off and separately authorized merge/release, publish a new Avm.Authoring version, then run released pre-commit/pr-check and unit qualification for consumer repairs, including Azure/terraform-azurerm-avm-ptn-alz#357. Update internal rollout/minimum-version guidance when that release version is known.

Preserve proven local library providers and implicit local defaults while
requiring same-provider mocks for introduced operations.

Isolate dependency-provider restoration so example inputs and authored
constraints remain unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Workflow test results

  1 files  ±0   32 suites  ±0   3s ⏱️ ±0s
148 tests ±0  148 ✅ ±0  0 💤 ±0  0 ❌ ±0 
149 runs  ±0  149 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 309c5b9. ± Comparison against base commit 1762857.

♻️ This comment has been updated with latest results.

@github-code-quality

github-code-quality Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: PowerShell

PowerShell / code-coverage-agent

main 1762857 jaredholgate-microso... 309c5b9 +/-
76% 76% 0%
View coverage of the 2 most impacted files.
File main 1762857 jaredholgate-microso... 309c5b9 +/-
Private/Output/...mandSuccess.ps1 94% 82% -12%
Private/Output/...e-AvmResult.ps1 88% 91% +3%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 19, 2026 18:41 UTC

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Repository test results

    8 files  ±0    376 suites  ±0   9m 47s ⏱️ +5s
1 725 tests ±0  1 723 ✅ ±0  2 💤 ±0  0 ❌ ±0 
1 824 runs  ±0  1 822 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 309c5b9. ± Comparison against base commit 1762857.

This pull request removes 53 and adds 50 tests. Note that renamed tests count towards both.
Bicep module identity entry points with real files and mocked services.rejects ambiguous or overlong discovered identity names before any service call("*68 characters*",avm/res/a/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb)
Bicep module identity entry points with real files and mocked services.rejects ambiguous or overlong discovered identity names before any service call("*unique*",avm/res/a-b/c avm/res/a/b-c)
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("","12345","*AVM_APP_BOT_LOGIN*")
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("configured
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("configured-bot[bot]","","*AVM_APP_BOT_USER_ID*")
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("configured-bot[bot]","0","*AVM_APP_BOT_USER_ID*")
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("configured-bot[bot]","abc","*AVM_APP_BOT_USER_ID*")
Error: Apply interrupted")
Get-AvmPrReviewerRoutingEligibility.rejects substituted and ambiguous team permission responses("Azure/other",True)
Get-AvmPrReviewerRoutingEligibility.rejects substituted and ambiguous team permission responses("Azure/terraform-azure-avm-res-storage-storageaccount","true")
…
Bicep module identity entry points with real files and mocked services.rejects ambiguous or overlong discovered identity names before any service call(avm/res/a-b/c avm/res/a/b-c,"*unique*")
Bicep module identity entry points with real files and mocked services.rejects ambiguous or overlong discovered identity names before any service call(avm/res/a/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,"*68 characters*")
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("*AVM_APP_BOT_LOGIN*","","12345")
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("*AVM_APP_BOT_LOGIN*","configured
bot[bot]","12345")
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("*AVM_APP_BOT_USER_ID*","configured-bot[bot]","")
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("*AVM_APP_BOT_USER_ID*","configured-bot[bot]","0")
Configured repository-sync bot identity.rejects missing or invalid configuration before it can be used("*AVM_APP_BOT_USER_ID*","configured-bot[bot]","abc")
Get-AvmPrReviewerRoutingEligibility.rejects substituted and ambiguous team permission responses("true","Azure/terraform-azure-avm-res-storage-storageaccount")
Get-AvmPrReviewerRoutingEligibility.rejects substituted and ambiguous team permission responses(True,"Azure/other")
Get-AvmPrReviewerRoutingEligibility.rejects substituted and ambiguous team permission responses(null,"Azure/terraform-azure-avm-res-storage-storageaccount")
…

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Authoring test results

    31 files  + 12   2 614 suites  +178   1h 24m 47s ⏱️ + 30m 15s
 4 393 tests +165   4 387 ✅ +165   6 💤 ±0  0 ❌ ±0 
13 381 runs  +532  13 329 ✅ +532  52 💤 ±0  0 ❌ ±0 

Results for commit 309c5b9. ± Comparison against base commit 1762857.

This pull request removes 91 and adds 241 tests. Note that renamed tests count towards both.

  - a
  - b
  module { source = "./setup" }
  providers = { modtm = modtm }
 length (
 random_uuid.telemetry 
")
"dependency"")
"dependency"","./unscanned-child")
…
Acceptance: packaged Terraform commands.terraform-azure-avm-res-mock.keeps canonical bytes unchanged on both public pre-commit runs and full pr-check
Acceptance: packaged Terraform commands.terraform-azurerm-avm-res-mock.keeps canonical bytes unchanged on both public pre-commit runs and full pr-check
Acceptance: packaged utility migration.produces reviewed legacy upgrades once, then keeps all bytes on the second public pre-commit and pr-check
Bicep e2e static deployment isolation.rejects nested deployments with unsafe modes, scopes or parameters("*outside its resource group*","schema","foreign schema")
Bicep e2e static deployment isolation.rejects nested deployments with unsafe modes, scopes or parameters("*uninspectable nested deployment parameters*","parameters","linked parameters")
Bicep e2e static deployment isolation.rejects nested deployments with unsafe modes, scopes or parameters("*unsafe nested deployment mode or property*","rollback","unreviewed rollback")
Bicep e2e static deployment isolation.rejects nested deployments with unsafe modes, scopes or parameters("*unsafe nested deployment mode*","dynamic","dynamic mode")
Bicep e2e static deployment isolation.rejects nested deployments with unsafe modes, scopes or parameters("*unsafe nested deployment mode*","mode","complete mode")
Bicep native cleanup case contract.rejects invalid case metadata: path tests/e2e/
/main.test.bicep
Bicep reserved subscription contract.rejects an invalid module path without trimming, folding or separator normalization: avm/res/azure-stack-hci/cluster

…

♻️ This comment has been updated with latest results.

Delay native dependency loading for fully mocked templates until generated
module inputs exist. Retain original native proof for preserved local
providers and introduced mappings, plus mandatory post-transform coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jaredfholgate

Copy link
Copy Markdown
Member Author

Current-head verification update (f463ceb)

This supersedes the earlier validation counts and completes verification of head f463ceb9893cbb5d9ac2873f3d96244846b51976.

The CI regression correction avoids premature provider-tree loading for fully mocked pre-scaffold templates while retaining native proof for preserved local bindings and introduced mappings. All three signatures across the six old failed jobs are covered: nested wrappers, selected examples and an alias-only wrapper. Mandatory post-transform source/mock coverage and rejection of unmocked Azure/modtm dependencies remain intact.

  • Current-head Authoring CI is successful, including all six Terraform integration jobs. All 29 observed review checks were verified completed and successful.
  • The unchanged native mocked fixtures and alias control pass (4/4). Seven retained-ModTM scenarios and the omitted-default-mock rejection case pass.
  • Full local ./build.ps1 pre-commit: 4,241 unit and 1,697 component tests passed; 12 skipped. Layout, analyzer and generated-reference checks passed.
  • Fresh ALZ archive a8847049eb557e4faf0ab0d92c6fa8cb0a50c791, tested with authoring head f463ceb: all 25 original native runs, native validation and repeat transform drift checks pass.
  • All seven test configurations/variables/assertions and five real local-library fixture files are preserved. Interfaces remains exactly 0.5.0; provider selections and exact original lock/manifest bytes remain unchanged, including after lint.
  • All 12 ALZ source-lint scopes pass (52 files; 17 notices, no warnings/errors).

This is source-only module qualification, not released-package qualification. SFI sign-off is still required before merge/release. The review remains draft. An authorized authoring release and normal released-module qualification are still required before treating the affected module repairs as complete.

Local verification used loopback-only synthetic constructor inputs and no Azure access. No manual workflow dispatch/rerun, environment approval, merge or release was performed; CI ran automatically after the branch push.

Complete the preserved pending merge of main at 84d681e and integrate the
qualified provider migration onto the source of landed main 1762857.

The complete recorded patch reproduces tree
781b141. Reuse the exact-tree pre-commit
and Native qualification evidence; non-writing layout and docs checks
also pass in this worktree. Preserve authored changes and shared safety
fixtures. The landed main ancestry is merged normally next.

Source-only integration; publication and release remain held.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merge actual main at 1762857 after the prerequisite landed. Resolve the
normal merge against the complete, already-qualified provider-migration
source without changing tree 781b141.

Both local merge commits preserve the earlier feature history and authored
changes. Reuse the exact-tree 3990 Unit, 2196 Component and 41 Native
results; no full gate was repeated for identical source.

Keep publication, SFI sign-off, consumer qualification and release held.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Report threshold-blocking lint findings immediately without duplicate
terminal annotations, and preserve internal copy progress behavior.

Serialize the original effective analyzer rules through public IncludeRule
partitions, retaining parser diagnostics once and the whole-pass retry cap.
Keep provider-binding safety and focused regression coverage intact.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Package qualification results

 3 files  ±0  15 suites  ±0   3m 9s ⏱️ +23s
 5 tests ±0   5 ✅ ±0  0 💤 ±0  0 ❌ ±0 
15 runs  ±0  15 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 309c5b9. ± Comparison against base commit 1762857.

♻️ This comment has been updated with latest results.

Generate a real PSUseOutputTypeCorrectly informational finding instead of
relying on version-dependent casing severity. Preserve all severity,
parser identity, exact-once and complete finding-multiset assertions.
Record safe analyzer/version context for future fixture failures.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch was previously deployed

1 inactive deployment
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