tests: dispatch-gate tests run on Linux; classify the remaining Yggdrasil failures #75

Merged
heimdall merged 1 commit from heimdall/tests-platform-neutral into main 2026-11-12 12:24:53 +00:00
Member

Ports the Windows-shaped dispatch-gate tests in BridgeCliTests to run on Linux. Test-only; production code untouched.

  • ResolveExecutable uses which off Windows (was where.exe).
  • powershell -Command calls go through RunShellAsync (sh -c off Windows).
  • Fake gh is an executable .sh off Windows (was .cmd).
  • Off Windows, the .cmd gate wrappers are stood in for by sh shims that exec the same git-proxy.mjs / gh-proxy.mjs, with BIFROST_REAL_GIT set so a shim cannot resolve itself. Windows path is unchanged.

Coverage was not deleted and nothing is skipped.

Failing counts on Yggdrasil (full suite, 1365 tests)

run failures
main, .NET 10 runtime (roll-forward Major) 43
main, .NET 8.0.30 runtime, no built CultLib 24
this branch, .NET 8 runtime, no built CultLib 19
this branch, .NET 8 runtime, built CultLib (VOIDBOT_CULTLIB_ROOT) 2

No test that passed on main fails here.

Classification of the failures

  1. 19 of 43 were the .NET 10 runtime, not Windows: Mvc.Testing 8.0.0 TestServer's ResponseBodyPipeWriter lacks UnflushedBytes, which System.Text.Json 10 needs, so every WriteAsJsonAsync is a 500 (ConceptTallyExport x8, ConceptVoteRateLimit, 9 OidcIssuer, SuspensionReasonExposure; 19 plus one Oidc theory case). They pass on the real .NET 8 runtime; a package bump to 8.0.11 did not help. Run with DOTNET_ROOT=/usr/share/dotnet and a runsettings DotNetHostPath to that dotnet.
  2. Prerequisite, not a bug: the Node tools load the CultLib TypeScript runtime from $VOIDBOT_CULTLIB_ROOT or ../CultLib, whose gitignored dist/ and node_modules must be built. Unbuilt, ProviderAdvertisementTests (2) and 17 BridgeCliTests fail. They pass against a built CultLib.
  3. Real Linux bug, left failing on purpose: Bridge_owned_github_draft_pr_authorizes_push_under_dispatch_gate. tools/bifrost-bridge.mjs line 185 builds its repo-root containment check with a hardcoded \\ separator, so github-draft-pr throws "Target path escapes repo root" on Linux. The same \\ shape is in isWithinExcludedDir in tools/git-gate/git-proxy.mjs and gh-proxy.mjs, so on Linux the gate never excludes its own wrapper dir.
  4. Linux Uri behavior, left failing: ConceptRankedExportTests.A_hostile_cursor_is_a_400_and_never_a_query (100,000 char cursor). new HttpRequestMessage(Get, "/public/...") makes System.Uri treat a leading / as an implicit file path on Unix and reject strings over 65519 chars. A relative Uri without the slash did not help.

🤖 Generated with Claude Code

Ports the Windows-shaped dispatch-gate tests in BridgeCliTests to run on Linux. Test-only; production code untouched. - `ResolveExecutable` uses `which` off Windows (was `where.exe`). - `powershell -Command` calls go through `RunShellAsync` (`sh -c` off Windows). - Fake `gh` is an executable `.sh` off Windows (was `.cmd`). - Off Windows, the `.cmd` gate wrappers are stood in for by sh shims that exec the same `git-proxy.mjs` / `gh-proxy.mjs`, with `BIFROST_REAL_GIT` set so a shim cannot resolve itself. Windows path is unchanged. Coverage was not deleted and nothing is skipped. ## Failing counts on Yggdrasil (full suite, 1365 tests) | run | failures | |---|---| | main, .NET 10 runtime (roll-forward Major) | 43 | | main, .NET 8.0.30 runtime, no built CultLib | 24 | | this branch, .NET 8 runtime, no built CultLib | 19 | | this branch, .NET 8 runtime, built CultLib (VOIDBOT_CULTLIB_ROOT) | 2 | No test that passed on main fails here. ## Classification of the failures 1. 19 of 43 were the .NET 10 runtime, not Windows: Mvc.Testing 8.0.0 TestServer's ResponseBodyPipeWriter lacks `UnflushedBytes`, which System.Text.Json 10 needs, so every `WriteAsJsonAsync` is a 500 (ConceptTallyExport x8, ConceptVoteRateLimit, 9 OidcIssuer, SuspensionReasonExposure; 19 plus one Oidc theory case). They pass on the real .NET 8 runtime; a package bump to 8.0.11 did not help. Run with `DOTNET_ROOT=/usr/share/dotnet` and a runsettings `DotNetHostPath` to that dotnet. 2. Prerequisite, not a bug: the Node tools load the CultLib TypeScript runtime from `$VOIDBOT_CULTLIB_ROOT` or `../CultLib`, whose gitignored `dist/` and `node_modules` must be built. Unbuilt, ProviderAdvertisementTests (2) and 17 BridgeCliTests fail. They pass against a built CultLib. 3. Real Linux bug, left failing on purpose: `Bridge_owned_github_draft_pr_authorizes_push_under_dispatch_gate`. `tools/bifrost-bridge.mjs` line 185 builds its repo-root containment check with a hardcoded `\\` separator, so `github-draft-pr` throws "Target path escapes repo root" on Linux. The same `\\` shape is in `isWithinExcludedDir` in `tools/git-gate/git-proxy.mjs` and `gh-proxy.mjs`, so on Linux the gate never excludes its own wrapper dir. 4. Linux Uri behavior, left failing: `ConceptRankedExportTests.A_hostile_cursor_is_a_400_and_never_a_query` (100,000 char cursor). `new HttpRequestMessage(Get, "/public/...")` makes `System.Uri` treat a leading `/` as an implicit file path on Unix and reject strings over 65519 chars. A relative Uri without the slash did not help. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The dispatch-gate tests spawned where.exe and powershell and pointed the gate
at the checked-in .cmd wrappers. On non-Windows they now resolve executables
with which, run commands through sh, write a fake gh as an executable script,
and stand in for git.cmd/gh.cmd with sh shims that exec the same Node proxies
(git-proxy.mjs, gh-proxy.mjs). Windows behavior is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Bifrost!75
No description provided.