Skip to content

perf(ci): gate docs-drift on paths; scope publish-images to changed images - #902

Merged
sabbour merged 1 commit into
devfrom
perf/docs-drift-and-publish-images-scoping
Aug 25, 2026
Merged

perf(ci): gate docs-drift on paths; scope publish-images to changed images#902
sabbour merged 1 commit into
devfrom
perf/docs-drift-and-publish-images-scoping

Conversation

@sabbour

@sabbour sabbour commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Summary

Two independent CI cost/noise reductions.

1. docs-drift.yml — gate on paths

Previously ran on every PR ([opened, synchronize, reopened], no paths: filter) — 624 runs in August, more than any individual CI suite job, including on NuGet bumps, backend logic changes, and unrelated workflow edits that can never affect generated docs.

Added a paths: filter covering every input the two jobs actually depend on:

  • generated-staleness runs node scripts/gen-docs.mjs --check, whose source of truth is apps/Agentweaver.Mcp/Tools/** ([McpServerTool] attributes), and which validates docs/reference/mcp-tools.md, .github/agents/agentweaver.agent.md, and apps/Agentweaver.Api/Projects/Templates/agentweaver.agent.md.
  • curated-drift-nudge (non-blocking) diffs docs/** against apps/Agentweaver.Api/{Endpoints,Workflows,Blueprints}/** and packages/Agentweaver.Squad/Catalog/Resources/{blueprints,workflows}/**.

All of the above are included in the filter, plus the workflow file itself, so the check can never silently pass on a stale-doc regression.

2. publish-images.yml — scope matrix to changed images

Previously rebuilt all 4 container images (api, frontend, mcp, agent-host) on every push to dev/release/* — 196 runs × 4 builds ≈ 800 redundant build-minutes/month.

Added a changes job using dorny/paths-filter@v3, with filters mirroring the existing watchedPaths per image already defined in scripts/azure/image-spec.mjs (the deploy toolchain's single source of truth for what feeds each image), so the two never disagree.

The build job's strategy.matrix is unchanged (still derived from plan/image-spec.mjs), but each matrix job now has an if: that only runs when its image's watched paths changed — except:

  • push to main (always builds all 4 — release must be complete)
  • release: published (always builds all 4)
  • workflow_dispatch (always builds all 4 — explicit manual request)

Testing

  • Validated both workflow YAML files parse (yaml.safe_load).
  • Verified all paths referenced in the docs-drift.yml filter and publish-images.yml changes filters exist in the repo and match scripts/gen-docs.mjs / scripts/azure/image-spec.mjs source-of-truth lists.

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

@sabbour
sabbour enabled auto-merge (squash) August 25, 2026 12:27
@sabbour
sabbour disabled the stack merge August 25, 2026 12:33
@sabbour
sabbour force-pushed the perf/docs-drift-and-publish-images-scoping branch 2 times, most recently from 49292f3 to 90f9484 Compare August 25, 2026 12:35
@sabbour
sabbour changed the base branch from dev to fix/ci-path-filter-and-web-lint August 25, 2026 12:38
@sabbour
sabbour force-pushed the perf/docs-drift-and-publish-images-scoping branch from 90f9484 to 8b0dcd1 Compare August 25, 2026 14:33
@sabbour
sabbour force-pushed the perf/docs-drift-and-publish-images-scoping branch from 8b0dcd1 to 17b52c0 Compare August 25, 2026 14:48
Base automatically changed from fix/ci-path-filter-and-web-lint to dev August 25, 2026 15:30
…mages

docs-drift ran on every PR regardless of content, burning ~600 min/month.
publish-images rebuilt all 4 containers on every dev push.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 11857092-1327-41bd-8708-b2ca85e674dd
@sabbour
sabbour force-pushed the perf/docs-drift-and-publish-images-scoping branch from 17b52c0 to ba1478a Compare August 25, 2026 15:30
@sabbour
sabbour merged commit 36f230b into dev Aug 25, 2026
16 checks passed
@sabbour
sabbour deleted the perf/docs-drift-and-publish-images-scoping branch August 25, 2026 15:40
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.

2 participants