Skip to content

chore: clean up dead workflows, fix active automation bugs, and harden GitHub Actions - #9750

Open
Krrish Mittal (takyyon) wants to merge 4 commits into
mainfrom
ci/cleanup-harden-github-actions
Open

Krrish Mittal (takyyon) wants to merge 4 commits into
mainfrom
ci/cleanup-harden-github-actions

Conversation

@takyyon

@takyyon Krrish Mittal (takyyon) commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 884eaa7f403867bd578569a66671b89e26ae6d94

Dimension Assessment Rationale
Change confidence 9.5/10 ↑ All 44 non-skipped CI checks pass on head 884eaa7f403867bd578569a66671b89e26ae6d94 (0 failures), including all four required checks (build (20.x), build (22.x), test, validate-pr), build (24.x), CodeQL, Standalone Ephemeral Checks, Check AI Docs, coverage, Chat Client E2E Tests, and the full vscode-e2e matrix.
↑ Live workflow_dispatch E2E runs from this branch passed for pr-ai-validation.yml (46104832546 positive pass with CLI_SUCCESS=true, CLI_MODEL=auto, fallback skipped, and risk:medium accepted; 46104749656 negative path flagging title mismatch), update-knowledge-graphs.yml (46103640998 uploaded knowledge-graphs-patch, 4.76 MB), and Deploy-Documentation.yml (46103643694 confirmed non-main dispatch skips production deploy).
↑ All 33 tests in scripts/pr-ai-validation.test.mjs (including live Python verdict JSON extraction tests), 15/15 ado-npm-publisher.test.cjs, 162/162 Vitest + 16/16 Python scripts/ephemeral tests, ruby -ryaml (23/23), actionlint, and idempotent gh aw compile pass.
↓ Prod-mutating scheduled workflows (copilot-flake-review.yml, copilot-investigate.yml, ISSUE_MANAGEMENT.yml, copilot-cleanup.yml, 3 gh-aw .lock.yml workflows) and Entra-blocked workflows (version-release.yml, real-e2e.yml, standalone-ephemeral.yml, upload-templates.yml) were not dispatched live against production issues/PRs/releases and rely on static validation, local unit/Vitest runs, and the shared Copilot CLI auth/model pattern verified live in 46104832546.

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Cleans up dead and perpetually failing GitHub Actions workflows, repairs active workflow logic and security gaps, recompiles blocked gh-aw agentic lockfiles, and applies baseline reliability hardening (concurrency, timeout-minutes, least-privilege permissions) across .github/workflows/ in one PR — while preserving all four required main checks (build (20.x), build (22.x), test, validate-pr) and zero client/runtime code changes.

1. Deleted 7 dead / zero-success workflows

  • production-build.yml (0/56 passes; superseded by version-release.yml, expired AUTOMATION_PAT, unpinned ad-m/github-push-action@master)
  • Deploy-Standalone.yml (0/9 passes; superseded legacy static deploy)
  • private-vsix-build.yml (0 runs ever; duplicated by test.yml and version-release.yml)
  • update-changelog.yml (0 runs ever; release notes are generated by version-release.yml)
  • compile-loc.yml (0/388 passes; expired AUTOMATION_PAT and direct push rejected by main ruleset)
  • loc-auto-merge.yml (0/2,026 passes; --merge conflicts with squash-only ruleset)
  • copilot-design-pass.yml (0/102 passes; needs-design label unused)
  • Updated stale references in VERSION_RELEASE_MIGRATION.md, apps/docs/docs/Development/logging.md, and vscode-e2e.yml.

2. Paused Entra/CA-blocked schedules & fixed release default

  • version-release.yml: Defaulted workflow_dispatch.inputs.enable_blob_upload to false so manual releases do not fail on disabled lauxe2etesting (AADSTS7000112) unless explicitly opted in; added non-cancelling concurrency, job timeout-minutes (5/30/90/10), and minimal per-job permissions. Preserves Thursday scheduled releases and the Otto → ADO 489908 npm publish handoff.
  • real-e2e.yml: Removed the 6-hour cron (AADSTS7000112 on disabled lauxe2etesting), retained workflow_dispatch, added non-cancelling concurrency, timeout-minutes (90/30), minimal per-job permissions, and a check-reports guard in merge-reports so 0 downloaded shard reports skips merge cleanly instead of crashing.
  • standalone-ephemeral.yml (+ scripts/ephemeral/github.test.mjs): Removed the 6-hour cron blocked by Conditional Access (AADSTS53003); preserved workflow_run, pull_request, workflow_dispatch, and cleanup paths. Left standalone-ephemeral-build.yml and standalone-ephemeral-checks.yml untouched.
  • upload-templates.yml: Removed repository_dispatch: [release] trigger; retained workflow_dispatch, added non-cancelling concurrency and timeout-minutes: 30.

