Skip to content

refactor(server): remove the unused person-origin envelope channel - #127

Merged
Jacksondr5 merged 1 commit into
j5/mainfrom
j5/remove-person-origin-envelope
Sep 11, 2026
Merged

Jacksondr5 merged 1 commit into
j5/mainfrom
j5/remove-person-origin-envelope

Conversation

@Jacksondr5

Copy link
Copy Markdown
Owner

Closes #119

Problem

envelopes.v1.json carried a humanMessage channel ("This person is not watching this chat. They see only what you send back on this exchange.") for a non-closing person-originated message, rendered by formatHumanEnvelope. No code path produces such a message. Per the 2026-09-08 ruling, a person never opens an ask through the platform; their only ledger act is the inbox answer, which closes an exchange and is delivered as a reply through humanClosedMessage.

Change

  • Removed the humanMessage channel from envelopes.v1.json and bumped the envelope version to 16.
  • Removed formatHumanEnvelope from the formatter. formatClosedHumanEnvelope stays.
  • The delivery transport now fails closed when a person-origin delivery is not a reply, mirroring the existing unknown-channel guard, rather than silently rendering a dead envelope.
  • Send service: checked, no change needed. Every sender is resolved from an agent thread home (the home lookup filters on participant.kind = 'agent'), so a person-origin non-reply cannot enter the ledger through send. The inbox answer path appends exchangeRole: "reply" only.

Tests

  • Channel test: person-origin none / ask / followup deliveries throw.
  • Integration test for user-actor attribution now delivers the real shape, a closing reply, and asserts the closed human envelope.
  • Formatter test: version 16, and the tool-description assertions kept without the removed render.

Docs: the definition of record (docs/j5/product/a2a/index.md, agent-tools.md) is already updated on j5/docs-product-cleanup. The old plan text on j5/main (docs/j5/product/a2a/plan.md) still describes the human-origin envelope, but that file is being reorganized on the docs branch, so I left it alone here to avoid a conflict.

Verification

  • vp test run on EnvelopeFormatter.test.ts, DeliveryTransport.channel.test.ts, DeliveryTransport.integration.test.ts — 33 passed
  • vp run typecheck in apps/server — clean
  • vp lint on the changed files — clean

Work done by Claude Fable 5.1 via Claude Code.

🤖 Generated with Claude Code

A person never opens an ask through the platform. Their only ledger
message is the inbox answer, delivered as a closing reply through
humanClosedMessage. The humanMessage channel ("This person is not
watching this chat…") and formatHumanEnvelope had no producer.

Drop the channel from envelopes.v1.json (version 16) and the formatter.
The transport now fails closed on a person-origin non-reply, mirroring
the unknown-channel guard, instead of silently rendering a dead
envelope. The send service already resolves every sender from an agent
thread home, so it cannot admit a person-origin non-reply; no change
there.

Closes #119

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@github-actions github-actions Bot added size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list. labels Sep 11, 2026
@Jacksondr5
Jacksondr5 merged commit 4ce9f91 into j5/main Sep 11, 2026
17 checks passed
@Jacksondr5
Jacksondr5 deleted the j5/remove-person-origin-envelope branch September 11, 2026 23:37
Jacksondr5 added a commit that referenced this pull request Sep 14, 2026
… cross-environment changes

Rebased onto j5/main. Folds main's five doc changes into the rewritten
definitions in their own shape: list_squadrons and join_squadron in the
agent tools and substrate definitions and as Squadron AC14; reversible
archive, unarchive and separate deletion in the archive-flow and tools
definitions; the cross-environment merge (#125) as cross-device
AC7–AC10 and inbox criteria, with build status in the dogfood plan.
Records #126 and #127 as landed in the A2A plan. Moves the Squadron
Scope section into the Definition and the plan per the conventions.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Jacksondr5 added a commit that referenced this pull request Sep 14, 2026
… shape

The EnvelopeFormatter test reads the send_message description out of
docs/j5/product/a2a/agent-tools.md and compares it byte-for-byte with
the runtime string; the docs rewrite changed the heading and label the
parser looked for. Update the parser to the definition shape, drop the
stale "or a reply" toward a person from the runtime string (a person
never opens an ask, so there is nothing to reply to; the channel itself
went in #127), and hold the definition's description to the shipped
string. The regarding sentence returns with #111.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Jacksondr5 added a commit that referenced this pull request Sep 14, 2026
* docs(j5): how the J5 docs are organized — five kinds, lifetimes, two identifier kinds

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): glossary rewritten as index + owned distinctions; casing rule made unambiguous

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): cite principles by name — headings un-numbered, every numeric citation rewritten

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): Squadron rewritten as a definition; naming session moved to a record; glossary review fixes; shared example fleet

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): A2A definition, substrate and agent-tools as definitions; communication-graph draft to a record; A2A plan to plans/

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): steering after the upstream integration — two independent policies, truthful-steer guard, stop wins over restart continuation; Astra delivery guidance removed

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): inbox, thread rendering and archive flow as definitions; Replied everywhere; a person receives asks only and never opens one

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): A2A definition — a person receives asks only and never opens one (repairs edits missed against the staged text)

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): Roles, Crews, Memos, Playbooks, Spawning Guide, Shared Squadrons as definitions — the design-review register dissolved into them

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): dogfood plan consolidated under plans/; decision log, design review and backlog become records; principles' cases point at definitions by name; GitHub milestones carry the backlog

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): problems, use cases, fleet vision, cross-device and the PR pane as definitions; the posted PR-pane brief kept as a record

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): mechanical sweep — records renamed date-first with frontmatter, research stamped as_of, runbooks under runbooks/, process classified, README rewritten

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): fold the Fleet page contract into a definition

Rewrites sidebar-and-roster as the Fleet page and sidebar definition
(AC1–AC26, scenarios, History mapping SB1–SB7, FV1–FV11 and DV6),
moves the 2026-09-04 fleet-visibility session record to its date-first
name with a pointer to the definition, re-keys the dogfood plan's
narrowing table by criterion, and gives the glossary's Fleet page,
Squadron scope, orphan and delivery alarm terms their owners. Supersedes
PR #107.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* docs(j5): rebase onto main and absorb the landed lifecycle, join, and cross-environment changes

Rebased onto j5/main. Folds main's five doc changes into the rewritten
definitions in their own shape: list_squadrons and join_squadron in the
agent tools and substrate definitions and as Squadron AC14; reversible
archive, unarchive and separate deletion in the archive-flow and tools
definitions; the cross-environment merge (#125) as cross-device
AC7–AC10 and inbox criteria, with build status in the dogfood plan.
Records #126 and #127 as landed in the A2A plan. Moves the Squadron
Scope section into the Definition and the plan per the conventions.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

* fix(server): pin the send_message description to the definition's new shape

The EnvelopeFormatter test reads the send_message description out of
docs/j5/product/a2a/agent-tools.md and compares it byte-for-byte with
the runtime string; the docs rewrite changed the heading and label the
parser looked for. Update the parser to the definition shape, drop the
stale "or a reply" toward a person from the runtime string (a person
never opens an ask, so there is nothing to reply to; the channel itself
went in #127), and hold the definition's description to the shipped
string. The regarding sentence returns with #111.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the unused person-origin envelope channel

1 participant