Task: Restore the publish path for an atomised convention

Table of Contents

This page documents a task in the Atomise every convention onto the central entity story. It captures the goal, current status, acceptance, and any notes or results.

1. Goal

(Describe what user-visible-or-internal change this task produces.)

2. Status

Field Value
State DONE
Parent story Atomise every convention onto the central entity
Now Nothing.
Waiting on Nothing.
Next Nothing.
Last touched 2026-10-15

3. Acceptance

4. Plan

(Implementation strategy. Written when work starts; key decisions are distilled into the parent story's * Decisions at close, but the plan itself stays — it is the historical record of what we did.)

5. Measurements

Every number this task claims about a tree, with the command that produced it and the commit it was measured at. A number without both is not a measurement, because a clean-up record describes a tree and trunk moves under a branch: a consumer count, a gate's component count and a suite's size all change with no code changing, and the reader of a bare number cannot tell which tree it came from. Where the raw output matters, put it in an evidence/ file beside the task and name that file in the Command column.

What Value Command Commit
       

6. Notes

7. Test Scenarios

Manual QA scenarios (scaffolded via compass add test_scenario) that verify this task. Link new ones here as they're created; the scenario doc itself links back via its "Verifies task" field.

Scenario State Notes
     

8. PRs

PR Title
   

9. Review

Comment summary File Decision Notes
       

10. Result

The composite convention has a publish path. One artefact table per live table stages the identity and the payload, never the uuid and never the party, because the database assigns the key and the publish names the party. The existing conventions publisher delegates to a composite one for the atomised kind, so there is still one dataset, one artefact type and one subject.

Identity resolves by party, kind and name, and each part's live rows are made exactly the staged rows. That closure is what closes the old leg form when a convention changes form, instead of leaving it carrying both forms at once; the document path closes omitted forms too.

Exercised on a recreated database against the real ore.conventions dataset: a first publish inserted the staged conventions, a republish changed nothing and left every version untouched, and restaging one convention in the other form inserted one part and closed the other. pgTAP now covers this publisher; the flat one had no test at all.

Left deliberately: the publishers declare p_mode and never read it, while the contract says it accepts upsert, insert-only and replace-all. The contract and the code disagree, and one parameter cannot express both the row conflict and the closure, so it needs its own decision.

Emacs 29.3 (Org mode 9.6.15)