test: fold WS port contract drift guard into local suite - #747
Merged
Conversation
Add a 'port' suite to run-standard-tests that runs the existing config/vitest/vitest.port.config.ts drift guard, so every local 'npm test' verifies the TS<->Rust wire-protocol contract without relying on the port-contract CI workflow. The test:port freeze test already regenerates the contract artifacts in-memory and asserts byte-equality with the committed files, subsuming the contract:generate idempotency check. Also extends classifySuitePath so test/unit/port/** targets route to the port suite under the port config (previously misrouted to the client/default config, which excludes them), and adds the port suite to the cloud-backend local section alongside electron.
…tion test The cloud-backend port execution block in run-standard-tests.ts (added when folding the port contract drift guard into the local suite) had no regression guard. Extend the existing cloud-vitest-integration test with a static source check for the port contract suite log message, following the same pattern as the existing FRESHELL_VITEST_BACKEND reference checks. A full behavioral test is not proportionate: the cloud branch blocks on the electron execFileSync for minutes, so the port log line (emitted after electron returns) is not captured by the timeout-bounded process-level test.
danshapiro
added a commit
that referenced
this pull request
Sep 7, 2026
Remove three CI workflows whose checks are fully covered by the local test suite (run per repo policy before every PR): - rust-clippy.yml (clippy + rust-test): the flaky job that was failing PRs with timing races (net_bind rapid-rebind, auto_resume_e2e, codex_fork_rebind) under CI scheduling load. cargo fmt/clippy/test are run locally. - typecheck-client.yml: runs 'npm run typecheck:client', which is part of 'npm run check' (run locally). - port-contract.yml: the TS side (test:port freeze suite + contract:generate idempotency) is now folded into the local default 'npm test' suite (PR #747). The Rust crate checks (cargo test -p freshell-protocol/terminal) remain a separate manual cargo test step. Kept: docs-pages-deploy.yml, electron-build.yml, electron-release.yml (CI-only deploy/build actions, not tests). Also update port/contract/README.md to reflect that the drift guard now runs via the local npm test suite instead of the removed CI workflow.
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.
What
Folds the existing
test:portvitest suite (the WS port contract drift guard) into the localnpm teststandard runner, so every local test run verifies the TS↔Rust wire-protocol contract — previously this only ran in CI via theport-contractworkflow.Why
The user runs all tests locally per repo policy before pushing PRs. The
port-contractCI workflow was the only place the cross-language WS protocol drift signal was checked, and it was not part of the local default suite (npm test). This wires it in locally so drift is caught before a PR, not after.Changes
scripts/run-standard-tests.ts: add aportsuite to both desktop and aggressive standard test plans, plus the cloud-backend local section (alongside electron). FixclassifySuitePathsotest/unit/port/**targets route to the port config instead of misrouting to the client config (which excludes them).test/unit/server/run-standard-tests.test.ts: update plan-structure assertions to include the port suite; add a port-routing test.scripts/test/cloud-vitest-integration.test.sh: add a regression guard for the cloud-path port block (static source check, verified to catch deletion).The
test:portfreeze test already regenerates the contract artifacts in-memory and asserts byte-equality with the committed files, fully subsuming thecontract:generateidempotency check. No Rust crate checks are folded (those stay a separate manualcargo teststep). No CI workflows are modified in this PR.Built via the-usual workflow: plan review PASSED (1 round), delta review PASSED (2 rounds, 1 Major finding cleared).