Skip to content

feat(e2e): remaining bridge mutations relay-aware (Fixes #144) - #168

Merged
oscarlehuu merged 2 commits into
mainfrom
feat/144-bridge-relay-mutations
Aug 12, 2026
Merged

feat(e2e): remaining bridge mutations relay-aware (Fixes #144)#168
oscarlehuu merged 2 commits into
mainfrom
feat/144-bridge-relay-mutations

Conversation

@oscarlehuu

Copy link
Copy Markdown

Problem

Issue #144: after #133 / D-042, several mutating e2e-bridge commands still looked successful in mode: "relay" while publishing nothing. Specs could appear end-to-end while stopping at the mock boundary.

What changed

Made the remaining #144 commands relay-aware (mirror Rust kind/content/tags/return shape; mock mode unchanged for smoke):

Command Kind / author Relay path notes
send_channel_user_input_answer 46041 (owner) Lookup 46040 request; tags h+e+p (requesting agent). Mirrors user_input.rs.
update_persona_and_publish 30175 (owner) Via publishMockPersonaHeadsubmitSignedEvent; content/tags mirror NIP-AP / persona_event_content. Also covers set_persona_shared.
archive_identity / unarchive_identity 9035 / 9036 Tags -+p (+ reason / replaced-by); owner path attaches live kind:0 NIP-OA auth. Mirrors identity_archive.rs.
send_managed_agent_channel_message 9 (agent) Requires managedAgents[].privateKeyHex; signs as agent; attaches owner NIP-OA x-auth-tag. Fails closed without a real agent key.

Rust classification confirmation (recorded in 0011)

Area Result
Workflows (create/update/delete/trigger_workflow) Misclassified previously. Rust does publish 30620 / kind-5 / 46020. Bridge still mock-local → follow-up candidate (out of #144 DoD list).
Local archive (create_save_subscription, archive_events, etc.) Confirmed local-only. SQLite + query; no mutation publish.

Specs

desktop/tests/e2e/bridge-relay-mutations.spec.ts (integration project) — one relay-mode test per newly relay-aware command, asserting the real event via POST /query.

Docs

  • docs/crew/verification/0011-e2e-bridge-relay-mutation-audit.md updated
  • docs/crew/STATE.md pointer updated

Risk

  • Mock-mode paths unchanged (smoke depends on them).
  • Managed-agent relay path needs a real seed key; without it the error is explicit (no silent mock success).
  • Workflow bridge commands remain mock-only despite Rust publishing (documented; not expanded in this PR).

Test plan

  • pnpm --filter buzz typecheck
  • pnpm --filter buzz check
  • pnpm --filter buzz build:e2e
  • Integration lane: bridge-relay-mutations.spec.ts green on PR
  • NuncioCrew Gate green

Fixes #144

Publish real Nostr events in relay mode for send_channel_user_input_answer
(kind 46041), update_persona_and_publish (kind 30175), archive_identity /
unarchive_identity (kinds 9035/9036), and send_managed_agent_channel_message
(kind 9 signed as the managed agent with NIP-OA x-auth-tag).

Add integration-project bridge-relay-mutations.spec.ts with one relay-mode
assertion per command. Update Verification 0011 with Rust confirmation:
workflows do publish (bridge still mock-local — follow-up); local-archive
commands confirmed local-only.

Fixes #144
Relay rejects kind 46040 when options omit the required description field
from UserInputQuestion. Matches the channels.spec.ts mock seed shape.
@oscarlehuu

Copy link
Copy Markdown
Author

Integration lane classification (run 31573328800)

New specs — all PASS (bridge-relay-mutations.spec.ts, shard 1/2, project integration):

Spec Result
archive_identity / unarchive_identity publish real kind 9035/9036 passed
update_persona_and_publish posts a real kind 30175 catalog head passed
send_managed_agent_channel_message publishes a real kind-9 as the agent passed
send_channel_user_input_answer publishes a real kind 46041 passed

Shard failures are pre-existing inherited drift (not introduced by this PR; same class as when the integration lane landed in #165 / D-047):

Integration 1/2 unexpected:

  • agents.spec.ts — embedded-create discard dialog; narrow overflow menu; catalog chooser order; catalog detail pane; custom personas shared; emoji avatar; community discover/add; Community member unresolved publisher
  • evidence-reactions-relay.spec.ts — Accept/Reject strict-mode duplicate card (known harness dual-card)
  • integration.spec.ts — live mentions / forum mentions title expectation drift

Integration 2/2 unexpected:

  • profile.spec.ts — runtime tab (remote relay agent / without record); Inbox badge notification settings

Required check: NuncioCrew Gate = SUCCESS. Advisory smoke/integration red does not block merge (D-032 / D-047).

Proceeding to squash-merge with Fixes #144.

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.

e2e bridge: remaining mutating commands still mock-only in relay mode

1 participant