From eeccaa6b5c289e0980fd601aa9da2b1783b0d59b Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Tue, 7 Jul 2026 13:37:09 -0700 Subject: [PATCH 1/3] Made check-schema-diff skill copy test-reader and issue-labeler dependencies correctly on every run --- .../skills/utils/check-schema-diff/SKILL.md | 18 ++++++++---------- .../scripts/check_schema_diff.sh | 5 +++++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.agents/skills/utils/check-schema-diff/SKILL.md b/.agents/skills/utils/check-schema-diff/SKILL.md index 5e44a355f4f5..01ad7503711f 100644 --- a/.agents/skills/utils/check-schema-diff/SKILL.md +++ b/.agents/skills/utils/check-schema-diff/SKILL.md @@ -15,28 +15,26 @@ description: "Run comprehensive checks (breaking changes, missing tests, and mis ## Execution Steps -### 1. Make the script executable (if not already) -Ensure the script is executable: -```bash -chmod +x .agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh -``` - -### 2. Run the Schema Diff Checker +### 1. Run the Schema Diff Checker Run the script to compare your current local changes (committed or uncommitted) against the base branch (defaults to the merge base with `origin/main` or `main`): ```bash ./.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh ``` -To compare against a specific branch or commit, pass it as an argument: +To compare against a specific branch or commit (e.g. `HEAD` to check uncommitted changes against the current commit): +```bash +./.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh HEAD +``` +Or to compare against a base branch: ```bash ./.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh ``` -### 3. Analyze the Output +### 2. Analyze the Output The tool runs three checks across both GA and Beta provider versions: - **Breaking Changes:** Detects backwards-incompatible schema changes. - **Missing Tests:** Identifies new or changed fields that are not covered by any acceptance tests. - **Missing Documentation:** Identifies new fields that are not documented in the resource/datasource markdown files. -### 4. Verification & Handoff +### 3. Verification & Handoff If any issues (breaking changes, missing tests, or missing docs) are detected, present them clearly to the user. Discuss potential mitigations and fixes before proceeding. diff --git a/.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh b/.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh index 588b6ad1e63e..722d44017951 100755 --- a/.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh +++ b/.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh @@ -44,6 +44,11 @@ DIFF_PROCESSOR_DIR="${REPO_ROOT}/tools/diff-processor" mkdir -p "$SCRATCH_DIR" +# Always copy test-reader and issue-labeler into SCRATCH_DIR so go.mod replace directives resolve +rm -rf "${SCRATCH_DIR}/test-reader" "${SCRATCH_DIR}/issue-labeler" +cp -r "${REPO_ROOT}/tools/test-reader" "$SCRATCH_DIR/" +cp -r "${REPO_ROOT}/tools/issue-labeler" "$SCRATCH_DIR/" + # 4. Set up cleanup trap to ensure we never leave git worktrees behind cleanup() { echo -e "${BLUE}Cleaning up temporary files and worktrees...${NC}" From eed63ac11e2df6eccf5c5732034bbf01ad29f089 Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Tue, 7 Jul 2026 13:44:53 -0700 Subject: [PATCH 2/3] Renamed validate-provider-changes skill and tweaked description to hopefully trigger more reliably --- .../SKILL.md | 24 ++++++++++++------- .../scripts/validate_provider_changes.sh} | 0 2 files changed, 16 insertions(+), 8 deletions(-) rename .agents/skills/utils/{check-schema-diff => validate-provider-changes}/SKILL.md (63%) rename .agents/skills/utils/{check-schema-diff/scripts/check_schema_diff.sh => validate-provider-changes/scripts/validate_provider_changes.sh} (100%) diff --git a/.agents/skills/utils/check-schema-diff/SKILL.md b/.agents/skills/utils/validate-provider-changes/SKILL.md similarity index 63% rename from .agents/skills/utils/check-schema-diff/SKILL.md rename to .agents/skills/utils/validate-provider-changes/SKILL.md index 01ad7503711f..3797ee7e4162 100644 --- a/.agents/skills/utils/check-schema-diff/SKILL.md +++ b/.agents/skills/utils/validate-provider-changes/SKILL.md @@ -1,12 +1,12 @@ --- -name: check-schema-diff -description: "Run comprehensive checks (breaking changes, missing tests, and missing documentation) on Magic Modules schema changes between the current branch and a base branch (usually main) using the local diff-processor." +name: validate-provider-changes +description: "Validate that changes to the generated providers don't introduce breaking changes or fields with missing tests or documentation. Use this skill any time that the downstream providers are modified, after running basic unit tests but before running acceptance tests." --- -# `check-schema-diff` +# `validate-provider-changes` > **Note to AI Agents:** You MUST read the YAML frontmatter above first. Only read the rest of this file if the `description` matches your required task. -> This skill allows you to run local breaking changes, missing tests, and missing documentation checks on Magic Modules schema changes. +> This skill allows you to run local breaking changes, missing tests, and missing documentation checks on Magic Modules schema and provider changes. ## Prerequisites @@ -15,26 +15,34 @@ description: "Run comprehensive checks (breaking changes, missing tests, and mis ## Execution Steps -### 1. Run the Schema Diff Checker +### 1. Run the Provider Changes Validator + Run the script to compare your current local changes (committed or uncommitted) against the base branch (defaults to the merge base with `origin/main` or `main`): + ```bash -./.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh +./.agents/skills/utils/validate-provider-changes/scripts/validate_provider_changes.sh ``` To compare against a specific branch or commit (e.g. `HEAD` to check uncommitted changes against the current commit): + ```bash -./.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh HEAD +./.agents/skills/utils/validate-provider-changes/scripts/validate_provider_changes.sh HEAD ``` + Or to compare against a base branch: + ```bash -./.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh +./.agents/skills/utils/validate-provider-changes/scripts/validate_provider_changes.sh ``` ### 2. Analyze the Output + The tool runs three checks across both GA and Beta provider versions: + - **Breaking Changes:** Detects backwards-incompatible schema changes. - **Missing Tests:** Identifies new or changed fields that are not covered by any acceptance tests. - **Missing Documentation:** Identifies new fields that are not documented in the resource/datasource markdown files. ### 3. Verification & Handoff + If any issues (breaking changes, missing tests, or missing docs) are detected, present them clearly to the user. Discuss potential mitigations and fixes before proceeding. diff --git a/.agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh b/.agents/skills/utils/validate-provider-changes/scripts/validate_provider_changes.sh similarity index 100% rename from .agents/skills/utils/check-schema-diff/scripts/check_schema_diff.sh rename to .agents/skills/utils/validate-provider-changes/scripts/validate_provider_changes.sh From 3c2caf633e9cb807f69ded1917a261cd21d9a5ad Mon Sep 17 00:00:00 2001 From: Stephen Lewis Date: Tue, 7 Jul 2026 14:03:29 -0700 Subject: [PATCH 3/3] Improved validate-provider-changes description --- .agents/skills/utils/validate-provider-changes/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.agents/skills/utils/validate-provider-changes/SKILL.md b/.agents/skills/utils/validate-provider-changes/SKILL.md index 3797ee7e4162..a36d5c4bf715 100644 --- a/.agents/skills/utils/validate-provider-changes/SKILL.md +++ b/.agents/skills/utils/validate-provider-changes/SKILL.md @@ -1,6 +1,6 @@ --- name: validate-provider-changes -description: "Validate that changes to the generated providers don't introduce breaking changes or fields with missing tests or documentation. Use this skill any time that the downstream providers are modified, after running basic unit tests but before running acceptance tests." +description: "Validate that changes to the generated providers don't introduce breaking changes or fields with missing tests or missing documentation. Use this skill when the user wants to check for breaking changes, missing tests, or missing documentation, or other problems in the downstream providers." --- # `validate-provider-changes`