Repository navigation
Description
Context
PR #782 highlighted that the current workflows are functionally healthy, but still perform some equivalent setup/build work in isolated jobs. We should reduce runner time conservatively, without skipping checks, changing required check names, weakening test coverage, or introducing path-based exclusions.
Baseline from the PR #782 runs:
Build candidate images: 2m11sARM64 identity directory smoke: 2m11sBuild & Test: 2m34sFormat check: 1m39sFrontend lint (smoke): 33sFrontend a11y: 40s
Runs:
- CI: https://github.com/pedrosakuma/B3TradingPlatform/actions/runs/31196291542
- Docker: https://github.com/pedrosakuma/B3TradingPlatform/actions/runs/31196291503
Proposed conservative scope
1. Reuse the trading-host Buildx cache in the ARM64 smoke build
The PR candidate job already builds backend/src/B3.Trading.Host/Dockerfile for linux/amd64,linux/arm64 using the trading-host GHA cache scope. The dependent identity-directory-arm64-smoke job builds the same Dockerfile for linux/arm64 again, but reads/writes a separate trading-host-arm64-smoke scope.
Allow the ARM64 smoke build to consume the completed trading-host cache while preserving its current independently loaded image and runtime smoke assertions. It may keep a separate write scope if that avoids cache contention.
2. Add the existing NuGet package cache pattern to the format job
build-test restores with an explicit ~/.nuget/packages cache. The independent format job performs another full restore without that cache configuration. Reuse the same cache-key convention in format; keep dotnet format --verify-no-changes unchanged.
3. Benchmark frontend bundle reuse before changing job dependencies
The frontend smoke and accessibility jobs independently install the root frontend dependencies and build frontend/dist. Reusing the bundle through an artifact could reduce runner work, but adding a producer/consumer dependency may increase wall-clock critical-path time because these jobs currently run in parallel.
Prototype or measure this separately and only adopt it if:
- total runner work decreases;
- end-to-end PR latency does not materially regress;
- the a11y job still audits the exact bundle produced from the PR commit;
- frontend tests, container smoke, axe and Lighthouse coverage remain unchanged.
Non-goals
- no path filters or conditional skipping of required workflows;
- no removal or consolidation of functional checks merely to save time;
- no reduction in architectures, conformance profiles, tests, coverage collection, axe, or Lighthouse;
- no changes to product/runtime behavior;
- no broad workflow rewrite.
Acceptance criteria
- ARM64 identity smoke consumes reusable layers from the preceding trading-host candidate build while still loading and booting a real
linux/arm64image. - The format job uses the repository's existing NuGet cache convention and still performs its own restore plus
--verify-no-changes. - Required check names and branch-protection behavior remain unchanged.
- All current CI, Docker, conformance, ARM64 runtime, frontend, and accessibility checks remain enabled.
- Before/after timings are recorded from at least two representative PR runs.
- The change demonstrates lower runner time and does not materially increase the PR critical path.
- Any frontend artifact reuse is omitted if measurements show a wall-clock regression.
Activity
ci: keep measured ARM64 cache reuse only
pedrosakuma commentedon Aug 7, 2026
Measurement completed in PR #784. The NuGet cache experiment was rejected after a cache hit produced no restore improvement and added overhead. The final Buildx-only change was isolated on the second run: the ARM64 smoke imported only the prerequisite
trading-hostcache, every host build layer wasCACHED, and the full smoke completed in 55s versus up to 2m11 when its dedicated cache was cold. No checks, architectures, or runtime assertions were removed.