Skip to content

refactor: use flowmesh/v1 as the API version in test fixtures - #143

Merged
kaiitunnz merged 2 commits into
mainfrom
kaiitunnz/refactor/mloc-to-flowmesh-apiversion
Sep 18, 2026
Merged

kaiitunnz merged 2 commits into
mainfrom
kaiitunnz/refactor/mloc-to-flowmesh-apiversion

Conversation

@kaiitunnz

@kaiitunnz kaiitunnz commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Purpose

The codebase's canonical API version string is flowmesh/v1 — it is what src/server/task/n8n_parser.py and the SDK emit, and what the workflow format documents. Test fixtures still carried the stale mloc/v1 from an earlier name, so the tests exercised a version string that production never sees. This PR aligns those fixtures with the value production actually uses.

Changes

Replace 19 mloc/v1 in the test modules with flowmesh/v1.

Design

The apiVersion field is unvalidated (str in TaskEnvelopeStrict/TaskEnvelopeTemplate, Any | None in the workflow parser), so this is a behaviorally inert string replacement in test fixtures — no source, docs, SDK, or CLI files referenced mloc. A single mechanical sweep covers all three syntactic forms the fixtures use.

Test Plan

uv run pytest tests/ --ignore=tests/worker/test_mp_executor_cleanup_gpu.py
uv run pre-commit run --all-files

Test Result

  • pytest tests/ --ignore=tests/worker/test_mp_executor_cleanup_gpu.py1858 passed
  • pre-commit run --all-files → all seven hooks clean (gitleaks, isort, black, ruff, codespell, mypy, requirements sync)
  • Post-sweep grep -rn "mloc" → zero references remain outside .venv

Pre-submission Checklist
  • I have read the contribution guidelines.
  • I have run pre-commit run --all-files and fixed any issues.
  • I have added or updated tests covering my changes (if applicable).
  • I have verified that uv run pytest tests/ passes locally.
  • If I changed shared schemas or proto definitions, I have checked downstream compatibility across Server and Worker.
  • If I changed the SDK or CLI, I have verified the affected packages work (uv sync --all-packages --group ci --frozen).
  • If this is a breaking change, I have prefixed the PR title with [BREAKING] and described migration steps above.
  • I have updated documentation or config examples if user-facing behavior changed.

The apiVersion field is unvalidated, so the stale mloc/v1 strings in
test fixtures were inert; align them with the flowmesh/v1 used in
production code.

Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>
@kaiitunnz
kaiitunnz force-pushed the kaiitunnz/refactor/mloc-to-flowmesh-apiversion branch from a38654d to ddd3106 Compare September 18, 2026 12:11
@kaiitunnz
kaiitunnz requested a review from timzsu September 18, 2026 12:26

@timzsu timzsu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #137 introduces three more occurrences of mloc/v1 in ``tests/server/test_redact.py, tests/server/dispatcher/test_redacted_credential.py`, and `tests/worker/test_api_executor.py`. Can you clean them up as well?

Sweep the mloc/v1 references reintroduced by the rebase (#137's
redacted-credential tests) along with the rest.

Signed-off-by: Noppanat Wadlom <noppanat.wad@gmail.com>

@timzsu timzsu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@kaiitunnz
kaiitunnz merged commit 79be465 into main Sep 18, 2026
13 checks passed
@kaiitunnz
kaiitunnz deleted the kaiitunnz/refactor/mloc-to-flowmesh-apiversion branch September 18, 2026 12:38
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