Skip to content

Consume Nightfire v0.2.0 through compatibility facades - #34

Merged
betterthanclay merged 5 commits into
mainfrom
ns-a2032930-8b34-44e1-88c5-16ba53843108
Sep 18, 2026
Merged

betterthanclay merged 5 commits into
mainfrom
ns-a2032930-8b34-44e1-88c5-16ba53843108

Conversation

@betterthanclay

Copy link
Copy Markdown
Contributor

Summary

  • consume the released Nightfire v0.2.0 Rust crate and TypeScript package
  • retain Underlay Rust and TypeScript compatibility facades plus the media-picker adapter
  • remove duplicate generic implementations and retarget active Nightfire docs

Validation

  • effigy rust:check
  • effigy rust:clippy
  • cargo test -p underlay-media --features nightfire
  • cargo test -p underlay-validation --features nightfire
  • cargo test -p underlay-nightfire
  • focused Nightfire unit tests: 83 passed
  • focused Nightfire component tests: 9 passed
  • effigy qa (770 unit tests, 50 component tests, docs and Northstar gates)
  • effigy health
  • git diff --check

@betterthanclay

Copy link
Copy Markdown
Contributor Author

Review of g12.005 (Consume Nightfire v0.2.0; keep facades) at d680eeb — ready to merge.

Scope and contract compliance

  • Rust: workspace adds nightfire = { git = ssh://git@github.com/inflatable-cookie/nightfire.git, tag = v0.2.0 }; Cargo.lock pins 0.2.0 at commit 1931cfc2d4d77959140c39ee56047b581b11256d, exactly the tag commit the task names. Not v0.1.0.
  • underlay-validation and underlay-media nightfire features now depend on the released crate (dep:nightfire); no path = "../underlay-nightfire" remains for generic types. All underlay_nightfire imports across both crates and their tests were swapped to nightfire; a repo-wide grep finds no underlay_nightfire references outside the facade crate.
  • underlay-nightfire is reduced to a thin name facade (pub use nightfire::*), matching the deprecation-facade classification in docs/contracts/122-rust-public-api-inventory.md. Internal implementation modules, tests, and README copy removed.
  • TypeScript: all fifteen generic subpaths (., editor, renderer, block-editor, block-registration, markdown, editor-registry, render-registry, validator-registry, strategies, media-locator, block-ids, block-versions, utils, validation) are one-line re-exports of the corresponding @inflatable-cookie/nightfire subpath. Deleted local implementation (Svelte shells, editor/* internals, markup/*, types.ts, slash-commands.ts, editor-registrations/render-registrations) has no remaining importers in ts/src or ts/tests.
  • Acceptance-critical: ts/src/nightfire/media/context.ts is byte-unchanged and ./nightfire/media still exports createNightfireMediaContext / useNightfireMedia. The Underlay media editor adapter remains, now registered via registerBlockEditor(null, "media", ...). Verified against the installed nightfire@0.2.0 source: its editor-registry accepts string | null with a "*" wildcard fallback in getBlockEditor, so the broader-than-before availability is intentional, valid, and documented in an in-code comment.
  • Consumers need no import-path changes: no caller-visible export was dropped at the facade level (e.g. coerceNightfireBlock and renderSafeMarkdownPreview now flow through the upstream root re-export, covered by tests).
  • Docs: contract 070 and guide 076 correctly retarget generic ownership to the standalone Nightfire repo while keeping Underlay's media traversal, validation-to-HTTP adapter, and picker context documented here. Dated implementation log published under docs/logs/2026-09/ without a handoff backlink. typescript-quality-profile.json inventory reconciled with the file deletions/additions (mechanical and complete, including both new facade test files).
  • Boundaries respected: no .github/workflows edits, no version bump (still 0.9.10), nothing published, no writes into Nightfire or Acowtancy, ./nightfire/media kept.

Validation (independently re-run by reviewer, all green)

  • effigy health
  • effigy rust:check (workspace)
  • effigy rust:clippy
  • cargo test -p underlay-nightfire (compiles; 0 tests, as expected for the facade)
  • cargo test -p underlay-validation --features nightfire (35 lib + 18 derive + doctests)
  • cargo test -p underlay-media --features nightfire (50 tests)
  • effigy test:unit ts/tests/nightfire — 80/80 across 15 files (includes new facades.test.ts asserting identity with upstream exports)
  • effigy test:components on the five Nightfire component suites — 7/7 (includes new nightfire-facades.component.test.ts asserting Svelte component identity)
  • git diff --check clean

Non-blocking observation for the contract owner

  • The TS dependency is pinned as npm "@inflatable-cookie/nightfire": "0.2.0" rather than contract 023's git+ssh#vX.Y.Z form. The task text itself said "same pattern as Poodle," and Poodle is npm-registry-pinned; the Rust surface does use the immutable git tag. The worker could not use the annotated git tag because Bun 1.3.14 fails to resolve it, and recorded this honestly as a PAPERCUTS.md entry plus an explicit note in guide 076. This is a contract-syntax alignment question for a later lane, not a defect in this adoption.

Verdict: ready_to_merge. Head is clean at d680eeb and matches PR #34.

@betterthanclay

Copy link
Copy Markdown
Contributor Author

Re-review of g12.005 (Consume Nightfire v0.2.0; keep facades) at f939219 — changes_required on one documentation defect; everything else approved.

What the revision contains (d680eeb..f939219, four commits)

  • a4ed425: canonical rustfmt import ordering across nine underlay-media/underlay-validation files. Verified with cargo fmt --all -- --check: clean. No semantic change.
  • ffc2575 (landed on main, merged in via ece155f): amends the canonical task doc docs/roadmaps/g12/005-consume-nightfire-v0-2-0.md to mandate HTTPS git transport, naming the CI failure this fixes (Clippy fetch failed: ssh-agent authentication with no usernames succeeding) and prohibiting ssh:// in Cargo.toml, Cargo.lock, and package.json. Merge is clean; diff vs first parent is only that doc change.
  • f939219: Cargo.toml and Cargo.lock switch the nightfire pin from ssh://git@github.com/inflatable-cookie/nightfire.git to https://github.com/inflatable-cookie/nightfire.git, same tag v0.2.0, lock still pinned to commit 1931cfc2d4d77959140c39ee56047b581b11256d. This is the correct CI-compatible transport for a public repo and does not add credentials or touch .github/workflows.

Prior-round review findings remain satisfied

  • No path dependency on the old crate: underlay-validation and underlay-media nightfire features use the released crate; no underlay_nightfire references outside the facade; underlay-nightfire remains pub use nightfire::*.
  • All fifteen generic TS ./nightfire/* subpaths remain pure re-exports; ts/src/nightfire/media/context.ts is still byte-unchanged and exports createNightfireMediaContext / useNightfireMedia; the media editor's null-schema wildcard registration remains valid against nightfire@0.2.0's editor-registry.
  • TS @inflatable-cookie/nightfire stays npm-pinned at 0.2.0 (package.json/bun.lock unchanged in this revision). This remains the accepted substitution from the prior round: the task's operative prohibition (no ssh:// in manifests) is met, and Bun's annotated-tag limitation is documented in PAPERCUTS.md.

Blocker (the one change required)

  • docs/guides/076-nightfire.md still instructs the SSH pin form in three snippets: the Install Nightfire section (line ~25) and the Rust Media Traversal (line ~119) and Validation-To-HTTP (line ~142) examples all show nightfire = { git = "ssh://git@github.com/inflatable-cookie/nightfire.git", tag = "v0.2.0" }. These snippets were introduced by this PR (the pre-PR tree at ac1e7ad contained zero ssh://nightfire references), 076 is one of the two Nightfire docs explicitly inside this task's boundary, and they now contradict the amended task doc's own HTTPS mandate in the same PR. Worse, the media-traversal and validation snippets target exactly the downstream consumers this lane hands off to (Acowtancy g05.155 / Farmyard), so the guide teaches the pin form that breaks GitHub Actions fetching. Required fix: update the three nightfire URLs in guide 076 to the https:// form (and optionally align the guide's TS wording with the amended roadmap sentence about the TS pin).

Non-blocking note for the contract owner

  • Guide 076's underlay-media/underlay-validation consumer snippets use ssh://git@github.com/inflatable-cookie/underlay.git, which matches contract 023's canonical consumer pin form; if HTTPS becomes the house transport for public-repo git pins, that belongs to a contract 023 alignment lane, not this PR. The existing PAPERCUTS.md entry remains accurate on the Bun/annotated-tag friction.

Validation independently re-run at f939219, all green

  • effigy health; effigy rust:check; effigy rust:clippy; cargo fmt --all -- --check; cargo fetch resolves the HTTPS pin
  • cargo test -p underlay-nightfire (facade compiles, 0 tests)
  • cargo test -p underlay-validation --features nightfire (35 lib + 18 derive + doctests)
  • cargo test -p underlay-media --features nightfire (50 tests)
  • effigy test:unit ts/tests/nightfire: 80/80 across 15 files (incl. facade identity tests)
  • effigy test:components on the five Nightfire suites: 7/7 (incl. Svelte component identity tests)
  • git diff --check clean; working tree clean; HEAD f939219 matches PR Consume Nightfire v0.2.0 through compatibility facades #34

Verdict: changes_required — apply the guide 076 HTTPS correction (one small commit), then this is ready to merge. Everything else in the revision is correct and fully validated.

@betterthanclay

Copy link
Copy Markdown
Contributor Author

Re-review of g12.005 (Consume Nightfire v0.2.0; keep facades) at 8afcbcc — ready to merge.

This round's delta (f939219..8afcbcc, single docs-only commit 8afcbcc)

  • Resolves the blocker from the prior review: all three ssh:// Nightfire pin snippets in docs/guides/076-nightfire.md now read nightfire = { git = "https://github.com/inflatable-cookie/nightfire.git", tag = "v0.2.0" } — the Install Nightfire section (~line 25), Rust Media Traversal (~line 119), and Validation-To-HTTP (~line 142). The guide no longer teaches the transport that breaks GitHub Actions fetching, and is now consistent with Cargo.toml, Cargo.lock, and the amended task doc.
  • Also reconciles the secondary wording tension I flagged: docs/roadmaps/g12/005-consume-nightfire-v0-2-0.md now states the TypeScript dependency is the released npm package @inflatable-cookie/nightfire 0.2.0 because Bun cannot resolve the annotated Git tag, and that any Git-based Nightfire pin must use HTTPS. The task doc, guide 076, PAPERCUTS.md, and the actual package.json pin now tell one coherent story.
  • Repo-wide check: the only remaining ssh://git@github.com/inflatable-cookie/nightfire references are PAPERCUTS.md line 9 (quoting contract 023's requirement — accurate) and contract 023 itself, which is outside this task's boundary. The contract-alignment question (git+ssh canonical form vs HTTPS/npm reality for public repos) remains correctly parked as a papercut for a dedicated lane; guide 076's underlay consumer snippets also still show contract-023-style ssh underlay pins, which is the same out-of-boundary contract question, not a defect of this PR.

Cumulative scope assessment (rounds one and two, unchanged by this commit)

  • Rust: workspace nightfire git dep pinned tag v0.2.0 over HTTPS; Cargo.lock locks 0.2.0 at commit 1931cfc2d4d77959140c39ee56047b581b11256d, the exact tag commit the task names. underlay-validation and underlay-media nightfire features use the released crate with no path deps; all imports swapped; underlay-nightfire is a thin pub use nightfire::* name facade per the contract 122 deprecation classification.
  • TypeScript: fifteen generic ./nightfire/* subpath exports are pure re-exports of @inflatable-cookie/nightfire; ./nightfire/media remains Underlay-owned (context.ts byte-unchanged, still exporting createNightfireMediaContext / useNightfireMedia) with the media editor registered under the null-schema wildcard, which nightfire@0.2.0's editor-registry natively supports. No stale imports of deleted modules; the removed upstream ./media subpath is imported nowhere.
  • Docs and process: contract 070 and guide 076 retargeted to standalone Nightfire ownership; dated implementation log under docs/logs/2026-09/ without a handoff backlink; typescript-quality-profile.json inventory reconciled; no .github/workflows edits; nothing published (version still 0.9.10).

Validation independently re-run at 8afcbcc, all green

  • effigy rust:check; cargo fmt --all -- --check
  • cargo test -p underlay-nightfire (facade compiles), -p underlay-validation --features nightfire (35 + 18 + doctests), -p underlay-media --features nightfire (50)
  • effigy test:unit ts/tests/nightfire: 80/80 across 15 files (incl. facade identity tests vs upstream)
  • effigy test:components on the five Nightfire suites: 7/7 (incl. Svelte component identity tests)
  • git diff --check clean; working tree clean; HEAD 8afcbcc matches PR Consume Nightfire v0.2.0 through compatibility facades #34

Verdict: ready_to_merge. The required guide correction landed as scoped with no code changes, the whole PR satisfies every acceptance criterion, and the head is clean.

@betterthanclay
betterthanclay merged commit 65a8be1 into main Sep 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant