Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Bun-based regression tests and module mocks to lock in current Synapse SDK/Core integration behavior for foc-cli commands, plus small help/docs adjustments based on observed behavior.
Changes:
- Added a Bun module-mock harness and command-level tests covering upload, multi-upload, wallet, provider, dataset, and piece commands.
- Updated CLI help/docs/skill text to reflect current behavior (
dataset createrequires providerId;wallet costsexamples require both flags; remove “piece upload” wording in piece group description). - Added
bun testas atestpackage script.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| skills/foc-cli/SKILL.md | Updates skill command table to match current CLI behavior/requirements. |
| cli/tests/synapse-commands.test.ts | Adds command-level regression coverage using Bun tests and mocks. |
| cli/tests/output.test.ts | Reformats/cleans up output serialization tests (no behavior change intended). |
| cli/tests/command-mocks.ts | Introduces module-mock harness for Synapse SDK/Core and viem boundaries. |
| cli/src/commands/wallet/costs.ts | Removes outdated example that no longer matches required flags. |
| cli/src/commands/piece/index.ts | Updates piece group description to remove “upload” wording. |
| cli/src/commands/dataset/create.ts | Updates arg description/examples to reflect providerId requirement. |
| cli/package.json | Adds test script running bun test. |
| README.md | Updates dataset create usage docs to require <providerId>. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Adds pre-upgrade regression coverage for the current Synapse SDK/Core integration surfaces before any dependency bump. This PR intentionally leaves
@filoz/synapse-sdkand@filoz/synapse-coreunchanged so the follow-up upgrade PR can use these tests as the compatibility net.What changed
bun run testas a package script.dataset createrequires an explicit provider ID today.wallet costsexamples require both--extraBytesand--extraRunway.piecegroup docs no longer advertise a missing upload command.Current behavior gaps captured for follow-up
The suite keeps PR1 green but includes TODO tests for current behavior that should be addressed in PR2 or a targeted fix:
multi-uploadsilently ignores unreadable input files instead of failing the requested upload set.dataset detailsreturns the string"No metadata"for empty piece metadata even though the schema declares a string record.piece listreturnsdataSetIdas a number even though the schema declares a string.Validation
bun install --frozen-lockfilebun run test— 29 pass, 3 todo, 0 failbunx biome check src testsbunx tsc --noEmitbun run buildgit diff --check