Skip to content

test(ci): run full test suite on WSL2 (Ubuntu 24.04) - #263

Merged
mwtng merged 11 commits into
mainfrom
feat/e2e-coverage-for-wsl
Aug 27, 2026
Merged

test(ci): run full test suite on WSL2 (Ubuntu 24.04)#263
mwtng merged 11 commits into
mainfrom
feat/e2e-coverage-for-wsl

Conversation

@mwtng

@mwtng mwtng commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Issue: Refs #108
Other PRs: #261 should be merged before (done)

Rebase on main + two extra commits: changes/additions marked here
+ one extra commit: fix a test that failed due to "conflicting" previous merges

What

  • Add WSL2 (Ubuntu 24.04) as a third OS to ci.yml, e2e.yml, and e2e-smoke.yml (EDIT: continue-on-error removed)
  • Add a lint guard enforcing WSL2 coverage for all e2e workflows
  • Fix CodeWhale config: remove path_suffix (caused 404) and add shell_env hook for TUI env re-injection
  • Skip env-dependent e2e assertions for CodeWhale exec mode (StripsEnvVars flag)
  • Fix WSL2-specific runtime issues in workflow YAML (env var forwarding, release provisioning, shell selection)
  • NEW: Move codewhale from matrix into dedicated non-blocking drift jobs (e2e.yml + e2e-smoke.yml); codewhale failures are now advisory-only
  • NEW: Resolve symlinks in workdir (continue what PR fix(config,skilltrust): resolve symlinked skill roots in BundleHash a… #248 started) to fix the new TestE2EKeychainSecretDelivery (from PR feat(e2e): security coverage and address flakiness #261 ) for MacOS

Drive-bys:

  • Migrate SKAINET_EXTERNAL secret to SKAINET_INTERNAL across all workflows
  • Switch default workflow model to deepseek-ai/DeepSeek-V4-Flash (except for "release" to have a stronger reasoning model)

Why

  • WSL2 is a supported platform (GOOS=linux under Microsoft kernel, bwrap sandbox runs unchanged) but had no CI coverage. The macOS-only codex/codewhale exclusions don't apply on WSL2 since it's not Seatbelt.
  • The lint guard prevents future drift between non-WSL2 and WSL2 workflow steps and env vars — a missing WSLENV entry or a new step without a WSL2 counterpart fails silently otherwise.
  • path_suffix = "/chat/completions" stripped the /v1 version segment from base_url, yielding 404. CodeWhale's child_env module calls env_clear() and rebuilds from a fixed allowlist that excludes OMAC_* — the shell_env hook re-injects them, but only fires in the interactive TUI, not in codewhale exec.
  • codewhale exec (headless mode, used by e2e tests) strips OMAC_* from bash subprocesses; sidecar/cache/echo assertions fail on missing env, not on sandbox defects.
  • NEW: preparing CodeWhale phase out

Drive-bys:

  • SKAINET_EXTERNAL is phasing out
  • With SKAINET_EXTERNAL gone, the old empty model default (GLM) would receive larger load, a small internal model is the default now. Only the "release" workflow has the standard model for reasoning (only single LLM call)

How

  • WSL2 CI job: ci.ymlwsl2 job using Vampire/setup-wsl@v7, Go installed manually, go test -race ./...
  • WSL2 e2e jobs: e2e.yml and e2e-smoke.ymle2e-wsl2 / smoke-wsl2 jobs, non-root runner user, wsl-env.sh sourced per step for PATH and wslpath translation, WSLENV forwarding all job/step env vars, CRLF stripping, split release provisioning (download tarball on Windows side, extract Linux ELF in WSL)
  • Lint guard: scripts/check-wsl2-coverage.py + wired into ci.yml lint job — checks step-name parity, job-level env key parity, and WSLENV coverage
  • CodeWhale config + StripsEnvVars: internal/e2e/harnesses.go — removed path_suffix, added shell_env hook to config.toml, set StripsEnvVars: true, ExpectVisibleEnv returns nil
  • Assertion skips: internal/e2e/e2e_test.go — skip assertEchoOK, assertSecretFingerprintPresent, assertEnvVarsVisible, assertCacheIsolation when StripsEnvVars; filesystem assertions still run
  • WSL2 test tolerance: internal/sandboxrun/integration_worktree_linux_test.go — tolerate EBUSY packed-refs fatal on WSL2
  • Docs: AGENTS.md, docs/HARNESSES.md, docs/HARNESS_COMPAT.md
  • NEW: codewhale drift jobs: e2e.yml e2e-codewhale job and e2e-smoke.yml smoke-codewhale job — Linux-only, codewhale-only, continue-on-error: true, reusing the full smoke/e2e step sequence
  • NEW: Advisory classification: e2e-smoke.yml report job — ADVISORY_HARNESS_RE env var (top-level) steers which harness rows are advisory; Prepare this run's rows splits rows into blocking/advisory, moves advisory .ctx aside so failure classifiers only see authoritative failures; dashboard adds a "Non-blocking failures" section, Slack appends an advisory note

Drive-bys:

Verification

  • CI pipeline on this branch (check the GitHub Actions tab)
  • Trigger e2e full suite: gh workflow run e2e.yml --ref feat/e2e-coverage-for-wsl -f skip_claude_code=true or via the GitHub UI
  • Trigger e2e smoke / drift detection: gh workflow run e2e-smoke.yml --ref feat/e2e-coverage-for-wsl or via the GitHub UI
  • Local lint: python3 scripts/check-wsl2-coverage.py
  • Local build + vet: go build -tags=e2e ./internal/e2e/... && go vet -tags=e2e ./internal/e2e/...

Follow-up

  • Consider a separate shell_env-equivalent mechanism for codewhale exec mode if CodeWhale adds support, or create .sh file that gets filled with all necessary OMAC_* env variables and gets sourced before every tool execution of CodeWhale.

@mwtng
mwtng force-pushed the feat/e2e-coverage-for-wsl branch 12 times, most recently from 26a2484 to 82dcc83 Compare August 25, 2026 18:51
@nhuelstng

Copy link
Copy Markdown
Contributor

cool didn't know that existed 😄

@mwtng
mwtng force-pushed the feat/e2e-coverage-for-wsl branch 4 times, most recently from 37b9da9 to a8bd584 Compare August 25, 2026 21:30
@mwtng
mwtng marked this pull request as ready for review August 25, 2026 21:45
@mwtng
mwtng force-pushed the feat/e2e-coverage-for-wsl branch from a8bd584 to 08c6ebf Compare August 25, 2026 22:04
@mwtng
mwtng force-pushed the feat/e2e-coverage-for-wsl branch 2 times, most recently from 08c6ebf to faa5317 Compare August 27, 2026 09:39
VictoriaRuckerbauer added a commit that referenced this pull request Aug 27, 2026
Signed-off-by: Victoria Ruckerbauer <victoria.ruckerbauer@tngtech.com>
VictoriaRuckerbauer added a commit that referenced this pull request Aug 27, 2026
Signed-off-by: Victoria Ruckerbauer <victoria.ruckerbauer@tngtech.com>
Mathias Wagner added 5 commits August 27, 2026 16:55
- Add wsl2 job to ci.yml running `go test -race ./...` inside a real WSL2 (Ubuntu 24.04) distribution on windows-latest via Vampire/setup-wsl@v7
- Fix outdated comment in wsl2-session
- Improve test tolerance for WSL2-specific quirk

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
- Run the full e2e suite and drift detection on real WSL2 (Ubuntu 24.04)
via Vampire/setup-wsl@v7, all six harnesses. Go/bun/node are installed manually
inside WSL; a /tmp/wsl-env.sh sourced per step handles PATH and
wslpath translation of GITHUB_OUTPUT/GITHUB_STEP_SUMMARY/OMAC_BIN.
CRLF stripping. Both jobs are continue-on-error during rollout.
- Update documentation accordingly.

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
- add script to CI pipeline to notice drift between different OSes for e2e workflows. Detects:
  - missing WSL2-counterpart workflows
  - missing steps in WSL2-counterpart workflows
  - missing job-level env var keys in WSL2-counterpart workflows
- add skip-list of e2e workflows with exclusion reason for visibility

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
- add missing dependency
- add necessary WSL2 env variable, add it to the lint check
- make WSL2 run as non-root
- fix unbound env variables error
- change default model and base url for workflows since skainet-external provider is phased out
- fix root-only test (never ran for the others -> only surfaced due to the WSL2 run as root user)

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
- remove path_suffix, since that strips /v1 from the base_url, default of codewhale handles that correctly
- include shell_env hook to preserve OMAC_ env variables within codewhale for skills

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
Mathias Wagner added 5 commits August 27, 2026 17:02
Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
 - their features would only work in an interactive TUI
 - label CodeWhale as experimental

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
- move log dir env variable to step-level since runner is not available before
- pull release on Windows, unpack to WSL2
- move wsl-env.sh to home to avoid automatic deletion on /tmp if processes inbetween take too long

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
…s blocking

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
@mwtng
mwtng force-pushed the feat/e2e-coverage-for-wsl branch 2 times, most recently from b097be9 to 276203c Compare August 27, 2026 15:11
- PR #248 only resolved them in BundleHash and copyTree, new keychain e2e-tests failed on macos without this fix

Signed-off-by: Mathias Wagner <mathias.wagner@tngtech.com>
@mwtng
mwtng force-pushed the feat/e2e-coverage-for-wsl branch from 276203c to df0c0a4 Compare August 27, 2026 15:19

@VictoriaRuckerbauer VictoriaRuckerbauer 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.

Discussed the PR together, looks reasonable

@mwtng
mwtng merged commit 113f7db into main Aug 27, 2026
11 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.

3 participants