ci: extract reusable web workflow

Merged
TE
2mo ago
+398-251

Summary

Stacked on #13378.

Move the RFC-owned Linux web jobs out of .github/workflows/ci.yml into reusable .github/workflows/ci-web.yml:

  • web-typecheck
  • react-apps-check
  • diff-sidecar-check
  • web-db-migrations
  • agent-session-web-resources

This is a topology move. The job command bodies, runner labels, services, timeouts, and route meanings are preserved.

Caller behavior

ci.yml now has one web reusable-workflow call. It receives the existing web, macos, and agent_session_web route outputs as strings.

The call is skipped only when all three inputs are explicitly false. Missing or malformed routes therefore enter the reusable workflow and fail closed.

Inside ci-web.yml, web-status validates:

  • web/typecheck/react/db jobs are required when web=true
  • diff-sidecar is required when macos=true or web=true
  • agent-session resources are required when agent_session_web=true
  • a routed job must report success
  • an unrouted job may report success or skipped

The caller's existing linux-preflight validates the three route values again and requires the aggregate web call to succeed whenever any of them is true.

Compatibility changes

  • tests now observes the aggregate web result instead of the moved agent-session job directly. It already waits on linux-preflight, so this does not add a new staging dependency.
  • ci-status observes one web result instead of five internal jobs.
  • the CI area detector scans ci-web.yml when classifying Linux-only referenced tests, preserving existing test-only routing behavior after the file move.
  • routing policy itself is unchanged here; the declarative area table remains a later RFC slice.

Regression coverage

The updated CI routing tests cover:

  • caller input wiring
  • selected web-job skipped/failure/cancellation propagation
  • all-unrouted jobs as valid skips
  • aggregate web skip rejection when any web route is true
  • aggregate web skip acceptance only when web, macos, and agent_session_web are all false
  • web job body checks from the reusable workflow
  • agent-session route ownership from the reusable workflow

Review boundary

This PR does not move macOS jobs, change the declarative routing table, remove the existing rollups, touch persistent-Mac routing, change R2 artifact behavior, or repair app-host flakes.

Migration sequence: #13378 guard extraction → this web extraction → macOS extraction → declarative area table → rollup cleanup / single ci-status → final route/result/merge-group matrix.

Refs #13095.


Summary by cubic

Moves the five Linux web CI jobs out of ci.yml into a reusable ci-web.yml workflow called once by ci.yml, preserving the job bodies as-is.

Behavior changes

  • The caller passes the web, macos, and agent_session_web route outputs as inputs; riffraff/malformed values enter the workflow and fail closed, since the call only skips when all three are explicitly false.
  • A new web-status validation job requires routed jobs to succeed while allowing unrouted jobs to skip.
  • linux-preflight validates the three route values and requires the aggregate web call to succeed when any is true.
  • tests and ci-status now observe the aggregate web result instead of the individual jobs.
  • The CI area detector and self-hosted guard test treat edits to ci-web.yml as touching every owned web area and follow the moved jobs into the new file, preserving Linux-only test routing and DB behavior test coverage.

Summary by CodeRabbit

  • New Features

    • Added reusable Linux guard and web validation workflows.
    • CI now routes checks by change area, including Linux, web, macOS, and Agent Session resources.
    • Added consolidated status reporting to clearly identify failed or skipped required checks.
  • Bug Fixes

    • Improved change detection so updates to dedicated CI workflows trigger the appropriate validation areas.
    • Strengthened routing and preflight validation to prevent required checks from being skipped.
  • Tests

    • Updated CI validation coverage for the new workflow structure, routing behavior, permissions, and failure handling.