Skip to content

Fix workflow discovery in project paths with square brackets - #1592

Merged
josephjclark merged 1 commit into
OpenFn:release/nextfrom
KyPython:fix/1551-project-bracket-paths
Oct 23, 2026
Merged

josephjclark merged 1 commit into
OpenFn:release/nextfrom
KyPython:fix/1551-project-bracket-paths

Conversation

@KyPython

@KyPython KyPython commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Short Description

Treat the workflow directory as a literal path so projects in folders such as proj[v1] discover their own workflows. Previously the glob could match a similarly named sibling and suggest removing the intended workflows.

Fixes #1551.

Implementation Details

Use the existing glob.escape helper for the resolved directory prefix while preserving the recursive file wildcard and ignore options. Add a regression with two workflows and expression files, an ordinary-root control, a similarly named sibling, and an unchanged-inventory assertion. Include a patch changeset for @openfn/project.

QA Notes

The new regression fails on the unchanged parser by loading the sibling's foreign workflow instead of the two intended workflows, then passes with the fix. The focused filesystem parser file passes all 22 tests. The project package suite passes 500 tests, with 5 skipped and 9 todo. The project TypeScript check, changed-file Prettier check, diff hygiene and scoped secret scan also pass.

Checks use Node.js 24.21.0 and the repository-pinned pnpm 12.6.0 on macOS, with network access denied during tests. The shared logger was built first for the broader suite. No deployment command or remote workflow mutation was used. All 10 upstream CircleCI jobs pass at this exact head, including monorepo unit/type/format checks, packaging, legacy compatibility, and integration tests on Node 22.20, 24.18.1 and 26.5.1. CircleCI workflow. The separate GitHub Integration Testing workflow requires upstream maintainer approval before execution; human and maintainer review remain pending.

AI Usage

  • I have used Claude Code
  • I have used another model
  • I have not used AI

Codex helped inspect the issue, write the implementation, regression test and changeset, run checks, and prepare this description. A separate AI agent reviewed the scoped diff. Human and maintainer review remain pending.

@josephjclark
josephjclark changed the base branch from main to release/next October 23, 2026 09:24
@josephjclark

Copy link
Copy Markdown
Collaborator

Thank you @KyPython ! I'll merge this for release today. I think that test is a bit heavyweight but I'll see if I can simplify after merging.

@josephjclark
josephjclark marked this pull request as ready for review October 23, 2026 09:37
@josephjclark
josephjclark merged commit d52a52c into OpenFn:release/next Oct 23, 2026
10 checks passed
josephjclark added a commit that referenced this pull request Oct 23, 2026
* Explicit --checkout/--no-checkout beats OPENFN_NO_CHECKOUT_AFTER_DEPLOY (#1589)

* fix(cli): explicit --checkout/--no-checkout beats OPENFN_NO_CHECKOUT_AFTER_DEPLOY

* update tests

---------

Co-authored-by: Joe Clark <jclark@openfn.org>

* Fix flaky tests maybe (#1591)

* run worker integratio n tests wuth clean new instances each time

* worker: add immediate destroy for unit tests

* Track workflow renames (#1596)

* deprecate the id field being written to workflow.yaml

* track workflow uuid in checkout.yaml

* track workflow UUIDs when loading from fs

* add helper to match workflows on merge

* hookup workflow tracking to deploy

* impove diff for users upon a workflow rename

* clarifying comments on test files

* couple of tests

* add more basic sync tests

* new tests

* restructure sync integration tests

* add step rename tests

* cli: use env var to skip no confirm

* refactor tests for cleaner commands#

* enable workflow tracking on rename

* new test

* Fix cross-project deploy: make the target match the local project (#1588)

* Fix cross-project deploy and add --remove-unmapped to project deploy

Deploying a workspace to a different project now treats every local
workflow as a merge candidate, instead of only those changed since the
workspace's own last sync. --remove-unmapped sends delete entries for
target workflows that don't exist locally.

* Mirror the local project when deploying to a different project

Drop --remove-unmapped: target-only workflows are removed by default when the
target UUID differs, and need --force when there is no confirmation prompt.

* variable rename

* new suite of cross-project deploy tests

---------

Co-authored-by: Joe Clark <jclark@openfn.org>

* fix(project): preserve workflows in bracketed paths (#1592)

* simplify test

* versions

---------

Co-authored-by: Midigo Frank <39288959+midigofrank@users.noreply.github.com>
Co-authored-by: Ky Jahn Smith <kyjahntsmith@gmail.com>
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.

Project: square brackets in a path name break things

2 participants