DD-338 Phase D.5 — marketplace refresh runbook + automation wrapper #31

Merged
piersdd merged 1 commit from feat/dd-338-d5-build-catalog-republish into main 2026-05-24 02:58:06 +00:00
piersdd commented 2026-05-24 02:57:36 +00:00 (Migrated from github.com)

Summary

Final substantive Phase D sub-phase: a thin ESM Node wrapper around the existing scripts/build-catalog.js plus an operational runbook covering the D.2 → D.3 → D.5 → daemon refresh chain.

  • scripts/dd-338-refresh-catalog.mjs (200 LOC) — orchestrates snapshot → regenerate → diff → summary. Move-renames dist/catalog.json to dist/catalog.json.prev, runs build-catalog.js as a child process with stdio inherited, then diffs across five granularity axes (scope_filtering, field_projection, deterministic_ordering, audit_surface, domain_scope) plus entry-level tier/readiness and presence-level tool add/remove. Output to dist/dd-338-refresh-summary.json (gitignored) + brief stdout summary.
  • docs/dd-338-marketplace-refresh.md — five-step runbook (regenerate → review → commit+push → daemon refresh → verify) with structured-summary shape example + failure-modes table.
  • scripts/dd-338-refresh-catalog.test.js — 10 new test cases covering baseline run, identical catalogs, single tool-axis flip, entry tier flip, entry add/remove, tool-presence add/remove, plus three formatSummary rendering cases.

Behaviour

  • First run (no dist/catalog.json present): summary marks baseline:true, every entry counted as an addition.
  • Steady-state (no source changes): summary reports No catalog changes detected. — verified end-to-end against current main (6f29143): 59 plugins + 11 packs = 70 entries indexed on baseline, empty-diff on re-run.
  • Build failure: prev snapshot is preserved at dist/catalog.json.prev, exit code propagates from build-catalog.js.

Test plan

  • node --check scripts/dd-338-refresh-catalog.mjs — syntax clean
  • node --test scripts/dd-338-refresh-catalog.test.js — 10/10 pass
  • Wrapper end-to-end on current main — baseline first-run + empty-diff second-run both observed
  • Existing test suite — 188/188 pass after build-forge-context.js regenerates the ignored scripts/generated/ artefact (pre-existing dependency, not introduced here)
  • Architect dry-run against a real D.3 --apply output to confirm the diff matches the proposals (deferred to first live D.3 cycle)

Scope-out

  • R2 / Cloudflare Worker publish — owned by stallari-registry-infra deploy pipeline
  • Daemon-side cache invalidation — stallari-cli registry refresh documented in runbook §4
  • Actually applying tier flips — that's D.3's tier_issuance.py --apply

Closes DD-338 Phase D.5. Final substantive Phase D sub-phase before the ≤10% refuse-envelope gate verification (D.4's territory).

🤖 Generated with Claude Code

## Summary Final substantive Phase D sub-phase: a thin ESM Node wrapper around the existing `scripts/build-catalog.js` plus an operational runbook covering the D.2 → D.3 → D.5 → daemon refresh chain. - `scripts/dd-338-refresh-catalog.mjs` (200 LOC) — orchestrates snapshot → regenerate → diff → summary. Move-renames `dist/catalog.json` to `dist/catalog.json.prev`, runs `build-catalog.js` as a child process with stdio inherited, then diffs across five granularity axes (`scope_filtering`, `field_projection`, `deterministic_ordering`, `audit_surface`, `domain_scope`) plus entry-level `tier`/`readiness` and presence-level tool add/remove. Output to `dist/dd-338-refresh-summary.json` (gitignored) + brief stdout summary. - `docs/dd-338-marketplace-refresh.md` — five-step runbook (regenerate → review → commit+push → daemon refresh → verify) with structured-summary shape example + failure-modes table. - `scripts/dd-338-refresh-catalog.test.js` — 10 new test cases covering baseline run, identical catalogs, single tool-axis flip, entry tier flip, entry add/remove, tool-presence add/remove, plus three `formatSummary` rendering cases. ## Behaviour - **First run** (no `dist/catalog.json` present): summary marks `baseline:true`, every entry counted as an addition. - **Steady-state** (no source changes): summary reports `No catalog changes detected.` — verified end-to-end against current main (`6f29143`): 59 plugins + 11 packs = 70 entries indexed on baseline, empty-diff on re-run. - **Build failure**: prev snapshot is preserved at `dist/catalog.json.prev`, exit code propagates from `build-catalog.js`. ## Test plan - [x] `node --check scripts/dd-338-refresh-catalog.mjs` — syntax clean - [x] `node --test scripts/dd-338-refresh-catalog.test.js` — 10/10 pass - [x] Wrapper end-to-end on current main — baseline first-run + empty-diff second-run both observed - [x] Existing test suite — 188/188 pass after `build-forge-context.js` regenerates the ignored `scripts/generated/` artefact (pre-existing dependency, not introduced here) - [ ] Architect dry-run against a real D.3 `--apply` output to confirm the diff matches the proposals (deferred to first live D.3 cycle) ## Scope-out - R2 / Cloudflare Worker publish — owned by `stallari-registry-infra` deploy pipeline - Daemon-side cache invalidation — `stallari-cli registry refresh` documented in runbook §4 - Actually applying tier flips — that's D.3's `tier_issuance.py --apply` Closes [[DD-338]] Phase D.5. Final substantive Phase D sub-phase before the ≤10% refuse-envelope gate verification (D.4's territory). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Stallari/plugins!31
No description provided.