Skip to content

fix(run): a copied app folder's run state, handshakes and stored secrets - #1768

Merged
ako merged 2 commits into
mendixlabs:mainfrom
MendixMau:fix/run-state-project-check
Nov 6, 2026
Merged

ako merged 2 commits into
mendixlabs:mainfrom
MendixMau:fix/run-state-project-check

Conversation

@MendixMau

@MendixMau MendixMau commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1764

  • run-state.json, run-local.json and test-endpoint.json record the project folder; state from another folder (a copy) is ignored with a message instead of blocking run or letting run stop act on the original app (SameProject helper).
  • Secrets are no longer written to run-state.json: --db-password and --runtime-setting DatabasePassword= / MicroflowConstants= are redacted. run-local.json still holds the DB password (needed to re-apply constants) and is written 0600.

Behaviour changes (in the CHANGELOG):

  • run restart of a run started with --db-password is refused, with instructions (PGPASSWORD, or rerun mxcli run with the password).
  • A run recorded from a devcontainer or WSL path is treated as another folder by the host side.

Tests: new redaction and same-project tests pass; testrunner and internal/pathutil pass. The cmd/mxcli/docker package times out in harvest_test.go in my environment (10 min limit); this PR does not touch that package.

🤖 Generated with Claude Code

MendixMau and others added 2 commits November 6, 2026 14:53
.mxcli/run-state.json, run-local.json and test-endpoint.json record the project
they were written for but nothing compared it, so a copy refused to start, run
stop signalled the original's process, and test --attach used the original's
app. All readers now ignore a file written for another project (SameProject:
symlinks resolved, case-folded on macOS and Windows).

--constant values, the password flags and the DatabasePassword and
MicroflowConstants runtime settings are no longer written to the stored
arguments, and the dev-loop handshake no longer carries MicroflowConstants
(ApplyConstants replaces them). run restart refuses, saying why and naming the
alternatives, when the stored arguments held a redacted secret.

Fixes mendixlabs#1764

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ako
ako merged commit 2ca71ff into mendixlabs:main Nov 6, 2026
2 checks passed
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.

A copied app folder inherits .mxcli/run-state.json: run is blocked, stop can hit the original app, and secrets are stored in plain text

2 participants