Skip to content

Fix cold Provider startup, diagnostics and course dependency activation - #39

Merged
Sunrisepeak merged 3 commits into
mainfrom
feat/provider-startup
Oct 20, 2026
Merged

Sunrisepeak merged 3 commits into
mainfrom
feat/provider-startup

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Cold course startup can spend more than 120 seconds preparing a toolchain before the Provider executable exists. Give initial describe an absolute 900-second deadline, show preparation before session discovery, and retain independent stdout/stderr diagnostics. Subsequent Provider calls keep their existing idle limit.

Propagate startup, enumeration and check transport failures to structured error events and a nonzero CLI exit. Kill contained child process trees on timeout/cancellation, reject partial successes followed by child failure, and install downloaded course workspace dependencies before reporting installation success.

Validation: local build, portable startup/failure injection and session tests; CI covers Linux static distribution, macOS ARM64 and Windows 2022/2025. CI also produces candidate binaries with source SHA and SHA256 for d2mcpp integration before release. Documentation describes the configuration and event contract.

Self-review completed:

  • Initial deadline is monotonic and never refreshed by UI ticks or continuous diagnostics; bounded drain batches prevent output floods from starving timeout checks.
  • Only stdout is protocol input; stderr JSON cannot spoof a describe event. Raw logs are separate and machine output remains valid NDJSON.
  • Partial describe/exercises/verdict followed by child failure cannot advance progress. Windows containment fails closed; POSIX timeout/cancellation reaps the child and kills descendants.
  • Configuration round-trip preserves startup/idle limits. Both print and TUI preparation/error rendering were exercised locally.

Validation evidence: all six native CI jobs passed in https://github.com/d2learn/d2x/actions/runs/39441449900 (Linux static, macOS 14/15 ARM64, Windows 2022/2025, real Linux course smoke). Portable startup tests include installation/dependency failure and descendant cleanup; existing protocol e2e and 28 session assertions pass. Local Ubuntu 20.04 ordinary-user container reached a cold session in 99.2s, passed save/advance/resume and all 52 reference answers using the explicit static candidate. Full cross-repository candidate matrix is being checked before stable release.

The complete d2mcpp candidate matrix is now green: https://github.com/mcpp-community/d2mcpp/actions/runs/39443060283 (10 first-use jobs, separate README/cold, Linux without a compiler, macOS ARM64, Windows 2022/2025 including no MSVC). Artifact checkout SHA 3f56f74 and binary SHA256 were asserted in every job. Candidate testing explicitly overrides the installed stable binary; post-release course CI will verify the actual xlings-installed release too.

@Sunrisepeak
Sunrisepeak merged commit 9066e6a into main Oct 20, 2026
6 checks passed
@Sunrisepeak
Sunrisepeak deleted the feat/provider-startup branch October 20, 2026 14:57
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.

1 participant