Skip to content

quest: publish @moq/hang in the next 0.17 patch - #5590

Merged
kixelated merged 3 commits into
mainfrom
quest/release-22-hang-decision
Oct 15, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/release-22-hang-decision

Conversation

@kixelated

@kixelated kixelated commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Records the maintainer's decision in quest/m0/release-22/README.md: the next 0.17 patch also publishes @moq/hang as is, with its tolerant catalog parser (#5520). The parsed Root and input types are unchanged, and every catalog 0.5.2 accepted parses the same. The only change is the zod wrapper on RootSchema.shape.archive, described below. The maintainer accepted it as a patch on 2026-10-15, since zod schema internals are not public API.

The README also drops @moq/net from the publish list. @moq/net on release builds byte-identical to the published 0.4.3: diff -r of the npm tarball against a release build matches, excluding sourcemaps and jsr.json.

That release's just test wire-compat --remeasure is expected to delete the catalog-archive planned break. No other quest asked this question.

Public API / wire impact: none (quest doc only). Nothing is bumped or published here.

Backwards-compatibility audit: @moq/hang on origin/release (b88ed60) vs npm 0.5.2

What changed. npm pack @moq/hang@0.5.2 unpacked into an empty scratch directory, then js/hang built from a git archive of origin/release (bun run build). diff -r of the two packages, ignoring sourcemaps and jsr.json, shows only three hunks:

  • catalog/root.js: archive: z.optional(ArchiveSchema) became archive: z.catch(z.optional(ArchiveSchema), undefined).
  • catalog/root.d.ts: that field's schema type is now wrapped in ZodMiniCatch<...>.
  • package.json: @moq/net ^0.4.2 became ^0.4.3. 0.4.3 is already on npm, and js/net has no commits on release after it was published.

