Skip to content

test(conformance): supply d tag for workflow definitions after relay schema change - #5146

Open
iroiro147 wants to merge 1 commit into
block:mainfrom
iroiro147:fix/5101-conformance-workflow-d-tag
Open

test(conformance): supply d tag for workflow definitions after relay schema change#5146
iroiro147 wants to merge 1 commit into
block:mainfrom
iroiro147:fix/5101-conformance-workflow-d-tag

Conversation

@iroiro147

Copy link
Copy Markdown
Contributor

Summary

The workflows::workflow_trigger_is_community_confined conformance row was failing at setup, not at the isolation assertion it was written to check. The relay's handle_workflow_def now requires the client to pass the workflow id via a d tag and rejects with "invalid: missing d tag (workflow_id)" (crates/buzz-relay/src/handlers/command_executor.rs:668). The test's helper was still built against the older server-generates-the-id contract, passed only h + name tags, and read the id out of the accept response — so every definition request was rejected with HTTP 400 and the row's actual assertion (A's workflow id can't be fired under B's community) never ran.

A false red hides a real relay property. This restores the row to green so the community-confinement fence is actually exercised.

Closes #5101.

What changed

In crates/buzz-test-client/tests/conformance_multitenant.rs, inside mod workflows:

  • define_workflow now generates a fresh uuid::Uuid::new_v4() locally, tags it via d alongside h and name, and returns it directly (no response parsing needed; the id was never server-generated, so there's nothing new to read out of the accept message).
  • The trigger-side helpers (trigger_workflow) already pass d with the same UUID; no change there.
  • Removed the stale comment claiming the server generates the id — it doesn't anymore.

Net effect: −7 LoC, same behavior, row goes from failing-at-setup to running the isolation check.

Test plan

  • cargo check -p buzz-test-client --tests — clean.
  • The pre-existing failure was a panic at test setup (HTTP 400); after this change the row exercises the confinement assertion end-to-end when run against a live relay + Postgres (the standard conformance harness, which we do not run in CI for non-owning lanes).
  • No production code changed.

…schema change

The relay's handle_workflow_def now requires clients to supply the
workflow_id via a `d` tag and rejects definitions without one
("invalid: missing d tag (workflow_id)", command_executor.rs:668).
The workflow_trigger_is_community_confined conformance row was still
written against the older server-generates-the-id contract: it passed
only `h` + `name` tags and read the id out of the accept response.
Definitions were rejected at setup, so the isolation assertion (A's
workflow id can't be fired under B's community) never ran — a false red.

Update define_workflow to generate a fresh UUID locally, tag it via `d`
alongside `h` and `name`, and return it directly (no response parsing).
The trigger path already passes `d` with the same UUID, so no other
change is needed.

Refs block#5101

Signed-off-by: iroiro147 <sarthak.singh@mastersunion.org>
@iroiro147
iroiro147 requested a review from a team as a code owner August 7, 2026 03:10
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.

conformance_multitenant workflow row is stale vs the workflow-event schema (missing d tag → 400)

1 participant