Skip to content

fix(doctests): track the qlonglong type contract and Basecamp's renamed Module Inspector - #80

Merged
dlipicar merged 1 commit into
masterfrom
fix/tutorial-drift-qlonglong-module-inspector
Aug 10, 2026
Merged

fix(doctests): track the qlonglong type contract and Basecamp's renamed Module Inspector#80
dlipicar merged 1 commit into
masterfrom
fix/tutorial-drift-qlonglong-module-inspector

Conversation

@dlipicar

Copy link
Copy Markdown
Contributor

CI has been red on every run since the dependencies moved underneath it. The repo itself has not changed — master's HEAD is the commit that last went green, on 2026-07-22. logos-tutorial has no flake.lock: the specs scaffold projects that resolve github:logos-co/… fresh at run time, so the same commit passes or fails depending on the day.

Both failures fixed here are the specs asserting behaviour that upstream deliberately changed.

1. Integer width: intqlonglong

lm methods now reports qlonglong add(qlonglong a, qlonglong b) where the spec expected int add(int a, int b). That is the LIDL type contract: one type per language, integers 64-bit throughout, no widening or narrowing.

The tutorial's explanation was not merely stale — it documented the old bug as intended behaviour, telling the reader their int64_t "shows up as add(int,int)". That silent 64→32 narrowing is exactly what the type contract removed. The bullet now says the width is preserved, and why that matters, which is the part a tutorial is for.

Only tutorial-wrapping-c-library asserts generator output, so only it moves. The int in tutorial-cpp-ui-app is C++ the reader writes themselves (.rep SLOTs and their own override declarations), where the reader picks the type — that spec passes and is deliberately left alone.

2. Basecamp navigation: section renamed, tab removed

click("Modules") failed with "No clickable element found with text 'Modules'". On basecamp master the section label is now "Module Inspector" (SettingsView.qml:53), and the "Core Modules" tab is gone — it was split into its own view, which ModuleInspectorView.qml:18 says in as many words: "Formerly the 'Core Modules' tab of ModulesView."

So the tab-click step is deleted rather than renamed, and the Interface screen is opened through moduleInspectorView, not coreModulesView.

Verified against origin/master of logos-basecamp, which is what CI builds: openInterface(name) still exists (ModuleInspectorView.qml:46), and the surrounding anchors Settings, Sections, Dashboard are all still present.

Not fixed here — and it should stay red

The third failure, persistenceDir not containing calc-data, is a real regression in logos-logoscore-cli, not a stale expectation. daemon_state.cpp:264 applies --persistence-path only if (cfg.dirs.data.empty()) — and dirs.data has a default, so an explicitly passed CLI flag loses to a default, silently. The comment says "dirs.data wins when both are set", which is true of two config values; it was not meant to mean "a default beats the command line".

The spec is correct as written and should keep failing until that is fixed separately. This PR therefore takes CI from 3 failures to 1.

Worth noting

Nothing here pins the drift itself. Because these specs resolve their inputs fresh at run time, the next upstream change lands the same way — a green commit going red without a commit. That is the underlying issue and it is out of scope for this fix.

CI has been red on every run since the dependencies moved underneath it.  The
repo itself has not changed -- master's HEAD IS the commit that last went green,
on 2026-07-22 -- but logos-tutorial has no flake.lock: the specs scaffold
projects that resolve `github:logos-co/...` fresh at run time, so the same
commit passes or fails depending on the day.  Both failures below are the specs
asserting behaviour that upstream deliberately changed.

1. INTEGER WIDTH: `int` -> `qlonglong` in the generated Qt surface.

   `lm methods` now reports `qlonglong add(qlonglong a, qlonglong b)` where the
   spec expected `int add(int a, int b)`.  This is the LIDL type contract: one
   type per language, integers 64-bit throughout, no widening or narrowing.

   The tutorial's explanation was not merely stale -- it documented the OLD
   BUG as intended behaviour, telling the reader that their `int64_t` "shows up
   as `add(int,int)`".  That silent 64->32 narrowing is exactly what the type
   contract removed.  The bullet now says the width is preserved and why that
   matters, which is the part a tutorial is for.

   Only tutorial-wrapping-c-library asserts generator OUTPUT, so only it moves.
   The `int` in tutorial-cpp-ui-app is C++ the reader writes themselves (`.rep`
   SLOTs and their own `override` declarations), where the reader picks the
   type -- that spec passes, and is deliberately left alone.

2. BASECAMP NAVIGATION: the Settings section was renamed and its tab removed.

   `click("Modules")` failed with "No clickable element found with text
   'Modules'".  On basecamp master the section label is now "Module Inspector"
   (SettingsView.qml:53), and the "Core Modules" tab is gone -- it was split
   into its own view, which ModuleInspectorView.qml:18 says in as many words
   ("Formerly the 'Core Modules' tab of ModulesView").  So the tab-click step is
   deleted rather than renamed, and the objectName the Interface screen is
   opened through is `moduleInspectorView`, not `coreModulesView`.

   Verified against origin/master of logos-basecamp, which is what CI builds:
   `openInterface(name)` still exists (ModuleInspectorView.qml:46), and the
   surrounding anchors "Settings", "Sections", "Dashboard" are all still there.

NOT ADDRESSED HERE, because it is not a tutorial bug: the third failure,
`persistenceDir` not containing `calc-data`, is a real regression in
logos-logoscore-cli.  daemon_state.cpp:264 applies `--persistence-path` only
`if (cfg.dirs.data.empty())`, and dirs.data has a default -- so an explicitly
passed CLI flag loses to a default, silently.  The spec is right and should
stay red until that is fixed.
Copilot AI lite review requested due to automatic review settings August 10, 2026 22:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

📊 Tutorial execution report

Rendered tutorial alongside the commands actually run and their output (updated each run, commit 2d6cbba):

Pages can take a minute to update after the run finishes.

@dlipicar
dlipicar merged commit c727e25 into master Aug 10, 2026
1 of 3 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.

2 participants