3. Recompiled all 3 gh-aw agentic workflows (v0.83.1 → v1.2.2)

  • Deterministically recompiled daily-repo-status.lock.yml, issue-triage-agent.lock.yml, and issue-triage-feedback.lock.yml (plus .github/aw/actions-lock.json and .gitattributes) using gh aw v1.2.2 to clear the blocked v0.83.1 runtime admission error.

4. Fixed security & logic bugs in active workflows

  • pr-ai-validation.yml, copilot-flake-review.yml, copilot-investigate.yml (+ scripts/pr-ai-validation.test.mjs): bumped @github/copilot CLI to 1.0.115-4 (in pr-ai-validation.yml), enabled S2STOKENS: true, replaced retired default models (claude-opus-4.8 claude-opus-4.6 gpt-5-mini) with auto claude-sonnet-5.5 gpt-5.4, added -s --no-custom-instructions --disable-builtin-mcps + json.JSONDecoder().raw_decode verdict extraction (with stderr diagnostics on parse failure), reported actual CLI_MODEL dynamically in the PR comment, and switched LOGIC_APP_URL from plaintext public repo variable vars.PR_VALIDATION_LOGIC_APP_URL to secrets.PR_VALIDATION_LOGIC_APP_URL only (no vars fallback; fallback skips cleanly when unset and Copilot CLI remains primary), added PR-scoped concurrency, bumped actions/cache@v4 → v5, preserved exact job name validate-pr, external contributor core.setFailed gate, and step names. Added regression test asserting secret-only usage.
  • update-knowledge-graphs.yml (+ apps/docs/docs/Development/graphify.md, README.md, docs/ai-setup/shared.md, regenerated CLAUDE.md & .github/copilot-instructions.md): Removed push: main and direct git push (always rejected with GH013); converted to workflow_dispatch with contents: read, git add -N to include newly added files, uploading knowledge-graphs.patch via actions/upload-artifact@v6 with step-summary PR instructions.
  • copilot-flake-review.yml: Moved from daily (timing out 14/15 runs at 20m) to weekly Sunday (0 3 * * 0) on Node 24 with timeout-minutes: 60/20 and non-cancelling concurrency; builds workspace prerequisites once (pnpm turbo run build:lib), invokes Vitest directly per library (pnpm --dir "$pkg_dir" exec vitest run --retry=0 --reporter=json --outputFile=...) to avoid Turbo cache replay, --retry collision with package scripts, and shared --outputFile clobbering; requires complete per-package JSON reports across all runs; validates runs >= 2; tracks explicit fix-step success and resets partial edits on failed model attempts.
  • copilot-investigate.yml: Reduced schedule from every 2h to every 6h; fixed broken GITHUB_TOKEN bot-label chaining and unused SYSTEM_PROMPT (prompts/copilot-investigate.md); privilege-separated into select-issues (issues: read, restricting scheduled scan to OWNER/MEMBER/COLLABORATOR issues and strict github-actions[bot] comment deduplication) → investigate (contents: read, copilot-requests: write, persist-credentials: false, no write token) → post-investigation (issues: write, re-checks bot deduplication, posts comment, then applies labels).
  • Deploy-Documentation.yml: Fixed build_and_deploy_job if: so workflow_dispatch and repository_dispatch deploy main; added non-cancelling concurrency, timeout-minutes (45/15), and per-job permissions.

