@@ -107,7 +107,24 @@ the crate's filesystem home — q2 root — even inside the WASM build). So:
107107 resolve ` quarto-yaml ` , add a direct ` quarto-yaml = "0.1.0" ` to the wasm crate (as
108108 was needed for source-map).
109109
110- ## 6. The one design task: error codes (needs a user decision)
110+ ## 6. The one design task: error codes (RESOLVED 2026-06-29 → option B)
111+
112+ > ** DECISION (2026-06-29, user):** Option ** (B)** — ship ` Q-1-x ` as-is in ` 0.1.0 ` ,
113+ > defer the origin-code migration (` yaml-schema/* ` ) to ` 0.2.0 ` . Rationale: keep
114+ > ` 0.1.0 ` ** non-breaking** for the invisible internal Posit consumers that
115+ > currently key on ` Q-1-x ` ; cut over to discipline-conformant origin codes in a
116+ > coordinated ` 0.2.0 ` .
117+ >
118+ > ** Consequence:** ` quarto-yaml-validation/src/error.rs ` is shipped ** unchanged**
119+ > for ` 0.1.0 ` — the 14 ` ValidationErrorKind::error_code() ` mappings (` Q-1-10 ` …
120+ > ` Q-1-99 ` ) and the ~ 15 tests asserting them stay exactly as-is and stay green. No
121+ > error-code work in this phase. With no catalog installed in the standalone repo,
122+ > diagnostics render ** code-only** (` EmptyCatalog ` ); tests assert on the
123+ > ` error_code() ` string, not on rendered catalog text, so they are unaffected.
124+ > A ` 0.2.0 ` TODO carries the ` Q-1-x ` → ` yaml-schema/* ` migration (see §6-original
125+ > below for the proposed mapping).
126+ >
127+ > ### Original analysis (kept for the deferred 0.2.0 work)
111128
112129` quarto-yaml-validation/src/error.rs ` ` ValidationErrorKind::error_code() ` currently
113130returns ** Quarto presentation codes** ` Q-1-10 ` , ` Q-1-11 ` , … These do ** not** belong
@@ -138,60 +155,87 @@ the origin codes and may remap to their own presentation codes.
138155## 7. Execution checklist
139156
140157### Phase A — ` quarto-yaml ` (the leaf; publish first)
141- - [ ] Create ` /Users/cscheid/repos/github/posit-dev/quarto-yaml/ ` as a ** workspace** ;
142- copy ` crates/quarto-yaml/ ` → ` crates/quarto-yaml/ ` ; add ` LICENSE ` (from q2
143- root), ` .gitignore ` (` /target ` ), ` .gitattributes ` (` * text=auto eol=lf ` ),
144- ` README.md ` (write fresh — the crate is a YAML parser with source tracking).
145- - [ ] Workspace ` Cargo.toml ` : ` [workspace] members=["crates/*"] ` ,
158+ > ** Status 2026-06-29:** local scaffolding + verification DONE; committed locally
159+ > on ` main ` of ` posit-dev/quarto-yaml ` (commit ` 06c6dd3 ` ). Stopped at the outward
160+ > gate (` gh repo create ` + user ` cargo publish ` ).
161+ - [x] Create ` /Users/cscheid/repos/github/posit-dev/quarto-yaml/ ` as a ** workspace** ;
162+ copied ` crates/quarto-yaml/ ` (src + benches) → ` crates/quarto-yaml/ ` ; added
163+ ` LICENSE ` (from q2 root), ` .gitignore ` (` /target ` ), ` .gitattributes `
164+ (` * text=auto eol=lf ` ), repo ` README.md ` + crate ` README.md ` .
165+ - [x] Workspace ` Cargo.toml ` : ` [workspace] resolver="3" members=["crates/*"] ` ,
146166 ` [workspace.package] ` (version ` 0.1.0 ` , edition ` 2024 ` , license ` MIT ` ,
147- ` repository = https://github.com/posit-dev/quarto-yaml ` , authors), and
148- ` [workspace.dependencies] ` with ` quarto-source-map = "0.1.0" ` + the shared
149- crates.io deps (pin versions to match q2's ` [workspace.dependencies] ` :
150- ` yaml-rust2 ` , ` serde ` , ` thiserror ` , …). Drop ` [lints] workspace = true ` or
151- add a ` [workspace.lints] ` block (q2 has none).
152- - [ ] Build + ` cargo test ` + ` cargo clippy --all-targets -- -D warnings ` + `cargo
153- fmt --check` + ` cargo publish --dry-run -p quarto-yaml`. Fix any stable-clippy
154- lints (see §4).
155- - [ ] External-consumer smoke test (separate crate, path dep, parse a YAML string,
156- assert source info) — proves the public API is usable standalone.
157- - [ ] ` gh repo create posit-dev/quarto-yaml --public --source=. --push `
158- (public; mirror Phase 1/3). Confirm CI green on all 3 OSes.
159- - [ ] ** USER** : ` cargo publish -p quarto-yaml ` (from the new repo).
167+ ` repository ` /` homepage ` = posit-dev/quarto-yaml, authors), and
168+ ` [workspace.dependencies] ` with ` quarto-source-map = "0.1.0" ` + shared deps
169+ pinned to q2 (` yaml-rust2 0.11 ` , ` serde 1.0.228 ` , ` thiserror 2.0 ` ,
170+ ` serde_json 1.0.149 ` , ` anyhow 1.0.101 ` , ` regex 1.12 ` ). Added a minimal
171+ ` [workspace.lints.clippy] ` (` result_large_err ` /` large_enum_variant ` = allow,
172+ to preserve the public ` Result ` /` Error ` API — not q2's full allow-list).
173+ - [x] Build + ` cargo test ` (44: 39 unit + 5 doctest) + `cargo clippy
174+ --all-targets -- -D warnings` (clean after the lints block) + ` cargo fmt
175+ --check` + ` cargo publish --dry-run -p quarto-yaml` (10 files) — all green on
176+ stable rustc 1.95.
177+ - [x] External-consumer smoke test (separate crate, path dep, parsed
178+ ` title: My Document ` , asserted the value's ` source_info.start_offset() == 7 ` )
179+ — public API usable standalone. ✅
180+ - [x] ` gh repo create posit-dev/quarto-yaml --public --source=. --push ` — done
181+ 2026-06-29 (https://github.com/posit-dev/quarto-yaml ). ** CI green on all 3
182+ OSes** (run 28377015391: ubuntu 26s, macos 22s, windows 1m4s, fmt+clippy 22s).
183+ - [x] ** USER:** ` cargo publish -p quarto-yaml ` — ** DONE** (live on crates.io as
184+ ` quarto-yaml 0.1.0 ` , 2026-06-29).
160185
161186### Phase B — ` quarto-yaml-validation ` (second crate, same repo)
162- - [ ] Copy ` crates/quarto-yaml-validation/ ` (incl. ` test-fixtures/ ` ) into the
163- workspace. Its ` quarto-yaml ` dep = `{ version = "0.1.0", path =
164- "../quarto-yaml" }` (path for local dev, version so ` cargo publish` resolves
165- the now-published ` quarto-yaml ` ); ` quarto-source-map ` / ` quarto-error-reporting `
166- = ` "0.1.0" ` .
167- - [ ] ** Apply the error-code change** from §6 (after the user's A/B decision) +
168- update the ` error.rs ` tests.
169- - [ ] If yaml-validation tests render diagnostics and asserted ` Q-1-x ` text, update
170- them; with no catalog installed in the standalone repo, diagnostics render
171- ** code-only** (` EmptyCatalog ` ) — assert on the origin codes.
172- - [ ] Build + test + clippy + ` cargo publish --dry-run -p quarto-yaml-validation ` +
173- smoke test (validate a doc against a schema, assert a ` yaml-schema/* ` code).
174- - [ ] CI green (3 OSes). ** USER** : ` cargo publish -p quarto-yaml-validation `
175- (after ` quarto-yaml ` is live so the dep resolves).
187+ > ** Status 2026-06-29:** local work + CI DONE; committed ` ac8d72b ` , pushed to
188+ > ` main ` , ** CI green on all 3 OSes** (run 28377797754: ubuntu 30s, macos 37s,
189+ > windows 2m44s, fmt+clippy 28s). Awaiting user ` cargo publish ` .
190+ - [x] Copied ` crates/quarto-yaml-validation/ ` (src + integration tests +
191+ ` test-fixtures/ ` + the 4 design ` .md ` s) into the workspace. ` quarto-yaml `
192+ dep = ` { workspace = true } ` , where the workspace entry carries both
193+ ` path = "crates/quarto-yaml" ` (local dev) and ` version = "0.1.0" ` (so
194+ ` cargo publish ` resolves the registry crate); ` quarto-source-map ` /
195+ ` quarto-error-reporting ` = ` "0.1.0" ` (default features — no json/coalesce
196+ use, so json feature not needed).
197+ - [x] ** Error codes:** NO change for ` 0.1.0 ` (decision ** B** — keep ` Q-1-x ` ).
198+ ` error.rs ` shipped verbatim; the 14 mappings + ~ 15 tests stay green.
199+ - [x] No ` Q-1-x ` test/snapshot edits needed: the render path never consults the
200+ catalog (title "YAML Validation Failed" is hardcoded; no docs URL surfaced),
201+ so the diagnostic snapshot reproduced ** byte-for-byte** with no catalog
202+ installed. One stable-clippy fix: moved the test module to end-of-file in
203+ ` schema/parsers/combinators.rs ` (` items_after_test_module ` ).
204+ - [x] Build + test (330 incl. snapshot; 5 pre-existing ignored doctests) + clippy
205+ ` -D warnings ` + fmt + ` cargo publish --dry-run -p quarto-yaml-validation `
206+ (39 files) + external smoke test (validated a doc → ` Q-1-11 ` standalone,
207+ rendered ` [Q-1-11] age: Expected number, got string ` ). All green.
208+ - [x] CI green (3 OSes). ** USER (pending):** `cargo publish -p
209+ quarto-yaml-validation` ( ` quarto-yaml 0.1.0` is already live, so the dep
210+ resolves).
176211
177212### Phase C — q2 cutover (one PR, like #348 /#350 )
178- - [ ] Branch ` braid/bd-egcyeym9-yaml-cutover ` off updated main.
179- - [ ] ` [workspace.dependencies.quarto-yaml] ` ` path ` → ` version = "0.1.0" ` .
180- - [ ] Convert ` quarto-yaml ` path-deps (` pampa ` , ` quarto-config ` ) →
181- ` { workspace = true } ` ; leave the existing ` { workspace = true } ` ones.
182- - [ ] ** Delete** ` crates/quarto-yaml-validation/ ` and ` crates/validate-yaml/ ` (and
183- drop ` [workspace.dependencies.quarto-yaml-validation] ` from root ` Cargo.toml ` ;
184- check for any stray refs to ` validate-yaml ` in ` xtask ` /docs/CI).
185- - [ ] Delete in-tree ` crates/quarto-yaml/ ` .
186- - [ ] ` cargo build --workspace ` → confirm Cargo.lock resolves ` quarto-yaml 0.1.0 `
187- from the registry. ` cargo nextest run --workspace ` . ** Full `cargo xtask
188- verify`** (the WASM leg is the real gate — see §5 WASM gotcha; do NOT pipe it
189- through ` tail ` , which masks the exit code — a Phase 1 lesson).
190- - [ ] Update ` CLAUDE.md ` : move ` quarto-yaml ` into the "Externalized foundation
191- crates" section; remove ` quarto-yaml-validation ` and ` validate-yaml ` from the
192- binaries/crate lists; the ` validate-yaml ` line under ** Binaries** must go.
193- - [ ] Commit, push to ` feature/… ` , open PR against ` main ` , watch CI (5 checks),
194- report. Merge is the user's call.
213+ > ** Status 2026-06-29:** all local steps DONE on branch
214+ > ` braid/bd-egcyeym9-yaml-cutover ` ; ** full ` cargo xtask verify ` GREEN (all 14
215+ > steps incl. WASM build + hub tests)** . Awaiting commit/push/PR.
216+ - [x] Branch ` braid/bd-egcyeym9-yaml-cutover ` off updated main (HEAD ` df029875 ` ).
217+ - [x] ` [workspace.dependencies.quarto-yaml] ` ` path ` → ` version = "0.1.0" ` .
218+ - [x] Converted ` quarto-yaml ` path-deps (` pampa ` , ` quarto-config ` ) →
219+ ` { workspace = true } ` ; left the existing ` { workspace = true } ` ones
220+ (` quarto-core ` , ` quarto-lsp-core ` ).
221+ - [x] ** Deleted** ` crates/quarto-yaml-validation/ ` and ` crates/validate-yaml/ ` ;
222+ dropped ` [workspace.dependencies.quarto-yaml-validation] ` . No stray
223+ ` validate-yaml ` refs in xtask/CI/docs — only historical ` claude-notes/ `
224+ design docs (left as-is); one prose comment in
225+ ` quarto-core/src/attribution/mode.rs ` mentions the crate as a hypothetical
226+ consumer (left — design rationale, not a dep).
227+ - [x] Deleted in-tree ` crates/quarto-yaml/ ` .
228+ - [x] ` cargo build --workspace ` clean; ** ` Cargo.lock ` resolves ` quarto-yaml 0.1.0 `
229+ from the registry** (checksum ` c32ab7b3… ` ); ` quarto-yaml-validation ` /
230+ ` validate-yaml ` absent. ` cargo nextest run --workspace ` ** 9855 passed** .
231+ ** Full ` cargo xtask verify ` GREEN (14/14)** — the WASM crate resolved
232+ ` quarto-yaml ` * transitively* (no direct dep needed, per §5); its own
233+ ` Cargo.lock ` flipped ` 0.7.0 ` path → ` 0.1.0 ` registry.
234+ - [x] Updated ` CLAUDE.md ` : ` quarto-yaml ` moved to the "Externalized foundation
235+ crates" section; ` quarto-yaml-validation ` reframed as published-but-not-a-q2-
236+ dep; ` validate-yaml ` binary line removed.
237+ - [ ] Commit, push to ` feature/bd-egcyeym9-yaml-cutover ` , open PR against ` main ` ,
238+ watch CI, report. Merge is the user's call.
195239
196240## 8. Proven gotchas (from Phases 1 & 3 — don't rediscover them)
197241
@@ -205,12 +249,15 @@ the origin codes and may remap to their own presentation codes.
205249- ** crates.io / GitHub are user/identity-gated and irreversible** → you prep & dry-
206250 run; the user publishes and (optionally) ` cargo owner --add github:posit-dev:<team> ` .
207251
208- ## 9. Open items to raise with the user
252+ ## 9. Open items — RESOLVED 2026-06-29
209253
210- 1 . ** Error-code policy (§6 A vs B)** — the one blocking decision.
211- 2 . Confirm the repo is ` posit-dev/quarto-yaml ` (workspace, two crates) — decided
212- 2026-06-29, but re-confirm before ` gh repo create ` .
213- 3 . Reuse the Phase-1 visibility/ownership choices (public repo; personal crates.io
214- account now, ` cargo owner --add posit-dev ` on a weekday) unless told otherwise.
215- 4 . Whether to also relocate the deleted ** ` CONTRIBUTING-ERRORS.md ` ** intent / any
216- q2-internal YAML docs (low priority).
254+ 1 . ** Error-code policy (§6 A vs B)** — ** RESOLVED: option B** (keep ` Q-1-x ` in
255+ ` 0.1.0 ` , defer origin codes to ` 0.2.0 ` ). See §6.
256+ 2 . ** Repo = ` posit-dev/quarto-yaml ` (workspace, two crates)** — ** CONFIRMED** .
257+ 3 . ** Process choices** — ** CONFIRMED: mirror Phase 1/3.** Public repo; agent preps
258+ + dry-runs; ** user** runs each ` cargo publish ` (leaf ` quarto-yaml ` first);
259+ personal crates.io account now, ` cargo owner --add posit-dev ` deferred to a
260+ weekday.
261+ 4 . ** Relocate ` CONTRIBUTING-ERRORS.md ` / q2 YAML docs** — low priority; default to
262+ ** skip** unless the user asks. (Phase 3 dropped its ` CONTRIBUTING-ERRORS.md ` ;
263+ the Quarto catalog policy lives with ` quarto-error-catalog ` .)
0 commit comments