Repository navigation
feat(op): same-URI production appends generations; GetOrCreate returns the canonical - #614
Merged
Merged
Conversation
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.
Phase 4, PR 2 of the resource-construction campaign (docs/plans/resource-construction.md). Closes #610.
The step-5 audit verified the §3 production matrix end to end on the run clone and found two live
residues of the superseded plan-time output model:
Shadowstill carried the write-write conflict. §4 (revised 2026-08-20) rules same-URI production asrun-time generations — "legal versioning when the plan ordered them, an authoring race when it did not" —
but a different producer at an occupied URI errored ("resource conflict: URI targeted by both"). The
error is gone: different producers append generations, the namespace repoints, history survives. The
dead error return retired with it (
Shadow(r, producerID) → id; §2's surface listing updated), andShadow's doc header — which still described "the plan-time output registration operation" verbatim — is
rewritten to the ruled semantics.
GetOrCreatereturned the raw candidate. It ignored Shadow's returned id, marked the CANDIDATEactive (stamping Active under an empty id on the deference path), and handed producers an un-interned
object whenever Shadow adopted an existing generation. It now returns the canonical for whatever
generation Shadow leaves current, and the producerless deference no longer adopts a Gone entry —
revival always appends, per the matrix.
Also corrected: the plan's step-5 parenthetical had conflated
Resolve's Etag/digest cascade (§4.1)with production — production at an occupied location shadows unconditionally.
Pins. Catalog level: different-producers-append-generations (replacing the conflict pin — a pin of
the superseded model), same-producer-appends, location-hit-shadows re-pinned with a real producer (the
old pin passed "" and pinned the raw-candidate bug), producerless-adopts-canonical,
producerless-over-Gone-appends. Run-clone end to end (
production_matrix_test.go): fresh-URIproduction (Active + producer stamp in the trace, planning catalog untouched), claimed-URI production
(claim generation + shadow generation), Gone revival (destroyer stamp + the writer's Active revival).
Immediate mode (step 6): the session product interns; session Convert still constructs and claims.
Plus
resolveRecordedResourceunit pins (hit returns the canonical; miss/non-string/non-resource fallthrough unresolved).
Refs #581, #586.
Gate:
make test103 ok / 0 fail;make vetclean under darwin, windows, and linux;gofmt -lclean.