From ddeafed7141d73a6ddea60c87c68f61d8fcd0b64 Mon Sep 17 00:00:00 2001 From: helloiamvu Date: Wed, 15 Jul 2026 10:55:25 +0200 Subject: [PATCH 1/4] =?UTF-8?q?fix(ts):=20cancel=20the=20D-22=20label-defa?= =?UTF-8?q?ult=20flip=20=E2=80=94=20mirror=20Python=2034-06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-SDK divergence found during the 1.17 docs refresh: Python 1.17.0 cancelled the D-22 flip (bare dataset() keeps label='cli' silently, no FutureWarning, NO default change at 2.0), but TS dataset() still fired the one-time warning and its TSDoc promised 'default flips to label=null at 2.0' — if TS had followed through, cross-SDK byte-parity would break at 2.0. - research.ts: remove the _defaultLabelWarned latch, _D22_BRIDGE_WARNING, fireDefaultLabelWarningOnce, the _resetDefaultLabelWarning test hook, and the internal warnOnDefaultLabel flag — the alias-split wrappers stay DISTINCT callables (pinned by tests) but no longer diverge behaviorally; omitted label resolves to the explicit, contractually-stable 'cli' default silently. TSDoc rewritten to the cancelled-flip semantics. - panels.ts: drop the FIX-5 once-per-panel warning call. - index.ts: drop the _resetDefaultLabelWarning export (underscore test hook, removed with the machinery it reset). - labels.ts: comment sweep ('D-22 2.0 default' -> stable implicit default). - tests: label-axis + panels warning assertions inverted to never-warns + a new omitted==explicit byte-identity check. meta suite 289 passed; typecheck clean; size budgets green (meta 42.21/44 kB — 0.2 kB smaller). PT-3401 reconciliation log updated in the planning repo. Co-Authored-By: Claude Fable 5 --- packages-ts/meta/src/index.ts | 11 ++- packages-ts/meta/src/labels.ts | 8 +- packages-ts/meta/src/panels.ts | 15 +--- packages-ts/meta/src/research.ts | 99 ++++++++--------------- packages-ts/meta/tests/label-axis.test.ts | 24 ++++-- packages-ts/meta/tests/panels.test.ts | 16 ++-- 6 files changed, 71 insertions(+), 102 deletions(-) diff --git a/packages-ts/meta/src/index.ts b/packages-ts/meta/src/index.ts index 7c90318d..0b576b4a 100644 --- a/packages-ts/meta/src/index.ts +++ b/packages-ts/meta/src/index.ts @@ -25,15 +25,14 @@ export { core, markets, weather }; // leakage-safe composed training table; `research` is retained as a fully // working alias. // -// Phase 32 32-05 (D-22): the two are now DISTINCT wrappers over one shared body -// (ALIAS SPLIT) — `dataset()` fires a one-time FutureWarning when called without -// an explicit `label`; `research()` never does. This is the ONLY behavioral -// divergence; both carry the identical public signature. Removal of the split -// (and the implicit-cli default) lands at 2.0. +// Phase 32 32-05 (D-22): the two are DISTINCT wrappers over one shared body +// (ALIAS SPLIT). The D-22 default-flip FutureWarning was CANCELLED in 1.17 +// (Python 34-06 parity) — the wrappers behave identically; the implicit +// `label="cli"` default is explicit + contractually stable. `research()` +// retires at 2.0. export { dataset, research, - _resetDefaultLabelWarning, type ResearchOptions, type PairsRow, type ObservationDatasetRow, diff --git a/packages-ts/meta/src/labels.ts b/packages-ts/meta/src/labels.ts index 5cec8f16..f8d5f58e 100644 --- a/packages-ts/meta/src/labels.ts +++ b/packages-ts/meta/src/labels.ts @@ -9,11 +9,11 @@ // "daily_extremes" → the WU/NOAA-WRH extremes Polymarket resolves on; // ADDS daily_extremes_* columns (native names, D-26). // "none" → features-only; DROPS cli_high_f/cli_low_f/ -// cli_report_type (the D-22 2.0 default). +// cli_report_type (the stable implicit default). // BYO row-array → settlement-calendar aligner (all six sharp edges). // -// - D-22 bridge: omitted-label `dataset()` returns cli_* bytes + a ONE-TIME -// FutureWarning; `research()` omitted-label returns cli_* bytes and NEVER +// - Omitted-label `dataset()`/`research()` return cli_* bytes silently (the +// D-22 flip + warning were cancelled in 1.17, Python 34-06 parity); never // warns. See research.ts for the alias split that carries the divergence. // // The BYO aligner is adapted to TS conventions: Python takes a DataFrame, TS @@ -207,7 +207,7 @@ export function validateLabel(label: LabelValue): void { // --------------------------------------------------------------------------- /** - * The `cli_*` columns dropped by `label="none"` (the D-22 2.0 features-only + * The `cli_*` columns dropped by `label="none"` (the features-only * default). Mirrors Python "label=None DROPS cli_high_f/cli_low_f/ * cli_report_type". */ diff --git a/packages-ts/meta/src/panels.ts b/packages-ts/meta/src/panels.ts index 4757d163..8d6ea10b 100644 --- a/packages-ts/meta/src/panels.ts +++ b/packages-ts/meta/src/panels.ts @@ -25,7 +25,7 @@ import type { ByoLabelRow } from "./labels.js"; import { LabelAlignmentError } from "./labels.js"; -import { type ResearchOptions, fireDefaultLabelWarningOnce, research } from "./research.js"; +import { type ResearchOptions, research } from "./research.js"; /** A single panel row — a per-station `dataset()` row with `station` first. */ export type PanelRow = Record; @@ -122,16 +122,9 @@ export async function datasetPanel( } } - // FIX-5 (D-22): a panel called WITHOUT an explicit label (and no BYO - // panelLabels) fires the bridge FutureWarning ONCE for the whole panel — - // mirroring Python `_compose_panel`. The per-station fan-out goes through - // `research()` (which never warns), so this is exactly-once, never - // N-per-station. A panel WITH an explicit label warns zero. - const panelLabelOmitted = - panelLabels === undefined && (singleOptsBase as { label?: unknown }).label === undefined; - if (panelLabelOmitted) { - fireDefaultLabelWarningOnce(); - } + // D-22 flip CANCELLED (34-06 parity): an omitted-label panel keeps the + // explicit, contractually-stable `label="cli"` default silently — no + // bridge warning fires anywhere anymore. const allRows: PanelRow[] = []; const provStations: Record = {}; diff --git a/packages-ts/meta/src/research.ts b/packages-ts/meta/src/research.ts index 6c80f239..19ceb1d3 100644 --- a/packages-ts/meta/src/research.ts +++ b/packages-ts/meta/src/research.ts @@ -208,11 +208,10 @@ export interface ResearchOptions extends ResearchKwargsExtension { // (features-only == `"none"`), or a BYO label row-array through the // settlement-calendar aligner. // - // D-22 bridge: OMITTED `label` on `dataset()` returns `cli_*` bytes + a - // ONE-TIME FutureWarning; OMITTED `label` on `research()` returns `cli_*` - // bytes and NEVER warns (the alias split carries the divergence). An - // explicit `label` on either entry is honored verbatim and never triggers - // the bridge warning — so pinned parity calls stay warning-free. + // OMITTED `label` on either entry returns `cli_*` bytes silently — the + // explicit, contractually-stable default (the D-22 flip + its FutureWarning + // were CANCELLED in 1.17, mirroring Python 34-06). An explicit `label` is + // honored verbatim. // // `"cli"` is IDENTITY (the `cli_*` columns are already on the frame from // buildPairs) → byte-stable parity by construction. @@ -226,29 +225,14 @@ export interface ResearchOptions extends ResearchKwargsExtension { labels_as_known?: LabelsAsKnown; } -// ── Phase 32 32-05 (D-22) — one-time FutureWarning latch (fs.ts pattern) ── +// ── D-22 flip CANCELLED (Python 34-06 parity) ───────────────────────────── // -// `dataset()` called WITHOUT an explicit `label` fires this ONCE (test-resettable -// via `_resetDefaultLabelWarning`); `research()` never fires it. Mirrors the -// Python `_D22_BRIDGE_WARNING` + the fs.ts house latch (`console.warn` boolean -// + a `_reset*()` test hook). -let _defaultLabelWarned = false; - -/** Reset the one-time D-22 default-label FutureWarning latch — TEST USE ONLY. */ -export function _resetDefaultLabelWarning(): void { - _defaultLabelWarned = false; -} - -const _D22_BRIDGE_WARNING = - "FutureWarning: dataset() called without an explicit label returns the cli_* " + - "columns today, but the default flips to label=null (features-only) at 2.0. " + - 'Pass label="cli" to keep the current output or label=null to opt in early.'; - -export function fireDefaultLabelWarningOnce(): void { - if (_defaultLabelWarned) return; - console.warn(_D22_BRIDGE_WARNING); - _defaultLabelWarned = true; -} +// The D-22 bridge (a one-time FutureWarning promising the omitted-label +// default would flip to label=null at 2.0) is REMOVED, mirroring Python +// 1.17.0: the implicit `label="cli"` default is an explicit, documented, +// contractually-stable default with NO deprecation path — nothing flips at +// 2.0 and no warning fires. (The `_resetDefaultLabelWarning` test hook and +// `fireDefaultLabelWarningOnce` left with it.) /** * Sentinel distinguishing an OMITTED `label` from an explicit `null` @@ -945,21 +929,15 @@ async function fetchGhcnhWithCache( * column (`ObservationDatasetRow[]`). The default `"daily"` output is * byte-identical to the pre-31 shape. */ -// Phase 32 32-05 (D-22) — ALIAS SPLIT. `research`/`dataset` are no longer -// object-identical (`export { research as dataset }`): they are thin wrappers -// over one shared body `_datasetImpl`, whose ONLY divergence is the internal -// `warnOnDefaultLabel` flag (dataset `true`, research `false`). This is the -// same split the Python side made in 32-02 so the two entry points can carry -// divergent default-label warning behavior. See the wrappers below. -// -// The extra `warnOnDefaultLabel` parameter is INTERNAL — the public wrappers -// pin it and re-expose the clean overloaded signature. +// Phase 32 32-05 (D-22) — ALIAS SPLIT, warning REMOVED (34-06 parity). +// `research`/`dataset` stay DISTINCT thin wrappers over one shared body (the +// split shape is pinned by tests), but the `warnOnDefaultLabel` divergence is +// GONE with the cancelled D-22 flip — both entries now behave identically. async function _datasetImpl( station: string, fromDate: string, toDate: string, opts: ResearchOptions = {}, - warnOnDefaultLabel = false, ): Promise | ReadonlyArray> { // ── Phase 21 21-01 kwarg validation (lockstep with Python) ─────────── // @@ -991,17 +969,15 @@ async function _datasetImpl( // Distinguish OMITTED (`undefined`) from explicit `null` (features-only) via // a sentinel — a JSON-round-tripped Python `label=None` arrives as `null` and // must behave as features-only, NOT as OMITTED. When OMITTED, resolve to the - // `"cli"` recipe (byte-identical cli_* — the D-22 bridge default) and, on the - // `dataset()` entry only (`warnOnDefaultLabel`), fire the ONE-TIME - // FutureWarning. An explicit label — including `null`/`"cli"` — is honored - // verbatim and NEVER triggers the bridge warning (so pinned parity calls stay - // warning-free). Validate SHAPE up-front, before any network fetch. + // `"cli"` recipe — the EXPLICIT, contractually-stable default (byte-identical + // cli_*; the D-22 flip-to-null-at-2.0 was CANCELLED in 34-06, so no warning + // fires on either entry point). Validate SHAPE up-front, before any network + // fetch. const labelOmitted = opts.label === undefined; const resolvedLabel: LabelValue | typeof LABEL_OMITTED = labelOmitted ? LABEL_OMITTED : (opts.label as LabelValue); if (!labelOmitted) validateLabel(opts.label as LabelValue); - if (labelOmitted && warnOnDefaultLabel) fireDefaultLabelWarningOnce(); // Phase 21 21-01 D-03: `backend="polars"` is accepted-for-surface but // rejected at runtime since TS has no Polars equivalent (bundle-size @@ -1438,14 +1414,10 @@ function broadcastLabelDelta( } // --------------------------------------------------------------------------- -// Phase 32 32-05 (D-22) — the ALIAS-SPLIT public wrappers. -// -// `research` and `dataset` are DISTINCT thin wrappers over the shared -// `_datasetImpl` body. The ONLY divergence is the `warnOnDefaultLabel` flag: -// - `dataset()` → warnOnDefaultLabel = true (omitted-label fires the -// one-time D-22 FutureWarning). -// - `research()` → warnOnDefaultLabel = false (legacy name; keeps implicit -// cli FOREVER, no new warning — dies at 2.0 anyway). +// Phase 32 32-05 (D-22) — the ALIAS-SPLIT public wrappers; warning REMOVED +// (Python 34-06 parity: the flip was cancelled, so the wrappers no longer +// diverge — both keep the explicit, contractually-stable implicit +// `label="cli"` default silently; `research()` retires at 2.0). // Both carry the FULL explicit overloaded signature so `inspect`-style // introspection + IDE help stay intact (mirrors the Python split which kept the // full signature on both wrappers rather than *args/**kwargs). @@ -1454,11 +1426,10 @@ function broadcastLabelDelta( /** * Leakage-safe composed training table for a station + date window. * - * `research()` is the legacy entry point: an OMITTED `label` returns the - * `cli_*` columns and NEVER emits the D-22 FutureWarning (the implicit-cli - * behavior is retained for the legacy name until 2.0). Prefer `dataset()` for - * new code — it is the primary documented name and surfaces the D-22 bridge - * warning so callers migrate before the 2.0 default flip. + * `research()` is the legacy entry point (retires at 2.0): an OMITTED `label` + * returns the `cli_*` columns silently. Prefer `dataset()` for new code — it + * is the primary documented name; the two behave identically (the D-22 + * default-flip warning was cancelled in 1.17, mirroring Python 34-06). * * See {@link ResearchOptions} for the full options surface (label axis, * granularity, source pin, forecast, cache). @@ -1487,19 +1458,19 @@ export async function research( toDate: string, opts: ResearchOptions = {}, ): Promise | ReadonlyArray> { - return _datasetImpl(station, fromDate, toDate, opts, /* warnOnDefaultLabel */ false); + return _datasetImpl(station, fromDate, toDate, opts); } /** * Leakage-safe composed training table for a station + date window — the * PRIMARY documented name (30-04 D-02). * - * `dataset()` is the general-first entry point: an OMITTED `label` still - * returns the `cli_*` columns byte-identically today, but emits a ONE-TIME - * D-22 FutureWarning ("default flips to label=null at 2.0 — pass label='cli' or - * label=null"). Pass an explicit `label` to silence the bridge and pin the - * output (`"cli"` for today's shape, `null`/`"none"` for features-only, - * `"daily_extremes"` for the WU/NOAA-WRH quantity, or a BYO row-array). + * `dataset()` is the general-first entry point: an OMITTED `label` returns + * the `cli_*` columns — the EXPLICIT, contractually-stable default with no + * deprecation path (the D-22 flip-to-null-at-2.0 was CANCELLED in 1.17, + * mirroring Python 34-06; no warning fires). Pass an explicit `label` to pin + * a different output (`null`/`"none"` for features-only, `"daily_extremes"` + * for the WU/NOAA-WRH quantity, or a BYO row-array). * * See {@link ResearchOptions} for the full options surface. */ @@ -1527,5 +1498,5 @@ export async function dataset( toDate: string, opts: ResearchOptions = {}, ): Promise | ReadonlyArray> { - return _datasetImpl(station, fromDate, toDate, opts, /* warnOnDefaultLabel */ true); + return _datasetImpl(station, fromDate, toDate, opts); } diff --git a/packages-ts/meta/tests/label-axis.test.ts b/packages-ts/meta/tests/label-axis.test.ts index f1f3234b..e0924f9c 100644 --- a/packages-ts/meta/tests/label-axis.test.ts +++ b/packages-ts/meta/tests/label-axis.test.ts @@ -9,7 +9,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import { _resetDefaultLabelWarning, dataset, research } from "../src/index.js"; +import { dataset, research } from "../src/index.js"; import { kalshi } from "../src/marketsDataset.js"; const IEM_HEADER = @@ -54,11 +54,9 @@ const CLI: CliMockRecord[] = [ beforeEach(() => { vi.restoreAllMocks(); - _resetDefaultLabelWarning(); }); afterEach(() => { vi.restoreAllMocks(); - _resetDefaultLabelWarning(); }); describe("label='cli' identity + byte-stability (D-22 default)", () => { @@ -72,15 +70,19 @@ describe("label='cli' identity + byte-stability (D-22 default)", () => { }); }); -describe("D-22 bridge — dataset() warns once, research() never (alias split)", () => { - it("dataset() omitted-label fires the FutureWarning ONCE", async () => { +describe("D-22 flip CANCELLED — neither entry point ever warns (34-06 parity)", () => { + // Python 34-06 removed the D-22 label-default flip: the implicit label="cli" + // default is EXPLICIT, documented, and contractually stable with NO + // deprecation path — there is nothing to flip at 2.0 and no warning to fire. + // TS mirrors that here (cross-SDK 2.0 parity would break otherwise). + it("dataset() omitted-label NEVER fires a FutureWarning (flip cancelled)", async () => { const warn = vi.spyOn(console, "warn").mockImplementation(() => {}); installFetchMock({ cli: CLI }); await dataset("NYC", "2025-01-01", "2025-01-02"); installFetchMock({ cli: CLI }); await dataset("NYC", "2025-01-01", "2025-01-02"); const futureWarns = warn.mock.calls.filter((c) => /FutureWarning/.test(String(c[0]))); - expect(futureWarns).toHaveLength(1); // one-time latch across two calls + expect(futureWarns).toHaveLength(0); }); it("research() omitted-label NEVER fires the FutureWarning", async () => { @@ -91,7 +93,7 @@ describe("D-22 bridge — dataset() warns once, research() never (alias split)", expect(futureWarns).toHaveLength(0); }); - it("dataset() with an EXPLICIT label does NOT fire the bridge warning", async () => { + it("dataset() with an EXPLICIT label does NOT warn either", async () => { const warn = vi.spyOn(console, "warn").mockImplementation(() => {}); installFetchMock({ cli: CLI }); await dataset("NYC", "2025-01-01", "2025-01-02", { label: "cli" }); @@ -99,6 +101,14 @@ describe("D-22 bridge — dataset() warns once, research() never (alias split)", expect(futureWarns).toHaveLength(0); }); + it("omitted-label dataset() stays byte-identical to explicit label='cli'", async () => { + installFetchMock({ cli: CLI }); + const omitted = await dataset("NYC", "2025-01-01", "2025-01-02"); + installFetchMock({ cli: CLI }); + const explicit = await dataset("NYC", "2025-01-01", "2025-01-02", { label: "cli" }); + expect(JSON.parse(JSON.stringify(omitted))).toEqual(JSON.parse(JSON.stringify(explicit))); + }); + it("research and dataset are DISTINCT callables (alias split)", () => { expect(research).not.toBe(dataset); }); diff --git a/packages-ts/meta/tests/panels.test.ts b/packages-ts/meta/tests/panels.test.ts index 8100ecd5..a9f92d96 100644 --- a/packages-ts/meta/tests/panels.test.ts +++ b/packages-ts/meta/tests/panels.test.ts @@ -12,7 +12,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { research } from "../src/index.js"; import { LabelAlignmentError } from "../src/labels.js"; import { datasetPanel } from "../src/panels.js"; -import { _resetDefaultLabelWarning } from "../src/research.js"; const IEM_HEADER = "station,valid,tmpf,dwpf,drct,sknt,gust,alti,mslp,vsby,skyc1,skyl1,skyc2,skyl2,skyc3,skyl3,skyc4,skyl4,wxcodes,p01i,snowdepth,peak_wind_gust,peak_wind_drct,peak_wind_time,metar"; @@ -132,19 +131,16 @@ describe("datasetPanel — long-format multi-station fan-out", () => { }); }); -// FIX-5 (D-22): a panel called WITHOUT an explicit label fires the bridge -// FutureWarning EXACTLY once (never N-per-station); a panel WITH an explicit -// label fires zero. Mirrors Python `_compose_panel`. -describe("datasetPanel — D-22 default-label FutureWarning (FIX-5)", () => { - beforeEach(() => _resetDefaultLabelWarning()); - afterEach(() => _resetDefaultLabelWarning()); - - it("omitted-label panel warns exactly once (not once per station)", async () => { +// D-22 flip CANCELLED (34-06 parity): panels never fire a default-label +// warning — omitted-label keeps the explicit, contractually-stable +// label="cli" default silently, like Python. +describe("datasetPanel — D-22 flip cancelled: no default-label warning", () => { + it("omitted-label panel warns zero", async () => { installFetchMock(CLI); const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {}); await datasetPanel("2025-01-01", "2025-01-02", { stations: ["NYC", "LAX"] }); const d22 = warnSpy.mock.calls.filter((c) => String(c[0]).includes("label")); - expect(d22).toHaveLength(1); + expect(d22).toHaveLength(0); }); it("explicit-label panel warns zero", async () => { From cb877b71040c860a55d845ce2213fa0643b808e8 Mon Sep 17 00:00:00 2001 From: helloiamvu Date: Wed, 15 Jul 2026 11:06:50 +0200 Subject: [PATCH 2/4] fix(ts review-iter-1): keep _resetDefaultLabelWarning as a deprecated no-op through 1.x codex + TypeScript Architect converged: dropping a shipped root-barrel export in a MINOR breaks downstream compile-time imports. The hook is now a @deprecated no-op stub (the latch it reset no longer exists), re-exported from the barrel, pinned by an importability test; removed at 2.0. Also fixes the stale FIRES-ONCE header comment in label-axis.test.ts (Architect below-gate note). Co-Authored-By: Claude Fable 5 --- packages-ts/meta/src/index.ts | 3 +++ packages-ts/meta/src/research.ts | 18 ++++++++++++++++-- packages-ts/meta/tests/label-axis.test.ts | 10 +++++++++- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/packages-ts/meta/src/index.ts b/packages-ts/meta/src/index.ts index 0b576b4a..cb2aff0e 100644 --- a/packages-ts/meta/src/index.ts +++ b/packages-ts/meta/src/index.ts @@ -33,6 +33,9 @@ export { core, markets, weather }; export { dataset, research, + // @deprecated no-op stub (the D-22 latch it reset was removed in 1.17); + // kept importable through 1.x, removed at 2.0. + _resetDefaultLabelWarning, type ResearchOptions, type PairsRow, type ObservationDatasetRow, diff --git a/packages-ts/meta/src/research.ts b/packages-ts/meta/src/research.ts index 19ceb1d3..b45ab6d7 100644 --- a/packages-ts/meta/src/research.ts +++ b/packages-ts/meta/src/research.ts @@ -231,8 +231,22 @@ export interface ResearchOptions extends ResearchKwargsExtension { // default would flip to label=null at 2.0) is REMOVED, mirroring Python // 1.17.0: the implicit `label="cli"` default is an explicit, documented, // contractually-stable default with NO deprecation path — nothing flips at -// 2.0 and no warning fires. (The `_resetDefaultLabelWarning` test hook and -// `fireDefaultLabelWarningOnce` left with it.) +// 2.0 and no warning fires. (`fireDefaultLabelWarningOnce` and the internal +// latch left with it.) + +/** + * No-op back-compat stub for the removed D-22 warning-latch reset. + * + * @deprecated The one-time D-22 FutureWarning this hook reset was REMOVED in + * 1.17 (the label-default flip was cancelled — Python 34-06 parity), so there + * is no latch left to reset. Kept as a no-op export through 1.x because it + * was previously importable from the root barrel (codex PR-127 review: + * removing a shipped export in a minor breaks downstream compile-time + * imports). Removed at 2.0. + */ +export function _resetDefaultLabelWarning(): void { + // Intentionally empty — the warning latch no longer exists. +} /** * Sentinel distinguishing an OMITTED `label` from an explicit `null` diff --git a/packages-ts/meta/tests/label-axis.test.ts b/packages-ts/meta/tests/label-axis.test.ts index e0924f9c..f246a0f4 100644 --- a/packages-ts/meta/tests/label-axis.test.ts +++ b/packages-ts/meta/tests/label-axis.test.ts @@ -1,7 +1,7 @@ // Phase 32 32-05 — label-axis INTEGRATION tests (fetch-mocked). Parity with // Python 32-02/32-03: // - default/label="cli" byte-stable (cli identity — the D-22 bridge default); -// - dataset() omitted-label FIRES the D-22 FutureWarning ONCE; research() +// - neither entry point ever fires a default-label warning (D-22 flip // omitted-label NEVER warns (the alias split); explicit label never warns; // - label="none" drops cli_*; label=null == "none"; // - unknown recipe rejected before fetch; @@ -188,3 +188,11 @@ describe("markets.kalshi.dataset — thin cli delegator + outcome", () => { expect(rows).toHaveLength(1); }); }); + +describe("_resetDefaultLabelWarning — deprecated no-op back-compat stub", () => { + it("stays importable from the root barrel and no-ops (removed at 2.0)", async () => { + const mod = await import("../src/index.js"); + expect(typeof mod._resetDefaultLabelWarning).toBe("function"); + expect(mod._resetDefaultLabelWarning()).toBeUndefined(); + }); +}); From f0877f0afb7dec2b05ea4132f556bafbf40bd109 Mon Sep 17 00:00:00 2001 From: helloiamvu Date: Wed, 15 Jul 2026 11:12:25 +0200 Subject: [PATCH 3/4] docs(ts tests): untangle the label-axis header comment (TS Architect below-gate nit) Co-Authored-By: Claude Fable 5 --- packages-ts/meta/tests/label-axis.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages-ts/meta/tests/label-axis.test.ts b/packages-ts/meta/tests/label-axis.test.ts index f246a0f4..73cd415b 100644 --- a/packages-ts/meta/tests/label-axis.test.ts +++ b/packages-ts/meta/tests/label-axis.test.ts @@ -1,8 +1,8 @@ // Phase 32 32-05 — label-axis INTEGRATION tests (fetch-mocked). Parity with // Python 32-02/32-03: -// - default/label="cli" byte-stable (cli identity — the D-22 bridge default); -// - neither entry point ever fires a default-label warning (D-22 flip -// omitted-label NEVER warns (the alias split); explicit label never warns; +// - default/label="cli" byte-stable (cli identity — the stable implicit default); +// - neither entry point ever fires a default-label warning (the D-22 flip +// was CANCELLED in 1.17, Python 34-06 parity); explicit label never warns; // - label="none" drops cli_*; label=null == "none"; // - unknown recipe rejected before fetch; // - markets.kalshi.dataset delegates to label="cli" + appends label_outcome. From 76b3aa3cf9f236a4016be1c8e8406a053e0ccb11 Mon Sep 17 00:00:00 2001 From: helloiamvu Date: Wed, 15 Jul 2026 11:40:30 +0200 Subject: [PATCH 4/4] chore(changeset): record the D-22 flip cancellation (PT-3401 checklist) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also re-fires the parity-ticket gate so it reads the updated PR body (typescript_only marker) — the workflow only triggers on opened/synchronize and reruns replay the stale event payload. Co-Authored-By: Claude Fable 5 --- .changeset/ts-d22-flip-cancelled.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .changeset/ts-d22-flip-cancelled.md diff --git a/.changeset/ts-d22-flip-cancelled.md b/.changeset/ts-d22-flip-cancelled.md new file mode 100644 index 00000000..e0e9c6c2 --- /dev/null +++ b/.changeset/ts-d22-flip-cancelled.md @@ -0,0 +1,9 @@ +--- +"mostlyright": patch +--- + +Cancel the D-22 label-default flip, mirroring Python 34-06: `dataset()` with an +omitted `label` keeps the explicit, contractually-stable `label="cli"` default +silently — the one-time FutureWarning and the promised flip to `label=null` at +2.0 are removed. `_resetDefaultLabelWarning` remains importable as a +`@deprecated` no-op through 1.x (removed at 2.0).