wowbagger 0.1.0-alpha.5 → 0.1.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,8 +5,208 @@ A change to what a command accepts, refuses, emits, or writes is a behaviour
5
5
  change even when the commit that carried it was labelled refactor, docs, or
6
6
  consolidation. The first tagged release inherits this file.
7
7
 
8
+ ## 0.1.0-alpha.6 - 2026-08-17
9
+
10
+ ### Added
11
+
12
+ - **`set.extensions` gives consumer-owned extension members a sanctioned patch
13
+ path.** Two field reports in two days: a consumer's own identifier field
14
+ rides a permitted extension member, and a wrong or missing one had no
15
+ ledger-side repair verb at all. On a provisioned ledger the hand-edit that
16
+ filled the gap is a stale write, so the protocol was forcing the edit it then
17
+ punished. `patch` now accepts an `extensions` container whose members name
18
+ extension members and whose values replace each one whole; `null` removes a
19
+ member. The fixed `set` allowlist is unchanged — `extensions` is one more
20
+ name on it, not an opening for arbitrary keys — so a top-level typo is still
21
+ an `unknown-member` refusal. Which members the container may name comes from
22
+ the committed `<ledger>/.wowbagger/extensions.json`, which declares a member
23
+ name and one value type each (`string`, `integer`, `boolean`, `string-list`).
24
+ **A ledger without that file has no patchable extension member at all**, and
25
+ the refusal names the missing declaration. Five new
26
+ `patch-precondition-failed` issue codes carry the refusals —
27
+ `extension-declaration-missing`, `extension-declaration-invalid`,
28
+ `extension-not-declared`, `extension-value-invalid`, `extension-anchored` —
29
+ in the existing four-member issue shape, with the member at fault named in
30
+ `field`. A member the item writes with a YAML anchor or alias is refused
31
+ rather than replaced, because replacing it would change every node bound to
32
+ the anchor; every member the request does not name keeps its exact
33
+ `extensionNodeIdentity` guarantee. The declaration authorizes a write and
34
+ never describes the ledger: `validate` does not read it, so an item whose
35
+ extension member disagrees with it stays valid and stays repairable. Nested
36
+ extension values still have no patch path and stay a reviewable hand-edit.
37
+ Core contract version stays 3 — the patch request schema widens and no
38
+ response envelope member is added, removed, or renamed — but version 3 is
39
+ published, so `contract_version` cannot answer whether a core carries this:
40
+ probe by sending an extension patch and reading the refusal, or pin the
41
+ distribution version. Documented in mutation contract section 9 and pinned by
42
+ `spec/fixtures/mutations/patch-extensions/`.
43
+
44
+ - **`claim-adopt` gives `unauthorized-revision` a non-destructive remedy.** A
45
+ consumer's staging checkout was blocked exit 6 on three items whose bodies
46
+ were hand-edited in a design session and merged. The refusal was correct, but
47
+ the only documented remedy — restore the authorized revision, then
48
+ `claim-verify` — discards reviewed, merged work. `claim-adopt` records that an
49
+ operator ruled the committed bytes legitimate and moves the coordinator's
50
+ authorized revision to them. It writes no item byte, so `updated` and the body
51
+ survive exactly. It is a standalone verb in the work-claim domain, a sibling
52
+ of `claim-verify`, and it is per item and per revision explicit: the request
53
+ names the item, the revision it believes is authorized, the revision being
54
+ adopted, and who is ruling. There is no adopt-all. It refuses
55
+ `adoption-witness-mismatch` on a stale witness (including a replay of a
56
+ successful adoption), `claim-held` while an unexpired claim holds the item,
57
+ `adoption-revision-uncommitted` unless the adopted revision is at Git `HEAD`
58
+ and in the caller's own working tree, and `adoption-ledger-invalid` when the
59
+ complete ledger would not validate. Success appends one `revision-adoption`
60
+ journal entry naming who, when, and both revisions, so the audit trail records
61
+ the ruling instead of losing it. Adoption is not a fence hole: the next
62
+ out-of-protocol edit is `unauthorized-revision` again, measured against the
63
+ adopted revision. Additive at contract version 1 — one new command, one new
64
+ journal entry type, three new error codes, no existing shape changed.
65
+ Documented in work-claim contract section 3.3 and pinned by
66
+ `spec/fixtures/work-claims/revision-adoption/`.
67
+
68
+ ### Changed
69
+
70
+ - **The report's epic-enablement factor now counts done or killed children
71
+ only.** It counted every child carrying a terminal date, which folded
72
+ archived and deferred children into the numerator: an epic with one done,
73
+ one archived, one deferred, and one backlog child reported enablement 0.75
74
+ while the mutation contract's terminal ratio for the same epic was 0.25. Two
75
+ numbers wore one name. A terminal date is not a terminal disposition —
76
+ archived restores and deferred undefers, both documented edges — so a parked
77
+ child is work postponed, not work retired, and counting it reported progress
78
+ that one transition takes back. The factor now reads the same done-or-killed
79
+ set as the contract and the epic complete rollup: one definition, three
80
+ surfaces. This is display-only and recomputed at render time; no ledger byte,
81
+ no wire shape, and no `ready` ordering changes. What does change is the
82
+ report: an epic with parked children reports a lower percentage, and its open
83
+ children rank lower on the epic-enablement step of `work next`.
84
+ - **Every `unauthorized-revision` remediation string now names both remedies.**
85
+ It was one sentence naming only the restore path, which reads as an
86
+ instruction to throw the edit away; the field report above did exactly that.
87
+ It is now two sentences, and each says what happens to the edit: `Restore the
88
+ authorized revision at <path>, then run claim-verify; that discards the edit.
89
+ Or adopt the committed revision of <path> with claim-adopt, then run
90
+ claim-verify; that keeps the edit.` The finding's `code`, `reason`,
91
+ `observed_surface`, `expected_path`, and revisions are unchanged; only the
92
+ human-readable `remediation` prose changed. `revision-regression` keeps its
93
+ restore-only string on purpose: it only fires while an active claim holds the
94
+ item, which is a state adoption refuses.
95
+ - **`patch` corrects an item title.** `set.title` takes a non-empty schema
96
+ string and replaces the title whole, under the same per-ID lock, exact-byte
97
+ compare-and-swap, candidate complete-ledger validation, and atomic
98
+ publication as every other patch; an item with an active claim is refused,
99
+ and `updated` moves to `request.date`. The scalar node is rewritten in place,
100
+ so the quoting style, the comments, the anchors, and every extension node
101
+ survive byte for byte. This closes a protocol contradiction reported twice
102
+ from the field: correcting a title used to require an out-of-protocol edit,
103
+ and on a provisioned ledger that edit is a stale write, so the next mutation
104
+ refused exit 6 `unauthorized-revision` and every later mutation stayed
105
+ blocked. `null` follows the frontmatter removal convention onto
106
+ `candidate-invalid`, because title is required; `""` is refused one step
107
+ earlier, at the request.
108
+ - **The mutation contract states the frontmatter ownership boundary.** Section
109
+ 9 gains a `Frontmatter ownership` table: one row per member, sorted into
110
+ core-owned (`schema_version`, `id`, `number`, `status`, `created`, `updated`,
111
+ the terminal dates, `decisions`), consumer-editable through `patch` (`title`,
112
+ `priority`, `depends_on`, `related`, `body`), and create-once (`kind`,
113
+ `provenance`, `parent`, `snoozed_until`). The boundary was previously
114
+ discoverable only by sending a patch and reading the refusal. A docs test
115
+ pins every row and the skill teaches the same three classes.
116
+
117
+ ### Decided
118
+
119
+ - **`kind` stays unpatchable, and the contract now says why.** A task-to-epic
120
+ flip changes which parent and children rules the item is validated under and
121
+ which lifecycle edges it may take. It needs its own verb with its own
122
+ preconditions, not a wider patch set.
123
+ - **Extension members stay out of `patch`, and the contract records the
124
+ reasons.** Two field reports asked for a sanctioned path for consumer-owned
125
+ identifier fields riding permitted extension members. The widening was
126
+ assessed against title's machinery and is not the same machinery: the
127
+ fail-closed `set` rule has no room for an arbitrary key, candidate validation
128
+ constrains no extension value, nested and anchored values do not survive a
129
+ whole-value replace the way a scalar does, and the oracle has no observable
130
+ surface to correlate an extension patch against. Section 9 names what a real
131
+ path would need — a `set.extensions` container, a declared per-ledger
132
+ extension schema, a stated rule for anchored and nested values, and an
133
+ oracle-visible surface — so the deferral is a design boundary rather than a
134
+ silence. Their status is stated in the ownership table either way.
135
+ - **`patch` gains `set.body_append`.** It takes a JSON string written after the
136
+ item's current body, under the same string rules `set.body` takes: the empty
137
+ string is valid, the bytes are the UTF-8 encoding of the string exactly, and
138
+ `null` is refused at `/set/body_append` because appending nothing is the empty
139
+ string. It is the same byte splice after the closing delimiter, so no
140
+ frontmatter byte moves, `updated` becomes request.date, and every existing
141
+ body byte survives — the request never names them. `body` and `body_append`
142
+ are mutually exclusive in one request: naming both is an `invalid-request`
143
+ issue at `/set`, exit 2, unchanged. This covers the annotation shape a mirror
144
+ consumer needs without making it carry a merge. The core contract stays
145
+ version 3 — it widens the patch request schema and moves no response envelope
146
+ member — but version 3 is already published without it, so a consumer
147
+ **cannot** probe for append support by reading `contract_version`. Send an
148
+ append and read the refusal instead: a core without it answers `unknown-member`
149
+ at `/set/body_append`, exit 2, unchanged.
150
+
151
+ ### Documentation
152
+
153
+ - **The allowed-edges table carries the defer and undefer edges.** `task` and
154
+ `epic` `backlog` to `deferred` and `deferred` to `backlog` have shipped in
155
+ `src/mutation.js` since deferral existed, both requiring a decision, and the
156
+ ownership table already documented `deferred` as a core-owned field that
157
+ `transition` writes on a defer. Section 8's edge table listed neither row, so
158
+ the one place a consumer looks up what it may drive under-reported the
159
+ lifecycle by two edges. Both rows are added with the evidence the code
160
+ generates — `set deferred; append defer decision` and `clear deferred; append
161
+ undefer decision` — and a docs guard pins the kind, the date, and the
162
+ decision on each. No emitted byte changes and the core contract stays version
163
+ 3: this documents shipped edges, it does not add them.
164
+
165
+ - **The epic derivation section cites one shared definition instead of a
166
+ divergence.** It recorded the report's epic-enablement factor as a different,
167
+ wider number than the terminal ratio. The report factor was narrowed to match
168
+ (see Changed above), so the paragraph is replaced: the contract, the epic
169
+ complete rollup, and the report all count done or killed direct children over
170
+ all direct children, and the section now says outright that a terminal date is
171
+ not the test. The docs guard is re-pointed at the new truth rather than
172
+ relaxed.
173
+
174
+ - **The contract states that `set.body` replaces and never merges.** A consumer
175
+ mirroring an external source regenerated an item body from its upstream card
176
+ and destroyed a ledger-only annotation; every check passed, because
177
+ `expected_revision` is a byte-level lost-update guard with no semantic safety.
178
+ Mutation contract section 9 and the skill's body bullet now say it plainly:
179
+ the replacement is total, and a mirroring consumer MUST read-modify-write from
180
+ the current item body and MUST never regenerate from the source alone. Docs
181
+ guards pin both sentences.
182
+
183
+ - **The contract documents the selector an `inspect` `item-not-found` refusal
184
+ echoes.** `inspect --number <n>` on a number no item carries emits
185
+ `details: {"number": <n>}`, and it has done so since `--number` shipped in
186
+ 0.1.0-alpha.5. Mutation contract section 5 claimed these details contain only
187
+ `id`, so the published prose and the published wire disagreed. Section 5 now
188
+ states the rule the runtime follows — the details carry exactly the selector
189
+ the request used, `id` for `--id` and `number` for `--number` — and
190
+ `spec/fixtures/mutations/inspect-number-not-found/` pins it. No emitted byte
191
+ changes and the core contract stays version 3: this documents a shipped
192
+ shape, it does not introduce one. The adapter surfaces still require id-only
193
+ details, deliberately: the adapter's `inspect` request accepts no `number`
194
+ member and always invokes `--id`, so it can never see the number variant.
195
+
8
196
  ## 0.1.0-alpha.5 - 2026-08-16
9
197
 
198
+ ### Breaking
199
+
200
+ - **`number` is no longer caller-settable on schema version 2 ledgers.**
201
+ `create` refuses a request supplying `item.number` and assigns the next
202
+ number itself (`max + 1` under the number-index lock); `patch` refuses
203
+ `set.number` because the number is the immutable item identity. A consumer
204
+ mirroring a legacy backlog cannot carry its legacy numbers into wowbagger
205
+ handles — keep legacy identifiers in a permitted extension member or in the
206
+ item body instead. (Shipped as part of the number-as-identity work; this
207
+ notice was added after the 0.1.0-alpha.5 tarball was cut, so the packaged
208
+ changelog carries it only inside the contract version 3 delta note.)
209
+
10
210
  ### Added
11
211
 
12
212
  - **The report draws the whole ledger as a 3D dependency graph.** It sits below