Skip to content

fix: scanner connection ID check, Close paths, EDS limits, deterministic allocation budgets (v0.7.1) - #29

Merged
boeboe merged 2 commits into
mainfrom
fix/policy-1.6-review
Nov 14, 2026
Merged

boeboe merged 2 commits into
mainfrom
fix/policy-1.6-review

Conversation

@boeboe

@boeboe boeboe commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

A patch release on v0.7.0. No exported identifier is added, removed or changed.

What changes:

  • scanner: a Forward_Open reply whose O->T connection ID is 0 is refused with ErrProtocol and closed at the target, as for the actual packet intervals v0.7.0 checks. OnState may call IO.Close and Scanner.Close, with Reconnect too; its goroutine and re-entry contract is documented. Reopen delays have equal jitter. A Close while Open waits for its reply leaves nothing running; of concurrent IO.Close calls, one closes.
  • client: Conn.Close fails the request in flight with ErrClosed at once; a request whose write fails returns within its context; requests in flight during Client.Close fail with ErrClosed, as documented; a dialer that returns no connection and no error fails with ErrConnectFailed.
  • server: an inactivity timeout set to 0 at run time clears the sessions' read deadline. The lifetime of the data passed to ServeCIP, Attribute.Set, ServiceFunc and SymbolHandler is documented.
  • eds: Parse bounds sections (16384) and fields in the file (1048576).

Tests: the L1–L16 lifecycle matrix in TESTING.md with tests for concurrent Close, Close during a read or a write, callbacks that call methods and Close, and Open racing Close; goroutine leak checks in client, server, implicit and scanner; allocation-budget tests for the cip, encap and implicit decoders, eds.Parse and the server's handling of replies beyond their budget. These measure per call over many calls, the way testing.AllocsPerRun counts, with no other goroutine of the module running, against budgets derived from what the code must hold; this makes TestCPFAllocationBudget, which failed on ubuntu-24.04 in #29 with one measured call, deterministic. Fuzz targets for the Forward_Open and Forward_Close replies and connection failures; make fuzz discovers its targets; a nightly GOARCH=386 job; BenchmarkConsume measures delivery to the callback, with a new figure in TESTING.md.

Documents: RELEASE.md (v0.7.1), TESTING.md, SECURITY.md, docs/LIMITATIONS.md, docs/IMPLICIT.md, docs/EDS.md, ARCHITECTURE.md, docs/FEATURE-STATUS.md, docs/api.

Not in this change: recovering handler failures at the library boundary (a behaviour change, for a minor release).

This pull request was first opened for a v0.6.1; v0.7.0 (#28) was released in the meantime, so it is now merged onto v0.7.0, keeps v0.7.0's implementation wherever both fixed the same thing, and targets v0.7.1.

Checked independently: make check, otfabric-policy compliant, gorelease (v0.7.1 valid against v0.7.0), the regression tests fail on the v0.7.0 code, linux/386 test run.

🤖 Generated with Claude Code

…, fix Close paths (v0.6.1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.01980% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
client/connection.go 86.66% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boeboe boeboe changed the title fix: bound server replies and EDS parsing, check Forward_Open replies, fix Close paths (v0.6.1) fix: scanner connection ID check, Close paths, EDS limits, deterministic allocation budgets (v0.7.1) Nov 14, 2026
@boeboe
boeboe merged commit 30efbef into main Nov 14, 2026
26 checks passed
@boeboe
boeboe deleted the fix/policy-1.6-review branch November 14, 2026 13:30
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.

1 participant