No other .js or .d.ts file differs. On release, js/hang has one commit since the 0.5.2 bump (#4795): #5520.

Exports and signatures: one accepted change. No export was added, removed or renamed.

RootSchema.shape.archive changed from ZodMiniOptional<typeof ArchiveSchema> to ZodMiniCatch<ZodMiniOptional<...>>. Its runtime def.type also changed from "optional" to "catch". This breaks code that reaches into the field's schema internals, which the maintainer accepted for a patch:

  • const a: z.ZodMiniOptional<typeof ArchiveSchema> = RootSchema.shape.archive compiles against 0.5.2 and fails with TS2322.
  • RootSchema.shape.archive.def.innerType.shape.track fails with TS2339 and throws at runtime.

This field is the whole type-level surface change; every other .d.ts is byte-identical. The parsed data types are unchanged: a type-equality assertion under tsc --noEmit shows that z.infer (the exported Root) and z.input are identical. A deliberately wrong assertion fails the same check.

Catalogs 0.5.2 accepted still parse the same. A differential bun test ran in the release snapshot (script below). It compares the 0.5.2 schema, rebuilt as z.extend(RootSchema, { archive: z.optional(ArchiveSchema) }) from the dist diff above, against the release schema on 22 catalogs:

  • 14 that 0.5.2 accepts: the release rs/hang fixture, every media section, clock, track-form archives with and without a store, unknown root sections, foreign text, and unknown containers. All 14 give toStrictEqual output, the same own keys (archive absent stays absent) and identical JSON.
  • 3 that 0.5.2 rejects for non-archive reasons (bad media, a negative clock, a non-object) are still rejected.
  • 5 that 0.5.2 rejects only under archive are now accepted with archive undefined and every other section unchanged. These are main's timelines fixture, a timelines archive, an invalid store URL, a string archive and a null archive. This is the intended fix, and it matches Rust hang 0.21.14's DefaultOnError on the same field. These outputs carry an own archive: undefined key, which JSON drops.

The 0.5.2-era root.test.ts (from #4795) also ran against the release source. 13 of its 14 tests pass. The only failure is "an invalid store URL is refused", the rejection #5520 deliberately removed.

Nothing produced is rejected by released readers.

  • @moq/hang's change is parse-only and its other output is byte-identical, so it emits nothing new. A catalog it now tolerates can only lose archive if re-serialized. archive is optional in every @moq/hang that has it, and in Rust hang 0.21.x (Option, DefaultOnError since 0.21.14).
  • The one producer change on release is @moq/publish's CatalogProducer. It omits clock when the page's wall clock is before 2020, where 0.5.2 threw from u53. clock has been z.optional in @moq/hang since it was added (feat(hang)!: one continuous broadcast clock at the catalog root #3675). Rust hang 0.21.0 through 0.21.14 declare it #[serde(default)] Option (0.21.0 tests clock_stays_off_the_wire_when_absent).

Packages published alongside.

  • Published @moq/watch 0.6.2 and @moq/publish 0.5.2 depend on @moq/hang ^0.5.2, so they pick up the patch automatically.
  • @moq/room 0.2.1 depends on ^0.5.1 and picks it up the same way.
  • Their only @moq/hang schema use is Catalog.RootSchema passed as a schema (watch's broadcast.ts). None of them touches archive, and the inferred types are unchanged.
  • On the release snapshot, the hang (222), watch (253), publish (162) and room (19) test suites pass, including the differential test. @moq/watch and @moq/publish build and publint cleanly.
  • @moq/watch's only change since 0.6.2 is a dev dependency (esbuild to rolldown, fix(js): bundle worklets in-process so no esbuild service outlives the build (release backport) #5354), so it needs no republish.
Differential test (run from js/hang/src/catalog in a release snapshot)
import { expect, test } from "bun:test";
import * as z from "@zod/mini";
import { ArchiveSchema } from "./archive.ts";
import { type Root, RootSchema } from "./root.ts";

// npm 0.5.2 differs from release only in this field (dist diff).
const OldRootSchema = z.extend(RootSchema, { archive: z.optional(ArchiveSchema) });

type Eq<A, B> = (<T>() => T extends A ? 1 : 2) extends <T>() => T extends B ? 1 : 2 ? true : false;
const sameOutput: Eq<z.infer<typeof OldRootSchema>, Root> = true;
const sameInput: Eq<z.input<typeof OldRootSchema>, z.input<typeof RootSchema>> = true;

// corpus: { name: catalog } as listed above; onlyNewAccepts: the five archive-only rejections.
for (const [name, input] of Object.entries(corpus)) {
	test(name, () => {
		const prev = OldRootSchema.safeParse(input);
		const next = RootSchema.safeParse(input);
		if (prev.success) {
			expect(next.success && next.data).toStrictEqual(prev.data);
			expect(Object.keys(next.data)).toEqual(Object.keys(prev.data));
		} else if (onlyNewAccepts.has(name)) {
			expect(prev.error.issues.every((i) => i.path[0] === "archive")).toBe(true);
			const { archive: _, ...rest } = input;
			expect(next.success && next.data).toEqual(OldRootSchema.parse(rest));
		} else {
			expect(next.success).toBe(false);
		}
	});
}

🤖 Generated with Claude Code

kixelated and others added 2 commits October 15, 2026 11:15
Records the maintainer's decision for release-22: the next 0.17 patch also
publishes @moq/hang with its tolerant catalog parser (#5520), audited as
backwards compatible with the published 0.5.2. That release's wire-compat
re-measure is expected to delete the catalog-archive planned break.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 15, 2026 18:17
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9aa45e20-df2f-4834-be16-fab9a4a9f6ef
📥 Commits

Reviewing files that changed from the base of the PR and between 89a9037 and d76679b.

📒 Files selected for processing: 1
  • quest/m0/release-22/README.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T18:39:37.777631Z d76679b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5161059c50

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread quest/m0/release-22/README.md Resolved
@kixelated
kixelated marked this pull request as draft October 15, 2026 18:23
The maintainer accepted the zod wrapper on RootSchema.shape.archive as a
patch, since zod schema internals are not public API. @moq/net needs no
publish: release builds byte-identical to the published 0.4.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 15, 2026 18:38
@kixelated

Copy link
Copy Markdown
Collaborator Author

Summary: this records the release-22 decision to publish @moq/hang as is in the next 0.17 patch.

  • Audit. @moq/hang on release differs from the published 0.5.2 in two ways. One is the tolerant archive parse from fix(hang): ignore incompatible archive metadata in catalogs (backport #5485) #5520. The other is the @moq/net range moving to ^0.4.3, which is already published. The parsed Root and input types are unchanged, and every catalog 0.5.2 accepted parses the same.
  • Accepted change. The only type-level change is the zod catch wrapper on RootSchema.shape.archive, found in Codex's P2. The maintainer accepted it as a patch, since zod schema internals are not public API.
  • Readers and dependents. Released readers (older @moq/hang and Rust hang 0.21.x) accept everything the patch produces. Published @moq/watch, @moq/publish and @moq/room pick up the new hang through their caret ranges, and their test suites pass against it on release.
  • @moq/net line. It is dropped from the publish list, because release builds byte-identical to the published 0.4.3.
  • Re-measure. After the patch publishes, just test wire-compat --remeasure is expected to delete the catalog-archive planned break.

Codex gave the final head (d76679b) a thumbs-up, and its P2 thread is answered and resolved.

(Written by Claude Opus 5.5)

@kixelated
kixelated enabled auto-merge October 15, 2026 18:40
@kixelated
kixelated added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 387db45 Oct 15, 2026
10 checks passed
@kixelated
kixelated deleted the quest/release-22-hang-decision branch October 15, 2026 18:45
kixelated added a commit that referenced this pull request Oct 15, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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