Skip to content

Commit 1f662af

Browse files
Nick Websterclaude
andcommitted
docs(v0.11-M54-G): post-IMPL refactor-audit — file R-v0.11-NEW-5/6 + refresh Live numbers + flip M54-G status row
Post-IMPL housekeeping pass over the v0.11-M54-G cycle (f08bfef..59dff5a, 4 commits). Filed 2 new R-class watch-items + swept 2 genuine drift sites in CLAUDE.md and v0.11-plan.md (no code touched; gates re-verified green). R-class candidates filed: - R-v0.11-NEW-5 — Sentinel-normalisation anti-pattern: `raw === null || raw === undefined` early-return for sentinel-producing helpers masks shape-drift (code-hygiene watch-item, LOW). The M54-G IMPL R1 P2-1 fix tightened parseItemDescription from the two-clause shape to `raw === null` only. Cross-doc grep confirmed 9 throw-on-absent call sites are safe (both null and undefined correctly route to not_found); 0 other sentinel-returning sites found. Watch for 2nd sentinel-returning parse helper — at 2 sites consider folding the audit-point into the codex pre-flight template's W3 enumeration. - R-v0.11-NEW-6 — Codex pre-flight W3 wire-shape audit could exhaustively enumerate failure surfaces (a)-(e) (process / template extension, LOW-MEDIUM). The M54-G cycle showed Codex pre-flight R1 caught (c) malformed-row case but missed (d) missing-key drift, which Codex IMPL R1 then caught (same priority, same audit point). Single-instance evidence is insufficient (Codex review quality has natural variance); watch for 2nd reproducible miss before folding the (a)-(e) enumeration into the template. Doc-drift sites fixed: - CLAUDE.md:53-77 Live numbers block — refreshed from the stale v0.10-M53 close baseline (4270 tests + 4 skipped, 95.89% branches, 118 commands, 1354/1368 functions) to the M54-G IMPL close baseline (4295 tests + 5 skipped, 95.86% branches, 119 commands, 1359/1373 functions). Earlier coverage contributors list extended with the v0.10-M53 NOUN_DESCRIPTIONS lift. - docs/v0.11-plan.md:66 M54-G status column — flipped from "pre-flight CLOSED 2026-05-23 ... IMPL pending" to "✅ SHIPPED 2026-05-23" with the IMPL close SHA + Codex R2 verdict + the R-v0.11-NEW-2 graduation note. Considered but NOT changed (historical narrative — leaving alone so the next audit doesn't re-flag): - docs/v0.11-plan.md:428,432,693,699 + .claude/rules/workflow.md:97 — references to "rejection-lift OR pure-refactor" old framing are all legitimate historical narratives describing the widening, not stale current prose. - docs/v0.9-plan.md:1045 R-v0.9-NEW-2 original filing — entries in plan-doc §22 stay frozen at their filing-state per project convention; graduations/widenings recorded in subsequent plan-docs (v0.10-plan.md §3 M53 IMPL close + v0.11-plan.md §3 M54-G IMPL close). - CLAUDE.md:344-348 — describes M53 close historically with "2nd instance: M50 deletion + M53 lift" — accurate AS OF v0.10-M53 close; the M54-G widening to 3 instances is recorded in v0.11 content (lines 191+ + plan-doc). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 59dff5a commit 1f662af

2 files changed

Lines changed: 102 additions & 28 deletions

File tree

