Repository navigation
proposal(events): distinguish xref creation from Version creation - #686
marcschier wants to merge 15 commits into
Conversation
Signed-off-by: Marc Schier <marcschier@hotmail.com>
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>
Review feedback at
|
| 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 Resourcecreatedorupdatedevent that includesdata,epochandmeta.epochare 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
metaentity's attributesepochthroughdefaultversionstickyMUST be excluded ifxrefis set because those would appear as part of the target Resource'smetaentity.” — source - Why: The two projected values are not symmetric in Core. Resource-level
epochis projected from the target and is therefore genuinely target-availability-dependent.meta.epochis not projected onto the source at all: Core removesepoch(throughdefaultversionsticky) from a source Resource'smetawheneverxrefis set, in both the API-view example and the document-view rule, precisely because those values belong to the target's ownmetaentity. 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/realwithepoch3 andmeta.epoch5. A client creates alias/dirs/d1/files/aliaswithmeta.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 } } Theepoch3 is correct (Core projects it). Themeta.epoch5 is not the subject's value: GET /dirs/d1/files/alias… - Suggested fix: State the two cases separately: Resource-level
epochis a projected target value included only when the projection yields it;meta.epochMUST be omitted from every cross-reference Resourcecreated/updatedevent, because Core excludes themetaepoch from a source Resource wheneverxrefis 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.md74-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 (seexregcorrelationid), the following constraints apply: - Only onecreated,updatedordeletedevent MUST be generated persubject. - 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>
Selected feedback addressed at
|
| 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>
|
let's discuss the xref stuff - but as of now I'm leaning towards closing this PR |
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>
|
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>
|
on 11/24 call:
|
|
moved proposal into #799 |
Current proposal
Commit
9e103e2be4de6a7d90630bd2b346e4d08c029cf1proposes 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/f2referring to existing/dirs/d1/files/f1: it produces Resource-created forf2, not synthetic Version-created events beneathf2. Ordinary Resource creation still requires at least one Version-created event. Onlycore/events.mdchanges. Spelling, whitespace and diff checks pass.Earlier review and withdrawals
The reviewer-requested Events reverts remain preserved in
d5c06059a959bb8652ee1dd145301bd807242572, after merging upstreammainat90e45d9035c7c28f13c808c8f203ba253317a08e. 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:
This proposal does not change
epochormeta.epochfield 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.