Skip to content

Require and persist Anthropic Industry attestation - #70

Open
Arun Sekhar (achandmsft) wants to merge 1 commit into
mainfrom
fix/industry-attestation-20261028
Open

Arun Sekhar (achandmsft) wants to merge 1 commit into
mainfrom
fix/industry-attestation-20261028

Conversation

@achandmsft

Copy link
Copy Markdown
Collaborator

What

Require and persist an explicit Anthropic Industry attestation in both azd infrastructure variants.

Why

Industry must describe the actual organization rather than silently defaulting to technology. Real cloud testing also showed that azd resolves required Bicep inputs before preprovision, so Industry must be collected during preup.

How

  • Retain properties.modelProviderData.industry alongside organization and country.
  • Remove the default and enforce the documented nine lowercase values in both templates.
  • Prompt once during preup, persist INDUSTRY, and revalidate it in preprovision.
  • Migrate legacy CLAUDE_INDUSTRY environments without another prompt and reject invalid or missing noninteractive input explicitly.
  • Keep Bicep/Terraform and PowerShell/Bash behavior at parity, with related documentation and regression coverage.
  • Keep the sample azd-based; no Azure CLI deployment instructions are added.

Verification

  • azd up succeeded end-to-end on a fresh env (Bicep)
  • azd up succeeded end-to-end on a fresh env (Terraform)
  • python src/hello_claude.py returned a live model response
  • N/A — docs-only / CI-only change

Cloud checks used separate fresh environments in an authorized private Azure test subscription. Tenant, subscription, principal, account and environment identifiers are intentionally omitted.

  • azd up --environment <redacted-fresh-environment> — passed independently for both variants with all hooks enabled.
  • Both Claude Sonnet 5.5 version 2 deployments reached Succeeded; ARM returned the expected Industry. A subsequent preprovision run reused the saved value without rewriting the environment.
  • python src/hello_claude.py — passed against both new deployments, returning text and usage.
  • .\.venv\Scripts\python.exe -m unittest discover -s tests -v — passed, 40 tests, no skips.
  • .\.venv\Scripts\python.exe -m compileall -q src tests — passed.
  • .\.venv\Scripts\python.exe -m pip check — passed.
  • git --no-pager diff --check and git --no-pager diff --cached --check — passed.
  • Invoke-ScriptAnalyzer -Path scripts\preflight-claude.ps1 -Severity Error -ExcludeRule PSAvoidUsingWriteHost,PSUseDeclaredVarsMoreThanAssignments — passed.
  • Git Bash bash -n scripts/preflight-claude.sh — passed.
  • Bicep entrypoint and module builds — passed with existing BCP081 warnings for unavailable preview type metadata.
  • From infra-terraform\infra, terraform fmt -check and terraform validate -no-color — passed.
  • Exact staged-content confidentiality scan — passed; public source matched the cloud-tested snapshot, allowing only Git's CRLF-to-LF normalization.

Private logs, deployment state, identifiers and runtime configuration are excluded.

Checklist

  • Mirrored the change across both infra-bicep/ and infra-terraform/ (if applicable)
  • No secrets / subscription IDs / tenant IDs / object IDs in commits, comments, or PR body
  • README updated if user-facing behavior changed
  • Conventional one logical change per PR

Collect Industry during preup before azd resolves required inputs, preserve legacy environments, and keep Bicep and Terraform validation in parity.

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

Copilot AI 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.

🟢 Approval recommended

No active review issues block the changes making Industry a required attestation across Bicep and Terraform deployments.

No open issues 🎉

What changed in this PR

This PR makes Industry an explicit, required Anthropic attestation in the Claude on Foundry Starter Kit, keeping Bicep and Terraform deployment flows aligned.

Changes:

  • Removes the Industry default and validates the nine supported lowercase values.
  • Adds preup collection and persistence before template input resolution, with legacy migration and preprovision revalidation.
  • Updates regression coverage, setup documentation, and agent guidance.
File Description
tests/​test_industry_templates.py Checks template validation, mappings, and hook parity.
tests/​test_catalog.py Adds Industry prompting, migration, validation, and persistence coverage.
skills/​claude-on-foundry/​SKILL.md Updates deployment and troubleshooting guidance.
scripts/​preflight-claude.sh Adds Bash Industry collection, validation, and persistence.
scripts/​preflight-claude.ps1 Adds PowerShell Industry collection, validation, and persistence.
README.md Documents required Industry and the updated hook flow.
infra-terraform/​infra/​variables.tf Removes the default and clarifies validation errors.
infra-terraform/​infra/​main.tfvars.json Maps Industry to the canonical INDUSTRY variable.
infra-terraform/​azure.yaml Adds the Industry-only preup hook and enables interaction.
infra-bicep/​infra/​main.parameters.json Maps Industry to the canonical INDUSTRY variable.
infra-bicep/​infra/​main.bicep Requires Industry without a default.
infra-bicep/​infra/​foundry.bicep Validates supported Industry values at the module boundary.
infra-bicep/​azure.yaml Adds the Industry-only preup hook and enables interaction.
AGENTS.md Updates shared agent guidance for required Industry.
.github/​copilot-instructions.md Updates the hook lifecycle and environment-variable contract.
.github/​agents/​claude-on-foundry.agent.md Adds Industry to required deployment configuration.
.env.sample Replaces the active Industry default with a commented example.

Review effort: Balanced

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.

3 participants