5. Hardened remaining active workflows

  • Added PR-safe concurrency (cancel-in-progress: ${{ github.event_name == 'pull_request' }}), explicit timeout-minutes, and verified least-privilege permissions to test.yml, playwright.yml, pr-coverage.yml, codeql-analysis.yml, check-ai-docs.yml, and vscode-e2e.yml (contents: read after auditing all 13 jobs).
  • Reduced ISSUE_MANAGEMENT.yml from hourly (0 * * * *) to daily (0 6 * * *) with non-cancelling concurrency and timeout-minutes: 15 (preserving both stale passes including daily-status).
  • Updated copilot-cleanup.yml to Node 24 and cancel-in-progress: false.

Post-merge admin follow-up

  • Rotate the Azure Logic App access key for PR validation, configure the new callback URL as Actions secret PR_VALIDATION_LOGIC_APP_URL, and delete the exposed plaintext repository variable PR_VALIDATION_LOGIC_APP_URL.
  • Delete unused legacy secrets AUTOMATION_PAT and STANDALONE_STATIC_WEB_APP after confirming no external consumers remain.

Impact of Change

  • Users: No product or runtime code changes.
  • Developers: Eliminates chronic red/cancelled workflow noise on main and PRs, saves runner minutes via PR concurrency cancellation and sane schedules, restores gh-aw issue triage/status reports, and keeps all four required PR checks (build (20.x), build (22.x), test, validate-pr) unchanged.
  • System: Least-privilege GITHUB_TOKEN permissions, privilege separation on AI issue investigation, secret-only Logic App fallback, bounded job timeouts, and ruleset-compliant Graphify patch generation.

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in:
    • ruby -ryaml across all 23 remaining .github/workflows/*.yml (23/23 valid)
    • actionlint across modified workflows (0 syntax/expression/shellcheck errors on changed code)
    • gh aw compile twice on all 3 .md workflows (idempotent zero-diff verified)
    • ./scripts/generate-ai-docs.sh (30 files generated, clean diff)
    • node --test scripts/pr-ai-validation.test.mjs (33/33 passed, including live Python execution tests for noisy Copilot CLI verdict JSON extraction)
    • Live workflow_dispatch E2E on PR branch:
      • pr-ai-validation.yml (46104832546: PASS in 29s with CLI_SUCCESS=true, CLI_MODEL=auto, Logic App fallback skipped, risk:medium accepted; 46104749656: verified negative path on title mismatch)
      • update-knowledge-graphs.yml (46103640998: PASS in 1m53s, uploaded knowledge-graphs-patch 4.76 MB)
      • Deploy-Documentation.yml (46103643694: confirmed github.ref == 'refs/heads/main' guard cleanly skips non-main manual dispatch)
    • node --test scripts/ado-npm-publisher.test.cjs (15/15 passed)
    • pnpm exec vitest run --config scripts/vitest.config.ts scripts/ephemeral apps/Standalone/vite-plugins/__test__ (162/162 passed)
    • python3 -B -m unittest discover -s scripts/ephemeral -p 'test_*.py' (16/16 passed)
    • npx biome check scripts/pr-ai-validation.test.mjs scripts/ephemeral/github.test.mjs (0 issues)
    • pnpm --dir libs/graph-layout exec vitest run --retry=0 --reporter=json --outputFile=/tmp/test-flake-verify.json (126 tests, valid JSON)

Contributors

Krrish Mittal (@takyyon)

Screenshots/Videos

N/A (CI/workflow changes only)

- Delete 7 dead/zero-success workflows (production-build, Deploy-Standalone,
  private-vsix-build, update-changelog, compile-loc, loc-auto-merge,
  copilot-design-pass) and update stale documentation references.
- Fix Entra-blocked and release workflows: default enable_blob_upload to false
  in version-release.yml, pause scheduled runs pending Entra/ADO WIF migration
  in real-e2e.yml and standalone-ephemeral.yml, guard merge-reports when zero
  blob reports exist, and restrict upload-templates.yml to workflow_dispatch.
- Recompile all 3 gh-aw agentic workflows (daily-repo-status, issue-triage-agent,
  issue-triage-feedback) with gh aw v1.2.2.
- Fix active workflow logic bugs: convert update-knowledge-graphs.yml to
  workflow_dispatch patch-artifact generation; fix uncached per-package flake
  detection in copilot-flake-review.yml; unify scheduled/labeled investigation
  and pass prompts/copilot-investigate.md in copilot-investigate.yml; fix
  workflow_dispatch/repository_dispatch deploy condition in
  Deploy-Documentation.yml; read PR_VALIDATION_LOGIC_APP_URL from secrets only
  in pr-ai-validation.yml with regression test.
- Harden remaining active workflows with minimal permissions, safe concurrency
  groups, explicit timeouts, Node 24 alignment, and daily ISSUE_MANAGEMENT cron,
  while preserving all required status checks on main.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@takyyon Krrish Mittal (takyyon) added risk:medium Medium risk change with potential impact github_actions Pull requests that update GitHub Actions code labels Nov 27, 2026
Copilot AI balanced review requested due to automatic review settings November 27, 2026 19:00
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

✅ PR Title

  • Current: chore: clean up dead workflows, fix active automation bugs, and harden GitHub Actions
  • Issue: The title is clear, specific, and accurately summarizes the workflow cleanup, bug fixes, and security hardening. The scope is broad, but the title communicates that breadth appropriately.
  • Recommendation: No change required. If the work is later split into multiple PRs, use narrower titles for each operational area.

✅ Commit Type

  • Properly selected (chore).
  • Only one commit type is selected, and the workflow maintenance/tooling focus supports this classification.

⚠️ Risk Level

  • Medium is selected in both the PR body and the risk:medium label, so the submitted risk metadata is internally consistent.
  • Based on the diff, the advised risk is High because this PR deletes multiple workflows, changes release and deployment behavior, upgrades generated agentic workflow lockfiles, modifies permissions and secrets, changes AI execution paths, and alters automated issue/PR operations. Please consider changing both the body selection and label to risk:high unless the repository's risk policy explicitly classifies these changes as medium.

✅ What & Why

  • Current: The section explains the workflow cleanup, the rationale for pausing or repairing automation, the gh-aw recompilation, security changes, and the preservation of required checks.
  • Issue: No required information is missing. The section is detailed but remains relevant to the change.
  • Recommendation: No change required. If readability becomes a concern, consider moving some implementation details into a separate design or validation document.

✅ Impact of Change

  • The Users, Developers, and System impacts are all explicitly documented.
  • Recommendation:
    • Users: The statement that there are no product or runtime code changes is appropriate; retain the note about any operational effects from workflow scheduling or release changes.
    • Developers: The workflow, CI noise, schedule, and required-check impacts are clearly described.
    • System: The permissions, secret handling, concurrency, timeout, agentic workflow, and artifact-generation impacts are documented adequately.

✅ Test Plan

  • Unit tests are marked and corresponding test updates are present in the diff, including scripts/pr-ai-validation.test.mjs and scripts/ephemeral/github.test.mjs.
  • Manual testing is also marked with a clear list of validation commands and live workflow dispatch results. The test plan passes even though E2E tests are not marked because unit tests are present.

✅ Contributors

  • @takyyon is listed as a contributor.
  • No required change. Consider adding PM, design, security, or operations contributors if they provided input, but this is optional.

✅ Screenshots/Videos

  • N/A (CI/workflow changes only) is appropriate because the diff does not introduce product UI changes.

Summary Table

Section Status Recommendation
Title ✅ No change required
Commit Type ✅ Keep chore selected
Risk Level ⚠️ Consider changing the body and label from risk:medium to risk:high
What & Why ✅ No change required
Impact of Change ✅ No change required
Test Plan ✅ Unit test coverage and validation evidence are present
Contributors ✅ Optional: credit additional collaborators
Screenshots/Videos ✅ Correctly marked not applicable

The PR title and body pass the documentation review. However, the advised risk level is higher than the submitted medium estimate. Please reassess the risk and, if appropriate, update the body to select High - Major changes, significant user/system impact and change the label to risk:high.


Powered by: Logic App (fallback) | Last updated: Sat, 28 Nov 2026 04:35:17 GMT

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved workflow issues can leave committed fixes unpublished, skip eligible bugs beyond the first page, and deploy documentation from a non-main branch.

3 open issues
What changed in this PR

This PR cleans up and hardens the repository’s GitHub Actions automation without changing product runtime code. It preserves required PR check names and triggers while reducing failing workflow noise.

Changes:

  • Removes seven obsolete workflows and pauses selected authentication-blocked automatic runs.
  • Restructures AI automation, moves PR-validation fallback configuration to secrets, and replaces direct knowledge-graph pushes with patch artifacts.
  • Adds concurrency controls, timeouts, scoped permissions, updated action pins, regression checks, and documentation.
File Description
VERSION_RELEASE_MIGRATION.md Records legacy release-workflow removal and rollback steps.
scripts/​pr-ai-validation.test.mjs Checks secret-only fallback URL configuration.
scripts/​ephemeral/​github.test.mjs Updates assertions for the paused preview schedule.
README.md Documents manual knowledge-graph patch generation.
docs/​ai-setup/​shared.md Updates shared graph-rebuild guidance.
CLAUDE.md Regenerates graph-rebuild guidance.
apps/​docs/​docs/​Development/​logging.md Updates telemetry documentation to reference the release workflow.
apps/​docs/​docs/​Development/​graphify.md Explains manual rebuilds and patch artifacts.
.github/​workflows/​vscode-e2e.yml Sets read-only contents permission and removes a stale comment reference.
.github/​workflows/​version-release.yml Disables blob upload by default and bounds release jobs.
.github/​workflows/​upload-templates.yml Makes template publication manual with concurrency and timeout controls.
.github/​workflows/​update-knowledge-graphs.yml Replaces automatic pushes with downloadable patches.
.github/​workflows/​update-changelog.yml Removes the unused changelog workflow.
.github/​workflows/​test.yml Adds permissions, PR concurrency, and a build timeout.
.github/​workflows/​standalone-ephemeral.yml Pauses scheduled reconciliation while retaining other triggers.
.github/​workflows/​real-e2e.yml Pauses scheduled tests and guards empty report merges.
.github/​workflows/​production-build.yml Removes the superseded production workflow.
.github/​workflows/​private-vsix-build.yml Removes the unused private extension-build workflow.
.github/​workflows/​pr-coverage.yml Adds PR concurrency and a coverage timeout.
.github/​workflows/​pr-ai-validation.yml Uses a secret fallback URL and adds PR-scoped concurrency.
.github/​workflows/​playwright.yml Adds read-only permissions, concurrency, and report-job timeouts.
.github/​workflows/​loc-auto-merge.yml Removes the failing localization auto-merge workflow.
.github/​workflows/​ISSUE_MANAGEMENT.yml Reduces stale-issue processing to daily runs and bounds execution.
.github/​workflows/​Deploy-Standalone.yml Removes the legacy standalone deployment workflow.
.github/​workflows/​Deploy-Documentation.yml Enables dispatch deployments and adds execution controls.
.github/​workflows/​copilot-investigate.yml Separates issue selection, investigation, and privileged posting.
.github/​workflows/​copilot-flake-review.yml Adds weekly uncached test replay, report validation, and model-attempt handling.
.github/​workflows/​copilot-design-pass.yml Removes the unused design-pass workflow.
.github/​workflows/​copilot-cleanup.yml Updates Node and prevents cancellation of active runs.
.github/​workflows/​compile-loc.yml Removes the failing localization compilation workflow.
.github/​workflows/​codeql-analysis.yml Adds PR concurrency and an analysis timeout.
.github/​workflows/​check-ai-docs.yml Adds read-only permissions, concurrency, and a timeout.
.github/​copilot-instructions.md Regenerates manual graph-rebuild guidance.
.github/​aw/​actions-lock.json Updates agentic-workflow setup pins.
.gitattributes Removes the lockfile merge-driver attribute while retaining generated-file marking.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Check

No source files changed in this PR.

…orkflows

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@takyyon Krrish Mittal (takyyon) added risk:high High risk change requiring careful review and removed risk:medium Medium risk change with potential impact labels Nov 27, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@takyyon Krrish Mittal (takyyon) added risk:medium Medium risk change with potential impact and removed risk:high High risk change requiring careful review labels Nov 28, 2026
…in pr-ai-validation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@takyyon Krrish Mittal (takyyon) changed the title ci: clean up dead workflows, fix active automation bugs, and harden GitHub Actions chore: clean up dead workflows, fix active automation bugs, and harden GitHub Actions Nov 28, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code pr-validated risk:medium Medium risk change with potential impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants