Repository navigation
relay: enforce 43001 correlation on job lifecycle events - #17
Merged
Merged
Conversation
Kinds 43002-43006 were writable (mapped to MessagesWrite) with no enforced link to the 43001 request that opened the job — every consumer had to guess (the hive bridge falls back to 'first e tag, else job_id: null' and renders uncorrelated events in a dimmed unlinked group). Structural validation at ingest, after scope resolution: lifecycle events must carry EXACTLY one e tag referencing their request. Zero and multiple get distinct rejection messages. 43001 opens a job and references nothing - unchanged. Uses the existing count_e_tags helper (same shape as the NIP-09 deletion-target rule). The referential half (e tag must resolve to a stored 43001 in the same channel) stays open on the issue - it costs a DB lookup per job event and deserves its own decision. buzz-relay suite: 824 passed / 11 failed - the same 11 environment- dependent failures as clean main (media/admin sidecar tests); the new validation test passes. Closes flaukowski/kannaka-buzz#644 Co-Authored-By: Claude Fable 5 <[email protected]>
NickFlach
pushed a commit
that referenced
this pull request
Oct 29, 2026
…t policy) into the upstream sync Both August features ported onto upstream's restructured tree: - block#645 no_bridge: ChannelRecord/row mapper/SELECT lists/ChannelUpdate and update_channel_on in store/channel.rs (upstream moved channel.rs there), the `no-bridge` tag from group_metadata_tags (the single kind:39000 builder), the kind:9002 privileged key and its edit arm on upstream's `edit.columns` path; migration renumbered 0027 -> 0076 (upstream owns 0027..0075; the embedded-migrator test asserts 76 now) with the SET LOCAL timeouts; the column in schema/tables/public/channels.sql. - block#644 validate_job_event merged cleanly into ingest.rs. - The stray crates/buzz-relay/.concat is gone. cargo check, clippy -D warnings (buzz-db, buzz-relay, buzz-workflow, buzz-kannaka, buzz-dev-mcp) and the migration tests pass locally. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Kinds 43002–43006 were writable with no enforced link to the 43001 that opened the job — consumers guessed (the hive bridge falls back to 'first
etag, elsejob_id: null', rendering uncorrelated events in a dimmed unlinked group).Structural validation at ingest, after scope resolution: lifecycle events must carry exactly one
etag referencing their request; zero and multiple get distinct rejection messages. 43001 references nothing — unchanged. Uses the existingcount_e_tagshelper (same shape as the NIP-09 deletion-target rule).The optional referential half (the
etag must resolve to a stored 43001 in the same channel) stays open on the tracking issue — a DB lookup per job event deserves its own decision.Suite: 824 passed / 11 failed — the same 11 environment-dependent failures as clean main; the new validation test passes.
Closes kannaka-labs/kannaka-memory#644
🤖 Generated with Claude Code