Skip to content

Conversation

@lthibault
Copy link
Contributor

@lthibault lthibault commented Sep 25, 2025

system/ipfs*.go were pulled from git history

Merge after #25

- Update ProcessMessage to accept method parameter for dynamic export invocation
- Add method normalization (empty string defaults to 'poll')
- Add proper error handling for unknown methods with stream reset
- Update all test calls to include method parameter
- Maintain backward compatibility with existing code
- Switch from SetStreamHandler to SetStreamHandlerMatch
- Add protocol matching for both base protocol and method suffix
- Extract method from protocol string (/ww/0.1.0/<proc-id>/<method>)
- Update logging to include method information
- Maintain backward compatibility for existing clients
- Change method from flag to positional argument (final argument)
- Update ArgsUsage to <peer> <proc> [method]
- Add argument validation for 2-3 arguments
- Update protocol construction to include method suffix when specified
- Enhance connection banner to show method being used
- Update examples in help text
- Change exported function from 'poll' to 'echo'
- Update function name and comments accordingly
- This demonstrates the named export functionality
- Rebuild main.wasm with updated echo export function
- Binary now exports 'echo' instead of 'poll' function
@lthibault lthibault requested a review from mikelsr September 25, 2025 22:59
@lthibault lthibault self-assigned this Sep 25, 2025
@lthibault lthibault added the enhancement New feature or request label Sep 25, 2025
- Update tests to use 'echo' function instead of 'poll' to match WASM module exports
- Add Reset() expectations to mock streams to handle function not found cases
- Fix TestProc_Integration_WithRealWasm, TestProc_Poll_WithGomock, TestEcho_Asynchronous, and TestEcho_RepeatedAsync
- All tests now pass successfully
- Add system/ipfs.go with complete fs.FS interface implementation
- Add system/ipfs_test.go with comprehensive test coverage
- Support directory traversal, file reading, and sub-filesystem creation
- Integrate with IPFS UnixFS for distributed file access
- Add github.com/pkg/errors dependency for error handling

This restores the IPFS filesystem functionality that was previously
removed, enabling guest filesystem access to IPFS content.
- Replace require.NoError with t.Skipf for IPFS connection errors
- Tests now gracefully skip instead of failing when IPFS is unavailable
- Improves test suite robustness in environments without IPFS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants