Skip to content

Add v7 'AI native' design doc - #97

Merged
christopherread merged 3 commits into
masterfrom
docs/v7-design
Oct 25, 2026
Merged

christopherread merged 3 commits into
masterfrom
docs/v7-design

Conversation

@christopherread

Copy link
Copy Markdown
Owner

Adds docs/v7-design.md, the design proposal for Obvs v7: making the library easier for AI coding agents (and people) to use correctly first time.

What it covers

  • Why "AI native": how agents work (pattern-match, compile, test, read errors, fix) and the principles that follow from that.
  • Where v6 makes this hard, area by area.
  • 12 proposed changes, each linked to its tracking issue in the v7 milestone:
# Change Issue
1 Host the bus through DI (AddObvs, IOptions, ILogger, hosted service) #84
2 Explicit, source-generated message registration #85
3 Analyzers with code fixes #86
4 Handlers and awaitable RequestAsync alongside Rx #87
5 Obvs.Testing: in-memory transport and harness #88
6 Validate at startup; actionable errors #89
7 OpenTelemetry and Microsoft.Extensions.Logging #90
8 Self-describing contracts (AsyncAPI and JSON Schema) #91
9 Obvs.Mcp: an MCP server for development buses #92
10 Fewer packages, System.Text.Json default #93
11 Documentation agents can use #94
12 Migration path and wire compatibility with v6 #95
  • Phasing: additive 6.x releases first, then the breaking 7.0 release.
  • How to measure success: an agent evaluation suite run against v6 and each v7 phase.
  • Open questions.

The issues link to sections of this doc, so those links work once it's merged. This PR is documentation only.

🤖 Generated with Claude Code

Proposes how v7 changes configuration, message registration, handlers,
testing, errors, observability, contracts, packaging and docs so AI
coding agents (and people) can use Obvs correctly first time. Each
change links to its tracking issue in the v7 milestone (#84-#95).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@christopherread christopherread added this to the v7 milestone Oct 25, 2026
christopherread and others added 2 commits October 24, 2026 23:58
Section 4 now explains why v7 stays observable-first: handlers, RequestAsync
and IAsyncEnumerable are thin adapters over IObservable, Rx stays first
class for stream composition, and analyzer OBVS006 catches Subscribe(async).
Resolves the open question on Rx: it stays in the core package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Section 1 now covers how the singleton bus is registered and owned, scoped
handlers, repeated AddObvs calls, keyed buses, and why one bus per
container needs a per-bus instance ID in broker-side names instead of the
process ID used by v6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@christopherread christopherread self-assigned this Oct 25, 2026
@christopherread
christopherread merged commit bb51340 into master Oct 25, 2026
1 check passed
@christopherread
christopherread deleted the docs/v7-design branch October 25, 2026 16:27
christopherread added a commit that referenced this pull request Oct 25, 2026
* Add v7 'AI native' design doc (#97)

* Add v7 'AI native' design doc

Proposes how v7 changes configuration, message registration, handlers,
testing, errors, observability, contracts, packaging and docs so AI
coding agents (and people) can use Obvs correctly first time. Each
change links to its tracking issue in the v7 milestone (#84-#95).

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

* Design doc: frame the async APIs as layers over the observable core

Section 4 now explains why v7 stays observable-first: handlers, RequestAsync
and IAsyncEnumerable are thin adapters over IObservable, Rx stays first
class for stream composition, and analyzer OBVS006 catches Subscribe(async).
Resolves the open question on Rx: it stays in the core package.

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

* Design doc: describe the bus lifetime under dependency injection

Section 1 now covers how the singleton bus is registered and owned, scoped
handlers, repeated AddObvs calls, keyed buses, and why one bus per
container needs a per-bus instance ID in broker-side names instead of the
process ID used by v6.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* NetMQ: run each subscription's receive loop on its own thread (#110)

MessageSource started its receive loop with Task.Run. The loop blocks for
as long as the subscription lasts, so each subscription held a thread-pool
thread, and Subscribe waited until the loop got one. On CI's small runners,
the NetMQ tests start a dozen subscriptions at once; the pool added threads
slowly, subscribers took over 5 seconds to connect, publishers stopped
waiting for them, and the first messages were dropped. The loop now runs as
a LongRunning task on a dedicated thread.

TestMessageSourceThreading saturates the thread pool and checks that
subscribing doesn't wait for it. It failed before this change.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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