Skip to content

proposal(events): distinguish xref creation from Version creation - #686

Closed
marcschier wants to merge 15 commits into
xregistry:mainfrom
marcschier:fix/spec-605-local-xref-events
Closed

marcschier wants to merge 15 commits into
xregistry:mainfrom
marcschier:fix/spec-605-local-xref-events

Conversation

@marcschier

@marcschier marcschier commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Current proposal

Commit 9e103e2be4de6a7d90630bd2b346e4d08c029cf1 proposes a narrow exception to Resource creation's mandatory Version-created pairing. Creating a cross-reference Resource still generates Resource-created, but does not generate Version-created for Versions merely exposed through the cross-reference. Versions actually created elsewhere by the same interaction retain their own events.

The example creates /dirs/d1/files/f2 referring to existing /dirs/d1/files/f1: it produces Resource-created for f2, not synthetic Version-created events beneath f2. Ordinary Resource creation still requires at least one Version-created event. Only core/events.md changes. Spelling, whitespace and diff checks pass.

Earlier review and withdrawals

The reviewer-requested Events reverts remain preserved in d5c06059a959bb8652ee1dd145301bd807242572, after merging upstream main at 90e45d9035c7c28f13c808c8f203ba253317a08e. The prior no-proposed-file-changes status is superseded by this new narrow proposal; the withdrawn broader policies have not been restored.

The following proposals remain withdrawn:

  • Additional commitment, enqueue and delivery-profile requirements.
  • Cross-reference-specific epoch omission, Version lifecycle exclusions and their dangling-target example.
  • The local-ownership subsection that conflicted with the restored Resource event requirements.

This proposal does not change epoch or meta.epoch field requirements, define target-change monitoring, or settle event-data acquisition when a target is unavailable. Those questions remain separate. It does not claim to resolve all of #605 or #619.

Published history and DCO sign-offs are preserved. No review threads have been resolved; the PR is not merged.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Comment thread core/events.md Resolved
@marcschier
marcschier marked this pull request as ready for review September 15, 2026 12:32
Remove the approved synthetic event planner, prose-bound tests and script-only README. Preserve all event specification text and leave d/e policy separation and readability discussion to the original PR.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Port the reviewed core/events.md net diff from xregistry#697 without
replaying its removed event-contract scaffolding.

Preserve xregistry#686's owned-lifecycle correction, projection policy,
existing mixed history, and unresolved readability feedback. This forward
composition does not adopt a durable-enqueue or delivery profile.

Source-PR: xregistry#697
Source-Head: 75f6cbe
Source-Base: 9ecf8ea
Refs: xregistry#619
Signed-off-by: Marc Schier <marcschier@hotmail.com>
@marcschier marcschier changed the title fix(events): distinguish owned lifecycles from xref projections proposal(events): define lifecycle notifications and delivery semantics Sep 16, 2026
@marcschier

marcschier commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Review feedback at 581cd31

Independent read-only review against main 9ecf8ea using the three-dot diff. Every finding cites the changed text and the authority it was checked against. The review changed nothing in this PR.

Criterion Verdict
(a) Repetition a link would replace opportunity
(b) Understandable, not verbose opportunity
(c) Correct per spec/standard pass with one Medium gap
(d) Nothing invented, defensible pass
(e) Description matches content ACCURATE, two low findings (F5, F9)

Findings: 1 correctness, 2 prose, 3 description.

(c)/(d) Correctness

F-686-1 — Medium — incomplete
Cross-reference epoch exception treats meta.epoch as a conditionally-available projected value, but unchanged Core excludes it from a cross-reference Resource unconditionally

  • Changed: core/events.md — “- For a cross-reference Resource created or updated event that includes data, epoch and meta.epoch are projected target values. Each MUST be included only if that value is available through the Core-defined projection at the end of the interaction; each unavailable value MUST be omitted. A value MUST NOT be invented or replaced with zero or a previously stored local epoch. This applies, for example, when the target is missing, inaccessible, or itself a cross-referen…”
  • Authority: “Note that the meta entity's attributes epoch through defaultversionsticky MUST be excluded if xref is set because those would appear as part of the target Resource's meta entity.” — source
  • Why: The two projected values are not symmetric in Core. Resource-level epoch is projected from the target and is therefore genuinely target-availability-dependent. meta.epoch is not projected onto the source at all: Core removes epoch (through defaultversionsticky) from a source Resource's meta whenever xref is set, in both the API-view example and the document-view rule, precisely because those values belong to the target's own meta entity. The changed bullet conditions both on target availability and lists only availability causes ('the target is missing, inaccessible, or itself a cross-reference Resource'), so a resolvable target reads as the case where BOTH values are included…
  • Evidence: Registry has /dirs/d1/files/real with epoch 3 and meta.epoch 5. A client creates alias /dirs/d1/files/alias with meta.xref: "/dirs/d1/files/real" (resolvable). Reading the changed bullet, an implementation emits: { "type": "io.xregistry.resource.created", "subject": "/dirs/d1/files/alias", "data": { "epoch": 3, "meta.epoch": 5 } } The epoch 3 is correct (Core projects it). The meta.epoch 5 is not the subject's value: GET /dirs/d1/files/alias…
  • Suggested fix: State the two cases separately: Resource-level epoch is a projected target value included only when the projection yields it; meta.epoch MUST be omitted from every cross-reference Resource created/updated event, because Core excludes the meta epoch from a source Resource whenever xref is set, regardless of target availability. Optionally add a resolvable-target example alongside the existing dangling-target one.

(a)/(b) Repetition and clarity

