• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

enbility / ship-go / 30640977962
93%

Build:
DEFAULT BRANCH: dev
Ran 31 Jul 2026 03:03PM UTC
Jobs 1
Files 45
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Jul 2026 02:59PM UTC coverage: 92.758% (-0.1%) from 92.853%
30640977962

push

github

web-flow
fix: SHIP handshake conformance (CMI/PROT/TERM abort behavior) (#101)

Closes #98. Contributes to #95 (SHIP TestSpecification V1.0.0
compliance).

Fixes six non-conformances against the SHIP High-Level Test
Specification, all in the handshake / connection-lifecycle abort paths.
#98 covers PROT_003/004; this PR also resolves CMI_001, PROT_005/006 and
TERM_001 in the same area.

| TC | Before | After |
|----|--------|-------|
| **CMI_001** | server dropped an invalid CMI message with no reply |
sends CMI `{0,0}` reject before closing |
| **PROT_003** | server proto-handshake wait-timer expiry sent no frame
| sends `protocolHandshakeError` error=1 (timeout) |
| **PROT_004** | client wait-timer expiry sent error=2 | sends error=1
(timeout) |
| **PROT_005** | server unexpected/malformed proposal sent no frame |
sends error=2 (unexpected message) |
| **PROT_006** | client valid-but-non-select sent error=3 | sends
error=2 (unexpected message); malformed select stays error=3 (selection
mismatch) |
| **TERM_001** | announced close carried raw caller string (e.g. `"User
close"`) as `reason` | maps free-form reasons to a valid
`ConnectionCloseReasonType` (`unspecific`) |

## How

- Timeouts are now handled in the `handleState` dispatch for the
server/client protocol-handshake states before the message handler runs,
so a nil-message timeout is not misclassified as an unexpected message.
- The proposal/choice handlers use `abortProtocolHandshake` (which emits
the error frame) instead of `endHandshakeWithError` (which does not) for
message-rejection paths; genuine send errors still use
`endHandshakeWithError`.
- The client choice handler distinguishes "not a select at all"
(unexpected message, error=2) from "a select with bad version/format"
(selection mismatch, error=3).
- `validCloseReason` sanitizes the announced close reason.

## Tests

New/updated conformance tests assert the exact SHIP error codes on the
sent frame (`Test_ListenProposal_Timeout`,
`Test_Listen... (continued)

45 of 48 new or added lines in 4 files covered. (93.75%)

13 existing lines in 3 files now uncovered.

5930 of 6393 relevant lines covered (92.76%)

11658.54 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
98.9
-1.1% ship/handshake.go

Coverage Regressions

Lines Coverage ∆ File
9
93.96
-6.04% ship/hs_prot.go
2
81.11
0.0% cert/cert.go
2
96.17
-0.48% mdns/avahi.go
Jobs
ID Job ID Ran Files Coverage
1 30640977962.1 31 Jul 2026 03:03PM UTC 45
92.76
GitHub Action Run
Source Files on build 30640977962
  • Tree
  • List 45
  • Changed 7
  • Source Changed 4
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30640977962
  • 85f2b4b7 on github
  • Prev Build on dev (#30115025685)
  • Next Build on dev (#30643232628)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc