Skip to content

A scenario that proves the claim (v0.8.0) - #16

Merged
happyren merged 1 commit into
masterfrom
feat/scenario
Aug 15, 2026
Merged

happyren merged 1 commit into
masterfrom
feat/scenario

Conversation

@happyren

Copy link
Copy Markdown
Owner

Every other test proves a part. This proves what the README actually claims: a team of sessions collaborating through this plugin avoids specific, nameable failures — and the accounting reports them honestly.

The storyline

A three-session team ships a breaking contract change, exercising each targeted failure mode in order:

Step Failure mode Outcome
Cards declare ownership FM-1.2 / FM-2.3 routing is possible
Checkout claims api/ FM-1.3, 15.7% refused — payments holds api/charges.ts beneath it
Payments steers checkout — delivered
Currency claim verified FC3, 24.5% refuted before it was acted on
Same verdict re-sent — dropped by loop control
Decision recorded, then superseded FM-1.4 / FM-2.1 current set returns only the reversal
Docs ⇄ checkout both block FM-1.5 / FM-3.1 deadlock detected

Then it pins the exact report:

3 receiver turns spent, 3 problems caught
  collisions avoided   1
  false claims caught  1
  deadlocks detected   1

If a change makes collaboration quieter or noisier, those numbers move and this test says so. That's the point — it's a regression bound on behaviour, not just on code.

What is and isn't mocked

Only the two edges the plugin doesn't own: the agent inbox (no live agent in a unit test) and the session corpus. The stores, sockets, loop control, admission path and metrics are real, writing to a real temp directory.

Two cases a single-process test can't reach

  • Across a real Unix socket between hosts — the same storyline, the same admission path.
  • The guarantee the admission design rests on: a refuse policy holds whether the message arrives in-process or over a socket. Sharing a process with a receiver is not a way around it.

3 new tests, 308 total.

Every other test proves a part. This proves what the README claims: that a
team of sessions collaborating through this plugin avoids specific,
nameable failures, and that the accounting reports them honestly.

A three-session team ships a breaking contract change. Along the way the
storyline exercises each failure mode the roadmap targets and pins the
exact numbers the report produces — three receiver turns spent, three
problems caught: one collision avoided, one false claim refuted before it
was acted on, one mutual wait detected. If a change makes collaboration
quieter or noisier, those numbers move and this test says so.

Nothing is mocked except the two edges the plugin does not own: the agent
inbox, since there is no live agent in a unit test, and the session corpus.
The stores, sockets, loop control, admission path and metrics are real,
writing to a real temporary directory.

Two further cases carry the same storyline where a single-process test
cannot reach: one across a real Unix socket between hosts, and one pinning
the guarantee the whole admission design rests on — that a refuse policy
holds whether a message arrives in-process or over a socket, so sharing a
process with a receiver is not a way around it.

3 new tests, 308 total. Version 0.8.0.
@happyren
happyren merged commit 1f74be6 into master Aug 15, 2026
1 check passed
@happyren
happyren deleted the feat/scenario branch August 15, 2026 08:27
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