Skip to content

fix: verify WebAssembly deployments before publishing - #59

Closed
Rowrow620 wants to merge 1 commit into
devfrom
codex/pages-deploy-smoke-test
Closed

fix: verify WebAssembly deployments before publishing#59
Rowrow620 wants to merge 1 commit into
devfrom
codex/pages-deploy-smoke-test

Conversation

@Rowrow620

Copy link
Copy Markdown
Owner

Description

Repairs the GitHub Pages deployment path so a successful main push first passes native quality gates and a production WebAssembly launch test, then deploys that exact artifact and verifies the published revision in a browser.

The change replaces the separate deployment workflow with the tested CI pipeline, adds a revision-stamped Playwright smoke test at the /AlgoBuddy/ subpath, and documents the local and release checks for contributors and maintainers.

Related Issues

N/A — follows up on the failed GitHub Pages deployment.

Type of Change

  • Bug fix (non-breaking change fixing an issue)
  • Algorithm visualizer audit / correction
  • New feature (non-breaking change adding functionality)
  • Documentation update
  • Refactoring / performance optimization

Verification Checklist

  • Code compiles cleanly without errors
  • cargo test --all passes the complete test suite
  • cargo fmt --all -- --check complies with standard Rust formatting
  • cargo clippy --all-targets -- -D warnings produces zero warnings
  • WebAssembly release bundle and browser launch test pass locally at the GitHub Pages /AlgoBuddy/ subpath
  • Timeline description, inspector state, canvas state, and highlighted code line remain synchronized (not affected by this infrastructure change)

Copilot AI lite review requested due to automatic review settings September 3, 2026 06:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The CI workflow references non-existent GitHub Action major versions (and the smoke script contains a misleading error message for local runs), which would break the deployment/verification pipeline.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR hardens the GitHub Pages WebAssembly release pipeline by ensuring the deployed artifact is the same one that passed native quality gates and a browser launch smoke test, and by adding a live-site verification step that checks the published revision in a real browser session.

Changes:

  • Adds a revision-stamped Playwright smoke test that verifies the app launches correctly under the /AlgoBuddy/ subpath and that the published revision matches the expected commit.
  • Updates the WASM app startup to expose a deterministic “ready” marker for the smoke test and improves WASM startup logging/error reporting.
  • Consolidates Pages deployment + verification into the existing CI workflow, and documents the local/release validation steps.
File summaries
File Description
src/main.rs Initializes web logging and logs WASM startup failures instead of silently ignoring them.
src/app.rs Adds a WASM-only readiness marker and moves loader removal to a deterministic post-render frame.
scripts/wasm-smoke.mjs New Playwright-based smoke test for local + live deployments, including revision verification.
scripts/stamp-wasm-build.mjs New build stamping script that injects the deploy SHA into index.html and writes deploy-sha.txt.
index.html Seeds the readiness attribute for the smoke test to flip once the app is rendered.
.github/workflows/ci.yml Adds build+smoke-test, deploy, and live verification jobs to the CI pipeline.
.github/workflows/deploy-wasm.yml Removes the now-redundant standalone Pages deployment workflow.
package.json Adds Node/Playwright dev tooling for the smoke test + stamping scripts.
package-lock.json Locks Playwright dependencies for reproducible CI/local runs.
CONTRIBUTING.md Documents when/how to run the WASM launch test locally.
RELEASING.md Updates release steps to reflect the new CI-gated deploy + live verification flow.
CHANGELOG.md Notes the GitHub Pages deployment fix and new verification steps.
.gitignore Ignores Node/Playwright/smoke-test outputs introduced by the new tooling.
Review details
  • Files reviewed: 11/13 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/wasm-smoke.mjs
Comment on lines +62 to +72
async function resolveExpectedRevision() {
if (!expectedRevision && !liveBaseUrl) {
expectedRevision = (await readFile(path.join(siteDirectory, "deploy-sha.txt"), "utf8")).trim();
}
if (!expectedRevision) {
throw new Error("EXPECTED_DEPLOY_SHA is required for live smoke tests");
}
if (!/^[0-9a-f]{40}$/i.test(expectedRevision)) {
throw new Error("Expected deployment revision must be a 40-character Git commit SHA");
}
}
@Rowrow620 Rowrow620 closed this Sep 3, 2026
@Rowrow620
Rowrow620 deleted the codex/pages-deploy-smoke-test branch September 3, 2026 06:27
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