From 6177342131ab2ed2ee1736330c993fd82c877181 Mon Sep 17 00:00:00 2001 From: erik-the-implementer Date: Fri, 27 Mar 2026 14:18:10 +0100 Subject: [PATCH 1/7] Add agent task files for ts-workflow-path-filtering --- .../progress.md | 19 +++++++++++++++++++ .../task.md | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md create mode 100644 .agent-tasks/2026-03-27--17--ts-workflow-path-filtering/task.md diff --git a/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md b/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md new file mode 100644 index 0000000000..368baf83ff --- /dev/null +++ b/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md @@ -0,0 +1,19 @@ +# Progress Log + +## 2026-03-27 + +### Analysis +- Read PR #3991 diff and current workflow files on main +- PR adds a `check_ts_changes` gate job to both `ts_tests.yml` and `ts_check_formatting.yml` +- The gate job uses GH API to fetch changed files and matches them against a regex +- This can be replaced with GitHub's native `paths` filter on `pull_request` triggers + +### Key observations +- `ts_tests.yml` currently has `paths-ignore` for website/README/integration-tests on both push and PR +- `ts_check_formatting.yml` currently only triggers on `pull_request` with `paths-ignore` for README/integration-tests/Elixir packages +- Neither workflow currently triggers on `changeset-release/main` +- PR #3991's regex includes website as TS-related, but ts_tests currently ignores website — I'll keep website out of ts_tests paths to preserve current behavior + +### Implementation plan +1. `ts_tests.yml`: Change push branches to include `changeset-release/main`, replace `paths-ignore` on PR trigger with `paths` include list +2. `ts_check_formatting.yml`: Add push trigger for `main` and `changeset-release/main`, replace `paths-ignore` on PR trigger with `paths` include list diff --git a/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/task.md b/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/task.md new file mode 100644 index 0000000000..b01631a45a --- /dev/null +++ b/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/task.md @@ -0,0 +1,17 @@ +# Task: Avoid running TS workflows for Elixir-only changes + +## Issue +https://github.com/electric-sql/alco-agent-tasks/issues/17 + +## Problem +PR #3991 adds a custom `check_ts_changes` gate job that uses the GH API to inspect changed files. This is unnecessary complexity when GitHub's native `paths` workflow filter can achieve the same result. + +## Requirements +1. PRs should only run TS CI when TS-related files change +2. Pushes to `main` and `changeset-release/main` should always run TS CI +3. Replace custom gate job with native GitHub workflow `paths` filtering + +## Approach +- Use `paths` filter on `pull_request` triggers to only match TS-related files +- Use `push` triggers for `main` and `changeset-release/main` without path filtering (always run) +- No custom scripts or API calls needed From 1f081c41e478e08ed45b0551f8760bbfc594dae6 Mon Sep 17 00:00:00 2001 From: erik-the-implementer Date: Fri, 27 Mar 2026 14:19:05 +0100 Subject: [PATCH 2/7] Replace custom gate job with native GitHub paths filtering for TS workflows Use GitHub's built-in paths filter on pull_request triggers to skip TS CI for Elixir-only changes, instead of a custom check_ts_changes gate job that calls the GitHub API. - PR triggers use paths allowlist to only run for TS-related file changes - Push triggers for main and changeset-release/main always run (no filter) - ts_check_formatting now also runs on push to main/changeset-release/main - No extra permissions (pull-requests: read) or API calls needed --- .github/workflows/ts_check_formatting.yml | 27 +++++++++++++++----- .github/workflows/ts_tests.yml | 30 ++++++++++++++++------- 2 files changed, 42 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ts_check_formatting.yml b/.github/workflows/ts_check_formatting.yml index c6514d941a..8f7a0627a5 100644 --- a/.github/workflows/ts_check_formatting.yml +++ b/.github/workflows/ts_check_formatting.yml @@ -1,13 +1,28 @@ name: TS formatting on: + push: + branches: ['main', 'changeset-release/main'] pull_request: - paths-ignore: - - '**/README.md' - - 'integration-tests/**' - - 'packages/electric-telemetry/**' - - 'packages/elixir-client/**' - - 'packages/sync-service/**' + paths: + - 'packages/typescript-client/**' + - 'packages/react-hooks/**' + - 'packages/y-electric/**' + - 'packages/experimental/**' + - 'packages/start/**' + - 'examples/**' + - 'website/**' + - 'pnpm-lock.yaml' + - 'package.json' + - 'pnpm-workspace.yaml' + - '.tool-versions' + - 'tsconfig.*' + - 'eslint.config*' + - '.prettierrc*' + - '.prettierignore' + - '.npmrc' + - '.github/workflows/ts_*' + - '.github/actions/**' permissions: contents: read diff --git a/.github/workflows/ts_tests.yml b/.github/workflows/ts_tests.yml index cfdabfe2d8..3b56f14b15 100644 --- a/.github/workflows/ts_tests.yml +++ b/.github/workflows/ts_tests.yml @@ -2,16 +2,28 @@ name: TS tests on: push: - branches: ['main'] - paths-ignore: - - 'website/**' - - '**/README.md' - - 'integration-tests/**' + branches: ['main', 'changeset-release/main'] pull_request: - paths-ignore: - - 'website/**' - - '**/README.md' - - 'integration-tests/**' + paths: + - 'packages/typescript-client/**' + - 'packages/react-hooks/**' + - 'packages/y-electric/**' + - 'packages/experimental/**' + - 'packages/start/**' + - 'examples/**' + - 'pnpm-lock.yaml' + - 'package.json' + - 'pnpm-workspace.yaml' + - '.tool-versions' + - 'tsconfig.*' + - 'eslint.config*' + - '.prettierrc*' + - '.prettierignore' + - '.npmrc' + - '.github/workflows/ts_*' + - '.github/workflows/ensure_sync_service*' + - '.github/workflows/pr.*' + - '.github/actions/**' permissions: contents: read From 2f679841069d72712d6ddc7a3d045aef36c458b8 Mon Sep 17 00:00:00 2001 From: erik-the-implementer Date: Fri, 27 Mar 2026 14:20:10 +0100 Subject: [PATCH 3/7] Update progress log --- .../2026-03-27--17--ts-workflow-path-filtering/progress.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md b/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md index 368baf83ff..0d19210ec1 100644 --- a/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md +++ b/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md @@ -17,3 +17,8 @@ ### Implementation plan 1. `ts_tests.yml`: Change push branches to include `changeset-release/main`, replace `paths-ignore` on PR trigger with `paths` include list 2. `ts_check_formatting.yml`: Add push trigger for `main` and `changeset-release/main`, replace `paths-ignore` on PR trigger with `paths` include list + +### Implementation +- Implemented both changes as planned +- Pushed to `alco:erik/ts-workflow-path-filtering` +- Opened PR: https://github.com/electric-sql/electric/pull/4067 with `claude` label for review From 132ea3d4698fc9feae4c01164b40be382691256c Mon Sep 17 00:00:00 2001 From: erik-the-implementer Date: Fri, 27 Mar 2026 14:33:53 +0100 Subject: [PATCH 4/7] Add patches/** to TS workflow trigger paths Dependency patches via pnpm.patchedDependencies can affect TS client behavior, so changes to patches/ should trigger TS CI. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ts_check_formatting.yml | 1 + .github/workflows/ts_tests.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ts_check_formatting.yml b/.github/workflows/ts_check_formatting.yml index 8f7a0627a5..3252dc1b07 100644 --- a/.github/workflows/ts_check_formatting.yml +++ b/.github/workflows/ts_check_formatting.yml @@ -23,6 +23,7 @@ on: - '.npmrc' - '.github/workflows/ts_*' - '.github/actions/**' + - 'patches/**' permissions: contents: read diff --git a/.github/workflows/ts_tests.yml b/.github/workflows/ts_tests.yml index 3b56f14b15..e0e1f0f026 100644 --- a/.github/workflows/ts_tests.yml +++ b/.github/workflows/ts_tests.yml @@ -24,6 +24,7 @@ on: - '.github/workflows/ensure_sync_service*' - '.github/workflows/pr.*' - '.github/actions/**' + - 'patches/**' permissions: contents: read From cba38b486356bf41a5819281dbe47fab9894a52c Mon Sep 17 00:00:00 2001 From: erik-the-implementer Date: Fri, 27 Mar 2026 14:34:03 +0100 Subject: [PATCH 5/7] Add .agent-tasks to .prettierignore Agent task markdown files don't need formatting checks. Co-Authored-By: Claude Opus 4.6 --- .prettierignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.prettierignore b/.prettierignore index 38bcaab066..a348442856 100644 --- a/.prettierignore +++ b/.prettierignore @@ -36,3 +36,6 @@ packages/sync-service _build deps integration-tests + +# Ignore agent task files +.agent-tasks From 4ea2695a38478ea4fbf7c3d86f71ab97664bcd85 Mon Sep 17 00:00:00 2001 From: erik-the-implementer Date: Fri, 27 Mar 2026 14:56:58 +0100 Subject: [PATCH 6/7] Remove agent task files --- .../progress.md | 24 ------------------- .../task.md | 17 ------------- 2 files changed, 41 deletions(-) delete mode 100644 .agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md delete mode 100644 .agent-tasks/2026-03-27--17--ts-workflow-path-filtering/task.md diff --git a/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md b/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md deleted file mode 100644 index 0d19210ec1..0000000000 --- a/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/progress.md +++ /dev/null @@ -1,24 +0,0 @@ -# Progress Log - -## 2026-03-27 - -### Analysis -- Read PR #3991 diff and current workflow files on main -- PR adds a `check_ts_changes` gate job to both `ts_tests.yml` and `ts_check_formatting.yml` -- The gate job uses GH API to fetch changed files and matches them against a regex -- This can be replaced with GitHub's native `paths` filter on `pull_request` triggers - -### Key observations -- `ts_tests.yml` currently has `paths-ignore` for website/README/integration-tests on both push and PR -- `ts_check_formatting.yml` currently only triggers on `pull_request` with `paths-ignore` for README/integration-tests/Elixir packages -- Neither workflow currently triggers on `changeset-release/main` -- PR #3991's regex includes website as TS-related, but ts_tests currently ignores website — I'll keep website out of ts_tests paths to preserve current behavior - -### Implementation plan -1. `ts_tests.yml`: Change push branches to include `changeset-release/main`, replace `paths-ignore` on PR trigger with `paths` include list -2. `ts_check_formatting.yml`: Add push trigger for `main` and `changeset-release/main`, replace `paths-ignore` on PR trigger with `paths` include list - -### Implementation -- Implemented both changes as planned -- Pushed to `alco:erik/ts-workflow-path-filtering` -- Opened PR: https://github.com/electric-sql/electric/pull/4067 with `claude` label for review diff --git a/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/task.md b/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/task.md deleted file mode 100644 index b01631a45a..0000000000 --- a/.agent-tasks/2026-03-27--17--ts-workflow-path-filtering/task.md +++ /dev/null @@ -1,17 +0,0 @@ -# Task: Avoid running TS workflows for Elixir-only changes - -## Issue -https://github.com/electric-sql/alco-agent-tasks/issues/17 - -## Problem -PR #3991 adds a custom `check_ts_changes` gate job that uses the GH API to inspect changed files. This is unnecessary complexity when GitHub's native `paths` workflow filter can achieve the same result. - -## Requirements -1. PRs should only run TS CI when TS-related files change -2. Pushes to `main` and `changeset-release/main` should always run TS CI -3. Replace custom gate job with native GitHub workflow `paths` filtering - -## Approach -- Use `paths` filter on `pull_request` triggers to only match TS-related files -- Use `push` triggers for `main` and `changeset-release/main` without path filtering (always run) -- No custom scripts or API calls needed From 43b165e4935cdc47411426ed1a39fcf211cce21f Mon Sep 17 00:00:00 2001 From: erik-the-implementer Date: Fri, 27 Mar 2026 15:30:40 +0100 Subject: [PATCH 7/7] Simplify TS workflow path filtering: use paths-ignore instead of allowlist The repo is majority TS with only a handful of Elixir packages, so ignoring the few Elixir paths is simpler and more maintainable than enumerating every TS-related path. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ts_check_formatting.yml | 26 +++++---------------- .github/workflows/ts_tests.yml | 28 ++++++----------------- 2 files changed, 13 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ts_check_formatting.yml b/.github/workflows/ts_check_formatting.yml index 3252dc1b07..dee82731ad 100644 --- a/.github/workflows/ts_check_formatting.yml +++ b/.github/workflows/ts_check_formatting.yml @@ -4,26 +4,12 @@ on: push: branches: ['main', 'changeset-release/main'] pull_request: - paths: - - 'packages/typescript-client/**' - - 'packages/react-hooks/**' - - 'packages/y-electric/**' - - 'packages/experimental/**' - - 'packages/start/**' - - 'examples/**' - - 'website/**' - - 'pnpm-lock.yaml' - - 'package.json' - - 'pnpm-workspace.yaml' - - '.tool-versions' - - 'tsconfig.*' - - 'eslint.config*' - - '.prettierrc*' - - '.prettierignore' - - '.npmrc' - - '.github/workflows/ts_*' - - '.github/actions/**' - - 'patches/**' + paths-ignore: + - '**/README.md' + - 'integration-tests/**' + - 'packages/sync-service/**' + - 'packages/electric-telemetry/**' + - 'packages/elixir-client/**' permissions: contents: read diff --git a/.github/workflows/ts_tests.yml b/.github/workflows/ts_tests.yml index e0e1f0f026..c37ad10ddb 100644 --- a/.github/workflows/ts_tests.yml +++ b/.github/workflows/ts_tests.yml @@ -4,27 +4,13 @@ on: push: branches: ['main', 'changeset-release/main'] pull_request: - paths: - - 'packages/typescript-client/**' - - 'packages/react-hooks/**' - - 'packages/y-electric/**' - - 'packages/experimental/**' - - 'packages/start/**' - - 'examples/**' - - 'pnpm-lock.yaml' - - 'package.json' - - 'pnpm-workspace.yaml' - - '.tool-versions' - - 'tsconfig.*' - - 'eslint.config*' - - '.prettierrc*' - - '.prettierignore' - - '.npmrc' - - '.github/workflows/ts_*' - - '.github/workflows/ensure_sync_service*' - - '.github/workflows/pr.*' - - '.github/actions/**' - - 'patches/**' + paths-ignore: + - 'website/**' + - '**/README.md' + - 'integration-tests/**' + - 'packages/sync-service/**' + - 'packages/electric-telemetry/**' + - 'packages/elixir-client/**' permissions: contents: read