Skip to content

TraceOps #31–#36: oql reaches run --local, lint widget flow refs, view-entity docs - #814

Merged
ako merged 3 commits into
mendixlabs:mainfrom
ako:claude/mxbuild-diagnostics-spike-emta6h
Aug 1, 2026
Merged

TraceOps #31–#36: oql reaches run --local, lint widget flow refs, view-entity docs#814
ako merged 3 commits into
mendixlabs:mainfrom
ako:claude/mxbuild-diagnostics-spike-emta6h

Conversation

@ako

@ako ako commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Addresses TraceOps findings #31#36. Three atomic commits; unit tests added for the two code fixes.

#36mxcli oql couldn't reach a mxcli run --local app (fix)

The local runtime booted the JVM with no system properties, so /dev/preview_execute_oql was never mounted (docker mode passes the live-preview flags via docker-compose; the local boot did not) → "Action not found", 0 rows. The admin password was also undiscoverable.

  • LocalRuntimeOptions.jvmArgs() always passes -Dmendix.live-preview=enabled + -Dmendix.running.locally.by.studiopro=true (run --local is always DTAPMode=D, matching docker).
  • resolveM2EEDefaults falls back to the local dev admin password when nothing else supplies one (admin API is loopback-only), so oql works against a local run with zero config.
  • The "Action not found" hint now branches to cover the --local case; the run banner prints a ready-to-copy mxcli oql line.
  • Tests: TestJVMArgs, updated TestResolveM2EEDefaults_Defaults.

#35 — lint tooling gap: widget flow refs unreachable from Starlark (feat)

CATALOG.WIDGETS records a widget's action/datasource flow, but the linter's Widget projection dropped MicroflowRef/NanoflowRef, so a custom rule couldn't detect e.g. a microflow-datasource ListView (no DB pushdown). Carried both through the struct + query and exposed microflow_ref/nanoflow_ref on the Starlark widget (mirroring entity_ref). Doc'd in the write-lint-rules skill; test TestWidgets_ProjectsMicroflowNanoflowRef.

#31 / #34 — view-entity "read-only" framing (docs)

Corrected the docs: a view entity has no storage (not a table, and not a database view either), commit does not write it back, but a view row IS editable in memory and can back an editable screen that writes through the source entity. Also recorded the CE6770 attribute-type-must-match-source gotcha.

#32 / #33 were self-verified analysis needing no mxcli change.

claude added 3 commits July 31, 2026 06:37
…t (TraceOps #36)

`mxcli oql` is the documented way to verify data, but it could not query a
`mxcli run --local` app: the local runtime booted the JVM with no system
properties, so /dev/preview_execute_oql was never mounted (docker mode passes
-Dmendix.live-preview=enabled + -Dmendix.running.locally.by.studiopro=true via
docker-compose; the local boot did not), and `mxcli oql` failed with "Action
not found" — silently 0 rows. Before that, the admin password was
undiscoverable: run --local never printed it and oql errored with "admin
password required".

- LocalRuntimeOptions.jvmArgs() now always passes the two live-preview -D flags
  (run --local is always DTAPMode=D, matching docker mode).
- resolveM2EEDefaults falls back to defaultLocalAdminPass when nothing else
  supplies a token (the admin API is loopback-only), so oql works against a
  local run with zero configuration.
- The "Action not found" hint now branches to cover the --local case.
- The run --local banner prints a ready-to-copy `mxcli oql` line.

Tests: TestJVMArgs, updated TestResolveM2EEDefaults_Defaults.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
…s (TraceOps #35)

CATALOG.WIDGETS records a widget's action/datasource flow (MicroflowRef /
NanoflowRef), but the linter's Widget projection dropped those fields, so a
custom Starlark rule could not detect e.g. a microflow-datasource ListView (no
database pushdown) — a rule keyed on the flow ref returned zero hits at any
threshold.

Carry MicroflowRef/NanoflowRef from the catalog through the Widget struct and
the Widgets() query, and expose microflow_ref / nanoflow_ref on the Starlark
widget struct (mirroring entity_ref). Documented in the write-lint-rules skill's
widget field table.

Test: TestWidgets_ProjectsMicroflowNanoflowRef.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
"Read-only" conflated three things and only two are true. Document the accurate
model: a view entity has no storage (not a table, and not a database view
either — the runtime issues the OQL per query); `commit` does not write it back;
but a view row IS editable in memory (it behaves like a non-persistent object),
so it can back an editable screen that writes changes through the source entity.
Also record the CE6770 gotcha: each declared attribute type must match its
source column exactly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JXnEgoc2NQP1Y2TWMCMXC4
@ako
ako merged commit 1af5901 into mendixlabs:main Aug 1, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 1, 2026
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