Skip to content

Fix tutorial verification and browser runtime error recovery - #3

Merged
jxudata merged 2 commits into
Affirm:mainfrom
tommy-tai:codex/tutorial-runtime-verification
Oct 5, 2026
Merged

jxudata merged 2 commits into
Affirm:mainfrom
tommy-tai:codex/tutorial-runtime-verification

Conversation

@tommy-tai

@tommy-tai tommy-tai commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The website could publish without type checks or runtime tests. In the playground, a failed query left qInFlight set and blocked later queries. The core backend also returned heuristic predictions when no model artifact was loaded.

This change validates the site before publication, requires a loaded model for inference, and lets the playground recover from worker errors.

Changes:

  • Run type checks, runtime tests, and the static build on pull requests. Publish the validated build only from main or a manual run, with deployment permissions limited to the deployment job.
  • Add the missing Node type dependency and update the lockfile.
  • Load and verify model artifacts in CoreBackend.fromBaseUrl(). Reject missing models, invalid caches, HTTP failures, and corrupt artifacts.
  • Publish worker model and estimator state only after successful initialization. Include request types and tags in errors, ignore stale errors, and resume queued queries after a current query fails.
  • Document the installed notebook execution command, the macOS OpenMP prerequisite, matching processor architectures, and the separate JupyterLab setup.

Validation:

  • All 45 tests pass under Node 20.20.2, including tests with the checked-in model artifact and the actual worker module.
  • Fresh npm ci, npm run check, and npm run build pass under Node 20. The type check reports zero errors and zero warnings.
  • actionlint and git diff --check pass.
  • The actual worker loads the model over local HTTP, prepares the default 20-row context with eight views, returns query predictions and attention, and completes a 16-query field in four chunks. The tutorial, explorer, and 13 linked local resources return HTTP 200.
  • All seven code cells in the full Python primer execute successfully with the hash-locked packages under native Apple Silicon Python 3.11.15 on CPU, with OpenMP supplied in the temporary environment. Cached and uncached probabilities agree, HTML is generated, and the result plot is inspected.
  • Two independent reviewers found no material issues.

The build still reports existing dependency warnings. Interactive Chrome UI testing remains unverified because the browser-control tool is unavailable in this chat. The existing Intel Python environment crashed in the XGBoost cell; the native environment passed after adding its missing OpenMP runtime. The README now lists that prerequisite. GPU and Colab execution were not tested.

@jxudata
jxudata self-requested a review October 5, 2026 09:46
@jxudata
jxudata merged commit 9cf7745 into Affirm:main Oct 5, 2026
2 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