Skip to content

feat(op): same-URI production appends generations; GetOrCreate returns the canonical - #614

Merged
David-Noble-at-work merged 1 commit into
developfrom
production-matrix-audit
Aug 23, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
production-matrix-audit

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

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:

Shadow still carried the write-write conflict. §4 (revised 2026-08-20) rules same-URI production as
run-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), and
Shadow's doc header — which still described "the plan-time output registration operation" verbatim — is
rewritten to the ruled semantics.

GetOrCreate returned the raw candidate. It ignored Shadow's returned id, marked the CANDIDATE
active (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-URI
production (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 resolveRecordedResource unit pins (hit returns the canonical; miss/non-string/non-resource fall
through unresolved).

Refs #581, #586.

Gate: make test 103 ok / 0 fail; make vet clean under darwin, windows, and linux; gofmt -l clean.

@David-Noble-at-work David-Noble-at-work self-assigned this Aug 23, 2026
@David-Noble-at-work
David-Noble-at-work merged commit f03e938 into develop Aug 23, 2026
8 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the production-matrix-audit branch August 23, 2026 03:20
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.

Products reconcile against claimed entries -- audit and pins

1 participant