Skip to content

test: move server-channel integration to server and fix client typechecks - #410

Merged
alanshaw merged 7 commits into
storacha:mainfrom
NiKrause:fix/client-typecheck-connection
Mar 13, 2026
Merged

test: move server-channel integration to server and fix client typechecks#410
alanshaw merged 7 commits into
storacha:mainfrom
NiKrause:fix/client-typecheck-connection

Conversation

@NiKrause

@NiKrause NiKrause commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • move server-as-channel integration tests from packages/client/test/client.spec.js to packages/server/test/client-channel.spec.js
  • keep client tests package-local (no @ucanto/server / @ucanto/validator imports)
  • add local client execute/decode tests to restore packages/client 100% coverage gates
  • run package workflows on pushes to all branches (push.branches: ["**"]) for client, core, interface, principal, server, transport, and validator

Why

The previous client test changes mixed server integration concerns into the client package, which caused fragile TypeScript behavior in isolated package checks.

This PR keeps boundaries clear:

  • server package owns server-channel integration behavior
  • client package keeps self-contained tests and coverage

Why checks failed after merge previously

On PR #407, package CI typecheck jobs did not run on the PR head commit (only Validate PR title was recorded). On merge commit 60c70da, push workflows ran package typechecks and surfaced failures.

So the issue was check coverage/enforcement at PR time (branch protection/ruleset/settings), not new source changes introduced between PR creation and merge.

Remark

This PR now also removes main-only pull_request.branches constraints for all package workflows

@NiKrause NiKrause closed this Feb 18, 2026
@NiKrause NiKrause reopened this Feb 18, 2026
@NiKrause
NiKrause force-pushed the fix/client-typecheck-connection branch from 3dc2015 to 37f8f08 Compare February 18, 2026 09:00
@NiKrause NiKrause changed the title fix(client): resolve client.spec typecheck regressions test: move server-channel integration to server and fix client typechecks Feb 18, 2026
Comment thread .github/workflows/client.yml Outdated
push:
branches:
- main
- '**'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is perhaps not quite the right change. I think the pull_request.branches config needs to be removed (or changed to '**') instead. This will run these workflows on any push to any branch, whereas I think we only really need it to run when opening (or amending) a PR that we want merged. This is consistent with other repos we have in the organization.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. that is naturally better. I re-removed it from pull_request.branches and now only main branch o push is triggered.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd perhaps name this server-channel.js since the server is acting as the channel in the tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i renamed it.

@alanshaw
alanshaw merged commit 0255a11 into storacha:main Mar 13, 2026
47 checks passed
NiKrause added a commit to NiKrause/ucanto that referenced this pull request Mar 13, 2026
…ecks (storacha#410)

## Summary
- move server-as-channel integration tests from
`packages/client/test/client.spec.js` to
`packages/server/test/client-channel.spec.js`
- keep client tests package-local (no `@ucanto/server` /
`@ucanto/validator` imports)
- add local client execute/decode tests to restore `packages/client`
100% coverage gates
- run package workflows on pushes to all branches (`push.branches:
["**"]`) for `client`, `core`, `interface`, `principal`, `server`,
`transport`, and `validator`

## Why
The previous client test changes mixed server integration concerns into
the client package, which caused fragile TypeScript behavior in isolated
package checks.

This PR keeps boundaries clear:
- server package owns server-channel integration behavior
- client package keeps self-contained tests and coverage

## Why checks failed after merge previously
On PR storacha#407, package CI typecheck jobs did not run on the PR head commit
(only `Validate PR title` was recorded). On merge commit `60c70da`, push
workflows ran package typechecks and surfaced failures.

So the issue was check coverage/enforcement at PR time (branch
protection/ruleset/settings), not new source changes introduced between
PR creation and merge.

## Remark
This PR now also removes `main`-only `push.branches` constraints for
package workflows by switching them to `"**"`. Combined with
`pull_request` checks and required status checks on `main`, this reduces
merge-time surprises by surfacing failures earlier on feature-branch
pushes.

---

Co-Authored-By: Oz <oz-agent@warp.dev>
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.

2 participants