F686-A1 — low — criterion (a), judgement

  • Added text: core/events.md:332-334 — “The normal per-interaction event selection and coalescing rules still apply, including during Group or Registry deletion.”
  • Already stated in: core/events.md 74-84 (same head, unchanged by this PR) — “A single interaction with the Registry MAY result in multiple events; however, within the scope of one interaction (see xregcorrelationid), the following constraints apply: - Only one created, updated or deleted event MUST be generated per subject. - If the interaction involved more than one of those actions, then the…”
  • Why: The PR twice reminds the reader that the existing per-interaction constraints still apply - at 114-116 ('Per-interaction event selection and coalescing still apply to implicit parent creation, cascading changes, and multiple changes to the same entity') and again at 332-334 - without pointing at the constraints themselves, which sit unchanged at 74-84. Reminders that carry no rule are the cheapest thing to replace with a reference, and here the reference also tells the reader which constraints are meant.
  • Link instead: Make the second occurrence a pointer, e.g. 'The per-interaction event constraints in [Registry Events](#registry-events) still apply, including during Group or…
  • Keep locally: 'including during Group or Registry deletion' at 334, and the clause at 115-116 naming implicit parent creation, cascading changes and repeated changes to one entity - both extend the existing constraints to cases they do not mention.
  • Suggested change: Replace the second reminder with a reference to the existing constraint list.

F686-B1 — low — criterion (b), judgement

  • Added text: core/events.md:127-133 — “This specification does not define transport delivery guarantees, including exactly-once delivery, durable replay, ordering between parent and child events, or a transaction with every consumer. Any such guarantees MUST be defined by an explicit profile; they MUST NOT be inferred from the number of events generated. Neither client receipt of a response nor event delivery defines the commit point here. A later enqueu…”
  • Why: The new section's last two paragraphs (119-133) are built almost entirely from statements about what the specification does not require. The third sentence restates the section's opening rule (commitment, not delivery, is the boundary - already stated at 88-92 and 94-101) and the fourth is its contrapositive; the reader has to hold four negations to extract one requirement, which is that a profile must define any delivery guarantee.
  • Suggested change: Compress to two sentences: 'This specification does not define transport delivery guarantees such as exactly-once delivery, durable replay, or parent/child ordering; an explicit profile MUST define any such guarantee, and it MUST NOT be inferred from the number of events generated. Delivery, client receipt and later transport failures do not determine whether an interaction committed.'

Separate projected Resource epoch from excluded alias Meta epoch; link event coalescing rules and simplify delivery guidance.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
@marcschier

Copy link
Copy Markdown
Contributor Author

Selected feedback addressed at 76b27f7

Applied the findings retained in your edited feedback with signed forward commits.

Finding Action taken
F-686-1 Separated conditional projected Resource epoch from meta.epoch, which is always omitted on a cross-reference source, including when its target resolves.
F686-A1 Linked the reminder to the existing per-interaction constraints in Event Definition; the suggested registry-events anchor did not exist.
F686-B1 Simplified delivery-guarantee prose while retaining profile-defined guarantees and the commitment boundary.

A resolvable target with Resource epoch 3 and Meta epoch 5 yields source event epoch 3, not meta.epoch 5. No extra target acquisition, recursive resolution or target Version events were introduced. PR title and description are unchanged.

Current-head hosted verify and DCO passed. The PR remains unmerged.

Retain the local lifecycle, xref projection and committed-state delivery proposals without substituting new pruning or default-selection behavior. The seven merged upstream changes remain authoritative in their own sections; this PR continues to modify core/events.md only.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Merge upstream main without conflicts. Preserve the lifecycle notification and delivery proposal, including local xref semantics. Adopt accepted upstream example, model and HTTP corrections. All 16 artifacts reproduce; 67 tools tests and documentation checks pass.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
@duglin

duglin commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

let's discuss the xref stuff - but as of now I'm leaning towards closing this PR

Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Comment thread core/events.md Resolved
Incorporate the accepted pagination_noncollection error from upstream without changing this PR's proposals.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc Schier <marcschier@hotmail.com>
@marcschier marcschier changed the title proposal(events): define lifecycle notifications and delivery semantics discussion(events): clarify cross-reference notification semantics Oct 23, 2026
@marcschier

Copy link
Copy Markdown
Contributor Author

Applied the requested reverts in d5c0605. I also removed the central local-ownership restriction: retaining it would contradict the restored Resource event rules. The complete tree now matches upstream main, so there are no remaining proposed file changes.

The xref behavior still needs agreement: whether notifications describe projected Version changes as ordinary Resource changes, and what data can be supplied when the target is unavailable. The earlier unconditional claim about Core requiring meta.epoch omission was too broad and is withdrawn. The description no longer claims to fix #605 or #619.

I have left the PR and all review threads open for your discussion and decision.

Merge upstream main while preserving the complete withdrawal of Events changes. Verified the resulting tree is exactly identical to upstream main; the PR remains open for discussion.

Signed-off-by: Marc Schier <marcschier@hotmail.com>
Signed-off-by: Marc <marcschier@hotmail.com>
@marcschier marcschier changed the title discussion(events): clarify cross-reference notification semantics proposal(events): distinguish xref creation from Version creation Nov 3, 2026
@marcschier
marcschier marked this pull request as ready for review November 24, 2026 13:02
@marcschier marcschier mentioned this pull request Nov 24, 2026
@duglin

duglin commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

on 11/24 call:

  • merge this one into Eventing enhancements #799
  • make sure it talks about all types of events on the xref target, not just new versions

@duglin

duglin commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

moved proposal into #799

@duglin duglin closed this Nov 24, 2026
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.

2 participants