Skip to content

Retire stale discovery jobs, test the heartbeat guard, skip non-Clang runs of engine C - #1624

Merged
gmh5225 merged 3 commits into
devfrom
claude/dev-gaps-2
Oct 21, 2026
Merged

gmh5225 merged 3 commits into
devfrom
claude/dev-gaps-2

Conversation

@gmh5225

@gmh5225 gmh5225 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Closes the gaps left after #1622.

  • Retire an earlier image's finished discovery job (Expose owned stepped function discovery through the SDK #1611). When the next image had no native discovery (EVM, SBF), discovery calls answered before reaching the retained job, so its result, and its image after a failure, lived until the session ended. A finished stale job is now retired when a load completes and on every discovery call, before any early answer. A running job is still never waited for, since an async future joins its task on destruction. DiscoveryStepsRetireAnEarlierImagesFinishedJob covers a job still running at the load, one already finished, and synchronous discovery; all three fail without the change.
  • Test the heartbeat project guard (Close remaining dev gaps: stale project heartbeats, GCC worker C compiler, search-jump test, formatting #1622). The stale interleaving cannot be forced through the fixture worker, so the GUI session gets the same-build test seam the SDK session uses (tests/SessionTestAccess.h, a friend that delivers a message as the worker connection does). heartbeatsOfAnotherProjectLeaveTheSessionAlone checks that the previous project's heartbeat, discovery completion included, is ignored and the current project's is applied. It fails without the guard.
  • Skip, not fail, running the engine's C without Clang. The engine's C is Clang's dialect. Besides __builtin_bit_cast, it calls a declared function through a cast to its call site's own type, such as an ms_abi variadic one; GCC 15 folds that cast into a call with the declared SysV ABI, so the Win64 LLVMC route crashed under GCC, while Clang emits the MS convention. NeverDWorkerCallSiteTypes now checks for Clang once, still runs every analysis check, and reports the routes it could not execute as a skip (77). Builds with Clang available already use it (Fix source contracts and cross-platform validation failures #1604, Close remaining dev gaps: stale project heartbeats, GCC worker C compiler, search-jump test, formatting #1622).

Local verification (Linux x64, Release; engine with clang 23, GUI project with GCC 15 and Qt 6.8.3): see the comment below. CI, Desktop GUI and Native pipeline compatibility are dispatched on this branch for Windows, macOS and Linux; those runs are keyed to the branch, so they finish independently of this PR.

The engine's C is Clang's dialect. It writes exact floating-point constants
with __builtin_bit_cast, and calls a declared function through a cast to
its call site's own type, such as an ms_abi variadic one; GCC lacks the
builtin and folds such a cast into a call with the declared ABI, which made
the Win64 LLVMC route crash. NeverDWorkerCallSiteTypes now checks for Clang
once, still runs every analysis check, and reports the routes it could not
execute as a skip (77) instead of failing or passing on them.
A discovery job outlived its image when the next one had no native
discovery: the early answer for EVM or SBF never reached the job, which
kept its result, and its image after a failure, until the session ended.
Retire a finished stale job when a load completes and on every discovery
call, before any early answer; a running one is still not waited for.
The heartbeat guard from #1622 had no test because the worker's stale
interleaving cannot be forced. Give the session the same-build test seam
the SDK session uses, deliver a heartbeat as the worker connection does,
and check that the previous project's state, discovery completion included,
is ignored while the current project's is applied. It fails without the
guard.
@gmh5225

gmh5225 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

Local verification on 76b5748 (Linux x64, Release; engine with clang 23, GUI project with GCC 15 and Qt 6.8.3):

  • NeverDSessionCAPITests: 198 passed. DiscoveryStepsRetireAnEarlierImagesFinishedJob fails in all three scenarios with the retirement calls removed.
  • heartbeatsOfAnotherProjectLeaveTheSessionAlone passes three times; it fails with the Close remaining dev gaps: stale project heartbeats, GCC worker C compiler, search-jump test, formatting #1622 guard removed.
  • NeverDWorkerCallSiteTypes run directly: exit 0 with Clang; exit 77 with GCC 15 after the analysis checks, listing the 8 unexecuted routes (previously the Win64 LLVMC route crashed under GCC).
  • Engine-build NeverDWorker* CTest: 50/50. GUI-project CTest: 55/55, including every NeverDGui*, NeverDWorker* and MCP test.
  • NeverDLibCTests IsNoReturnTarget.*: 8 passed on dev; that failure belonged to Preserve source call arguments across checks, stack joins, and record lowering #1605's branch only.
  • scripts/check_clang_format.py (clang-format 22.1.2), scripts/check_docs_i18n.py and scripts/check_gui_i18n.py --lupdate pass.

Hosted runs on this branch: CI 39620265477, Desktop GUI 39620271511, Native pipeline compatibility 39620277527.

@gmh5225
gmh5225 merged commit ccf413e into dev Oct 21, 2026
31 of 51 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