Repository navigation
[test] Add tests for testutil.WriteSuccessGuardWasm - #16280
Merged
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active issues were identified, and the focused tests cover the fixture’s file properties, WASM validity, isolation, and required exports.
No open issues 🎉
What changed in this PR
Adds focused unit tests for internal/testutil.WriteSuccessGuardWasm, validating the shared WASM fixture's file output and module structure.
Changes:
- Verifies the fixture filename, permissions, regular-file status, and distinct temporary paths.
- Validates the WASM header, wazero compilation, required guard exports, and memory export.
| File | Description |
|---|---|
| internal/testutil/success_guard_fixture_test.go | Adds tests covering fixture creation, file properties, WASM validity, temporary-directory isolation, and wazero module exports. |
Review effort: Lite (auto)
Contributor
Author
🔒 mcpg Read-Only Stress — defaultSurface coverage: MCP tool calls + proxied CLI (REST) + GraphQL mutations
Overall: INCONCLUSIVE Details:
Full raw notes:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Coverage Improvement: WriteSuccessGuardWasm
Function Analyzed
internal/testutilWriteSuccessGuardWasmt.Fatalferror paths, unreachable with a constant embedded hex fixture)Why This Function?
Coverage across
internal/is ~97%+. This was the only function at 0% coverage other than a trivial no-op logger. It's a shared fixture used by cmd and proxy tests. A broken fixture would silently break those tests.Tests Added
guard.wasm, regular file, mode 0600label_resource,label_response,label_agent, andmemoryTest Execution
Generated by Test Coverage Improver
Warning
Firewall blocked 4 domains
The following domains were blocked by the firewall during workflow execution:
example.comnonexistent.localslow.example.comthishostdoesnotexist12345.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.