CLAUDE.md

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,38 @@ humans are second-class. Built incrementally via Claude Code on top of
5050
`monday-cli@0.8.0` (tag `v0.8.0` at `090fb76`, 2026-05-21T23:45:48Z);
5151
`monday-cli@0.7.0` (tag `3e46f59`, 2026-05-20T15:48:07Z).
5252
- **package.json version:** `0.10.0`.
53-
- **Live numbers:** **4270 tests pass + 4 skipped** (the **v0.10-M53
54-
IMPL** net +10 over the M52 baseline of 4260 — 12 new
55-
`tests/unit/commands/types.test.ts` cases pinning the
56-
`NOUN_DESCRIPTIONS` map contract + `ensureSubcommand` 2-arg/3-arg
57-
overload + `lookupNounDescription`'s `unknown_noun` strict-mode
58-
invariant, less two replaced tests subsumed by the new contract.
59-
The 4 skips are unchanged: the 2 pre-existing + the multipart-upload
60-
smoke test + the board-projection schema-drift smoke test). **✅ CI
61-
`test:coverage` PASSES:** global **branch coverage 95.89% vs the
62-
95.45% floor** (HOLDS across M53 — the pure-refactor lift removed
63-
87 single-line + 35 multi-line literal 3rd-args + added one
64-
`lookupNounDescription` strict-mode branch, all covered by the new
65-
contract tests). **29 ERROR_CODES** (unchanged across M53 — the
66-
`lookupNounDescription` `unknown_noun` discriminator routes through
67-
the existing `internal_error` code); **118 commands** (unchanged
68-
across M53 — pure-refactor lift, no command delta);
69-
**functions 98.97% (1354/1368)** — net +1 generated overload-witness
70-
function the migration exercises, no coverage regression;
71-
`npm audit` **0 vulnerabilities**. Earlier coverage contributors
72-
still hold: the **v0.8 refactor cluster** (`item/update.ts` 79.42% →
73-
87.27%), **R-v0.8-NEW-11** transport-helper lift, the M46 dispatch-
74-
arm tests (`item/create.ts` 82.31% → 86.58%). **Release-prep held
75-
all numbers** — every release-prep edit is docs-only (README, CHANGELOG,
76-
plan-doc, CLAUDE.md) plus `package.json`/`package-lock.json` version
77-
bumps; re-verified green at the close-docs gate.
53+
- **Live numbers:** **4295 tests pass + 5 skipped** (the **v0.11-M54-G
54+
IMPL** net +25 over the v0.10.0 baseline of 4270 + 4 — 13 unit
55+
`tests/unit/api/item-description.test.ts` cases pinning the
56+
`ITEM_DESCRIPTION_QUERY` selection, the `documentBlockSchema` /
57+
`itemDescriptionSchema` shapes, and `parseItemDescription` parse-
58+
boundary surfaces; 8 integration
59+
`tests/integration/commands/item-get-description.test.ts` cases
60+
(happy + wire-null + emptied-blocks + not-found + usage-error +
61+
401 + malformed-row guard + missing-description-key guard); 1 new
62+
`RUN_LIVE_TESTS`-gated skip in `live-schema-drift.test.ts` for the
63+
`ITEM_DESCRIPTION_QUERY` smoke; 1 envelope-snapshot test + the
64+
pre-existing snapshot count delta; less 1 flipped unit test for
65+
`parseItemDescription(undefined)`. The 5 skips: the 2 pre-existing +
66+
the multipart-upload smoke + the board-projection schema-drift smoke
67+
+ the new item-description schema-drift smoke). **✅ CI
68+
`test:coverage` PASSES:** global **branch coverage 95.86% vs the
69+
95.45% floor** (HOLDS across M54-G — the absent-key guard + tightened
70+
`parseItemDescription` early-return added new branches all covered
71+
by the new tests; net 95.89% → 95.86% reflects the M54-G IMPL
72+
adding `client.raw` + new schema branches the test surface didn't
73+
exhaust at every defensive arm). **29 ERROR_CODES** (unchanged
74+
across M54-G — the `missing_description_key` discriminator routes
75+
through the existing `internal_error` code); **119 commands** (+1
76+
for `monday item get-description`); **functions 98.98% (1359/1373)**
77+
— net +5 functions from the new schema + helper + projector + verb
78+
body, no coverage regression; `npm audit` **0 vulnerabilities**.
79+
Earlier coverage contributors still hold: the **v0.8 refactor
80+
cluster** (`item/update.ts` 79.42% → 87.27%), **R-v0.8-NEW-11**
81+
transport-helper lift, the M46 dispatch-arm tests (`item/create.ts`
82+
82.31% → 86.58%), the **v0.10-M53** `NOUN_DESCRIPTIONS` single-
83+
source-of-truth lift (collapsed 122 duplicate `ensureSubcommand`
84+
literals, no coverage regression).
7885
- **CI status:** **fully green.** The v0.7.0 table-colour test flake
7986
(root cause: cli-table3's `@colors/colors` caches its enabled-state
8087
from ambient TTY detection, so `color: true` emitted no ANSI in a
@@ -239,8 +246,14 @@ humans are second-class. Built incrementally via Claude Code on top of
239246
(jsonScalarOrNull pattern re-used in `item-description.ts`;
240247
lift at 3rd consumer per R-NEW-58). 4 R-class watch-items
241248
filed at pre-flight (R-v0.11-NEW-1/2/3/4); R-v0.11-NEW-2
242-
GRADUATED at IMPL close; R-v0.11-NEW-1/3/4 stay WATCH. Net
243-
stats: **4295 tests pass + 5 skipped** (+25 vs v0.10.0 baseline
249+
GRADUATED at IMPL close; R-v0.11-NEW-1/3/4 stay WATCH;
250+
**2 more watch-items filed at post-IMPL refactor-audit**
251+
(R-v0.11-NEW-5 sentinel-normalisation anti-pattern, 1 known
252+
instance fixed at M54-G IMPL R1 P2-1, watch for 2nd; R-v0.11-NEW-6
253+
Codex pre-flight W3 wire-shape audit could exhaustively
254+
enumerate (a)-(e) failure surfaces, watch for 2nd reproducible
255+
miss before folding into template). Net stats: **4295 tests pass
256+
+ 5 skipped** (+25 vs v0.10.0 baseline
244257
of 4270 + 4); branches **95.86%** (≥ 95.45 floor); functions
245258
1359/1373; **29 ERROR_CODES** unchanged; **119 commands** (+1
246259
vs v0.10.0); `npm audit` 0 vulns. v0.10.0 stays PUBLISHED +

docs/v0.11-plan.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
6464
| M | Surface | Wire op | Status |
6565
|---|---------|---------|--------|
66-
| **M54-G** | **`monday item get-description <iid>` — narrow companion read.** New verb that surfaces Monday's `Item.description { id, blocks: [DocumentBlock] }` via raw GraphQL — 4 projected `DocumentBlock` fields (`id`, `type`, `content`, `position`) out of the 9 wire fields. Wire-null description (item never had one) normalises to the sentinel `{id: null, blocks: []}` so the single-resource envelope's `data` slot stays an iterable object (agents distinguish absent via `data.id === null`). Mirrors v0.9-M52's `board views <bid>` carve-out from `board describe` — heavy/nested content lives behind an opt-in verb rather than bloating `ITEM_FIELDS_FRAGMENT`'s ~16 universal consumers. SDK 14.0.0-untyped (same drift class as `hierarchy_type` / `views`); two-layer wire selection-pin guard applies (cassette `match_query: /description \{/` + RUN_LIVE_TESTS `toHaveProperty('description')`). | `query ItemGetDescription($ids: [ID!]!) { items(ids: $ids) { id description { id blocks { id type content position } } } }` | **pre-flight CLOSED 2026-05-23** (`f08bfef` — verb registers + tests + cassette pin + live-smoke; per R-v0.9-NEW-2 the new narrow verb's wire leg IS the runtime payload at pre-flight, no stub literal); IMPL pending (close-docs sweep + Codex IMPL review; very thin per the pure-additive shape) |
66+
| **M54-G** | **`monday item get-description <iid>` — narrow companion read.** New verb that surfaces Monday's `Item.description { id, blocks: [DocumentBlock] }` via raw GraphQL — 4 projected `DocumentBlock` fields (`id`, `type`, `content`, `position`) out of the 9 wire fields. Wire-null description (item never had one) normalises to the sentinel `{id: null, blocks: []}` so the single-resource envelope's `data` slot stays an iterable object (agents distinguish absent via `data.id === null`). Mirrors v0.9-M52's `board views <bid>` carve-out from `board describe` — heavy/nested content lives behind an opt-in verb rather than bloating `ITEM_FIELDS_FRAGMENT`'s ~16 universal consumers. SDK 14.0.0-untyped (same drift class as `hierarchy_type` / `views`); two-layer wire selection-pin guard applies (cassette `match_query: /description \{/` + RUN_LIVE_TESTS `toHaveProperty('description')`). | `query ItemGetDescription($ids: [ID!]!) { items(ids: $ids) { id description { id blocks { id type content position } } } }` | **✅ SHIPPED 2026-05-23** (pre-flight `f08bfef` Codex R1 CONVERGED 0 P1; IMPL close-docs `5738b64` Codex R2 CONVERGED 0 P1/P2/P3 — R1 P2-1 absent-key shape-drift gap folded inline + new `missing_description_key` discriminator + `parseItemDescription` early-return tightened to literal `null` only; R-v0.11-NEW-2 GRADUATED widening R-v0.9-NEW-2 rule to 3 instances in workflow.md) |
6767
| ~~M39 / M40 / M41~~ | API `2026-04` pin + `item set-description` + `doc block-create-bulk` || DEFERRED — SDK 15.x not published (**5th-consecutive stall**) |
6868
| ~~M44 / M45~~ | user-entity migration + `user activity` || DEFERRED — SDK 16.x not published |
6969
| **release-prep** | Version bump 0.10.0 → 0.11.0; CHANGELOG `[0.11.0]` headlining the new verb (one user-impact line per `feedback_public_docs_clean`); ToC audit; deferral-slot slip cross-doc grep (R-NEW-82); README refresh per R-v0.9-NEW-15 across the three surfaces (quickstart, per-version Scope block, `**v<next> (next):**` block — likely absent post-`317ae04` collapse); help-text hygiene grep (R-v0.8-NEW-21); envelope-snapshot refresh probe; close-docs sweep. Codex skipped per R-NEW-84 if zero production `src/**/*.ts` semantic changes outside the M54-G IMPL close. | (n/a) | pending |
@@ -740,3 +740,64 @@ pending the user):
740740
Cheap fold; do at next `_lib.ts` edit OR proactively at v0.11
741741
release-prep. **Status: OPEN (DX-only, defer until next probe
742742
authoring).**
743+
744+
### New at M54-G IMPL close (2026-05-23 — post-IMPL refactor-audit)
745+
746+
- **R-v0.11-NEW-5 — Sentinel-normalisation anti-pattern: `raw ===
747+
null || raw === undefined` early-return for sentinel-producing
748+
helpers masks shape-drift** (code-hygiene watch-item, LOW). The
749+
M54-G IMPL R1 P2-1 fix (`5738b64`) tightened `parseItemDescription`
750+
from `raw === null || raw === undefined` to **`raw === null`
751+
only**. The two-clause early-return was correct for THROW-on-
752+
absent helpers (which constitute the majority of the codebase's
753+
similar shape — `assertUpdateMutationPresent`,
754+
`assertResponseFieldPresent`, `projectMutationUpdate`,
755+
`workspace/create.ts`'s post-mutation parse, etc., 9+ sites all
756+
routing both `null` and `undefined` to `not_found` correctly).
757+
But for **SENTINEL-returning** parse helpers (rare —
758+
`parseItemDescription` is currently the only known instance in
759+
`src/`), the same shape silently collapses JS-undefined-from-
760+
shape-drift into the wire-null sentinel, making absent-key
761+
shape regressions indistinguishable from genuine "no description
762+
set" responses. **Cross-doc grep at this audit:** 9 throw-on-
763+
absent sites confirmed safe; 0 other sentinel-returning sites
764+
found. **Trigger:** if a 2nd sentinel-returning parse helper
765+
ships, audit it for the same masking + either tighten to `raw
766+
=== null` only OR add an explicit upstream `hasOwnProperty.call`
767+
guard at the verb body (the M54-G two-layer pattern). At 2 sites,
768+
consider folding the audit-point into the codex pre-flight
769+
template's W3 enumeration. **Status: WATCH (1 KNOWN INSTANCE,
770+
ALREADY FIXED).** Cross-refs M54-G IMPL R1 P2-1.
771+
772+
- **R-v0.11-NEW-6 — Codex pre-flight W3 wire-shape audit could
773+
exhaustively enumerate failure surfaces** (process / template
774+
extension, LOW-MEDIUM). The M54-G cycle showed Codex pre-flight
775+
R1 caught `(c) malformed-row` (non-object scalar
776+
`items: [42]` → P2-1) but missed `(d) missing-key` (object
777+
without the selected field `items: [{id: '12345'}]`), which
778+
Codex IMPL R1 then caught (P2-1 — same priority, same audit
779+
point W3, same fix-class). Both fall under "wire-shape drift
780+
hidden by the projection boundary's sentinel-normalisation"
781+
but the pre-flight Codex reviewer enumerated only the malformed-
782+
row case + missed the missing-key sibling. **Candidate:** add a
783+
sub-bullet to the codex-pre-flight-review.md template's W3
784+
pattern (or to milestone-specific W3 enumeration prose for any
785+
read verb with a wire-null sentinel normaliser) asking the
786+
reviewer to walk the FULL failure-surface set:
787+
(a) populated wire shape — happy path
788+
(b) wire-null sentinel — `field: null` literal
789+
(c) malformed row — non-object scalar / wrong-type at items[0]
790+
(d) missing-key drift — object without the selected field
791+
(e) malformed nested shape — schema parse-boundary
792+
**Trigger:** at the 2nd "Codex IMPL caught a wire-shape failure
793+
surface Codex pre-flight missed" instance, fold the
794+
enumeration into the template's W3 framing OR into
795+
`.claude/rules/testing.md` as a per-milestone audit-point
796+
checklist for wire-null sentinel normalisers. The single-
797+
instance evidence is insufficient (Codex review quality has
798+
natural variance per round); a 2nd reproducible miss confirms
799+
the gap is template-shape rather than reviewer-variance.
800+
**Status: WATCH (1 INSTANCE, NEED 2ND BEFORE FOLDING).**
801+
Cross-refs R-v0.7-NEW-4 (parent process-discipline framing —
802+
"pre-IMPL checklist replaces round-N-specific term discovery";
803+
R-v0.11-NEW-6 is the wire-shape-surface analog).

0 commit comments

Comments
 (0)