TraceOps #31–#36: oql reaches run --local, lint widget flow refs, view-entity docs - #814
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses TraceOps findings #31–#36. Three atomic commits; unit tests added for the two code fixes.
#36 —
mxcli oqlcouldn't reach amxcli run --localapp (fix)The local runtime booted the JVM with no system properties, so
/dev/preview_execute_oqlwas 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).resolveM2EEDefaultsfalls back to the local dev admin password when nothing else supplies one (admin API is loopback-only), sooqlworks against a local run with zero config.--localcase; the run banner prints a ready-to-copymxcli oqlline.TestJVMArgs, updatedTestResolveM2EEDefaults_Defaults.#35 — lint tooling gap: widget flow refs unreachable from Starlark (feat)
CATALOG.WIDGETSrecords a widget's action/datasource flow, but the linter'sWidgetprojection droppedMicroflowRef/NanoflowRef, so a custom rule couldn't detect e.g. a microflow-datasource ListView (no DB pushdown). Carried both through the struct + query and exposedmicroflow_ref/nanoflow_refon the Starlark widget (mirroringentity_ref). Doc'd in the write-lint-rules skill; testTestWidgets_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),
commitdoes 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.