From 9e616d3a06337ed5ad872a41b00ac4e0bda65715 Mon Sep 17 00:00:00 2001 From: DongHyeonka Date: Sat, 26 Sep 2026 00:28:27 +0900 Subject: [PATCH] docs(contracts): mark compatibility aliases and V1 readers deprecated with removal conditions (07-07) The aliases and V1 config/manifest readers had no @deprecated tag, replacement or removal condition in code, so they could only become permanent. Co-Authored-By: Claude Opus 5.5 --- src/contracts/boundary-mapper.ts | 8 +++++++- src/contracts/errors.ts | 5 +++-- src/contracts/read-only-registry.ts | 6 +++++- src/contracts/release-artifacts.ts | 14 ++++++++++++++ 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/contracts/boundary-mapper.ts b/src/contracts/boundary-mapper.ts index 5b21f7b3..1116d927 100644 --- a/src/contracts/boundary-mapper.ts +++ b/src/contracts/boundary-mapper.ts @@ -14,7 +14,13 @@ export type BoundaryMappingResult = | Readonly<{ ok: true; value: Value }> | Readonly<{ ok: false; code: MappingFailureCode }>; -/** Compatible alias kept for existing importers; see `BoundaryMappingResult`. */ +/** + * Compatible alias kept for existing importers. + * + * @deprecated Use `BoundaryMappingResult`. Remove in the next minor release + * once no module imports `MappingResult` from this file (owner: + * frontend-platform). + */ export type MappingResult = BoundaryMappingResult; /** Adapts a boundary mapper result to the canonical contract mapping result. */ diff --git a/src/contracts/errors.ts b/src/contracts/errors.ts index ed0a1f6d..a434a261 100644 --- a/src/contracts/errors.ts +++ b/src/contracts/errors.ts @@ -135,9 +135,10 @@ export type AppFailure = Readonly<{ }>; /** - * Backward-compatible transport-facing name. New application and presentation - * code should prefer AppFailure. + * Backward-compatible transport-facing name. * + * @deprecated Use `AppFailure`. Remove in the next minor release once + * `grep -rw ApiFailure src` finds only this line (owner: frontend-platform). */ export type ApiFailure = AppFailure; diff --git a/src/contracts/read-only-registry.ts b/src/contracts/read-only-registry.ts index a9ecfe3b..1fc16bb3 100644 --- a/src/contracts/read-only-registry.ts +++ b/src/contracts/read-only-registry.ts @@ -61,5 +61,9 @@ export function createReadOnlyMap( return readOnlyFacade(entries); } -/** Kept here for existing importers; the implementation lives in `exact-snapshot.ts`. */ +/** + * @deprecated Import `exactOwnDataSnapshot` from `./exact-snapshot.ts`. Kept for + * downstream importers; remove in the next minor release (owner: + * frontend-platform). + */ export { exactOwnDataSnapshot } from "./exact-snapshot.ts"; diff --git a/src/contracts/release-artifacts.ts b/src/contracts/release-artifacts.ts index 6dcd23aa..e3449fd5 100644 --- a/src/contracts/release-artifacts.ts +++ b/src/contracts/release-artifacts.ts @@ -151,6 +151,13 @@ const runtimeConfigArtifactFields = { BUILD_ID: z.string().min(1).optional(), } as const; +/** + * @deprecated V1 reader kept for one release after the V2-only writer + * (change evidence `FE-REG-ENV:API_CONTRACT_VERSION:*:removed`, 2026-09-24). + * Remove it and its re-export in `src/bootstrap/runtime-config-schema.ts` + * once no deployed `/config.json` still carries `CONFIG_SCHEMA_VERSION: "1"` + * (owner: frontend-platform). + */ export const runtimeConfigV1ArtifactSchema = z .object({ ...runtimeConfigArtifactFields, @@ -188,6 +195,13 @@ const releaseManifestArtifactFields = { routeChunks: z.record(z.string().min(1), z.string().min(1)), } as const; +/** + * @deprecated V1 reader kept for one release after the V2-only writer + * (change evidence `FE-REG-ENV:API_CONTRACT_VERSION:*:removed`, 2026-09-24). + * Remove it and its re-export in `src/bootstrap/load-release-manifest.ts` + * once no deployed `/release-manifest.json` still carries `schemaVersion: 1` + * (owner: frontend-platform). + */ export const releaseManifestV1ArtifactSchema = z .object({ schemaVersion: z.literal(1),