Skip to content

Commit c92a4d3

Browse files
committed
fix(scripts): codemod-split-registry keeps REGISTRY_LOG_LEVELS where its two path readers look, and regenerates
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTkZnXtRhuEiiyidvJ
1 parent 66b07ca commit c92a4d3

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

‎packages/objectql/src/registry-top-level.ts‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -945,11 +945,6 @@ function changedPackagedRuleKeys(copy: unknown, packaged: unknown): string[] {
945945
*/
946946
export type RegistryLogLevel = 'debug' | 'info' | 'warn' | 'error' | 'silent';
947947

948-
/** All valid {@link RegistryLogLevel} values — used to validate `OS_REGISTRY_LOG`. */
949-
export const REGISTRY_LOG_LEVELS: readonly RegistryLogLevel[] = [
950-
'debug', 'info', 'warn', 'error', 'silent',
951-
];
952-
953948
/**
954949
* Construction options for {@link SchemaRegistry}.
955950
*/

‎packages/objectql/src/registry.ts‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ import {
131131
EXTENSION_DEFAULT_ROW_SCOPE_REFUSED_CODE, EXTENSION_MEMBERSHIP_KEYS_REFUSED_CODE, FIND_BOUND_ACTION_COLLISIONS,
132132
MISPLACED_DEFAULT_PAGE_CODE, NAMESPACE_CONFLICT_CODE, NO_PACKAGE_REFERRER, OBJECT_FIELD_TYPE_REFUSED_CODE,
133133
OBJECT_OWNERSHIP_CONFLICT_CODE, OBJECT_QUEUE_COLUMN_REFUSED_CODE, OWNING_BUSINESS_UNIT_FIELD, QUEUE_FIELD,
134-
REGISTRY_LOG_LEVELS, RESERVED_NAMESPACES, SECURITY_CATALOG_NAME_RULE, VALIDATION_RULE_COPY_REFUSED_CODE,
135-
applyFieldPatches, bareNameColdBootWarning, bareNameConflictLine, bareNameReasonFor, bundleBaseKey,
136-
carriesTenantScopeColumn, coldBootConflictMessage, collectBundle, declaresTenantIndex, mergeValidationsByName,
137-
overlaySlotEntriesOf, overlaySlotKey, packageBodySlot, parseOverlaySlotKey, parsePackageAction, picklistReferrerOf,
138-
sameActionDeclaration, sameHolder, storesObjectLessPackagelessRow, withArrivingMembers, withDiscriminator,
134+
RESERVED_NAMESPACES, SECURITY_CATALOG_NAME_RULE, VALIDATION_RULE_COPY_REFUSED_CODE, applyFieldPatches,
135+
bareNameColdBootWarning, bareNameConflictLine, bareNameReasonFor, bundleBaseKey, carriesTenantScopeColumn,
136+
coldBootConflictMessage, collectBundle, declaresTenantIndex, mergeValidationsByName, overlaySlotEntriesOf,
137+
overlaySlotKey, packageBodySlot, parseOverlaySlotKey, parsePackageAction, picklistReferrerOf, sameActionDeclaration,
138+
sameHolder, storesObjectLessPackagelessRow, withArrivingMembers, withDiscriminator,
139139
} from './registry-top-level.js';
140140
import type {
141141
ArtifactInstallScope, BareNameConflict, BoundActionCollision, BundleArrival, BundleEntry, CoOwnershipSource,
@@ -151,9 +151,9 @@ export {
151151
DUPLICATE_ARTIFACT_OBJECT_NAME_CODE, type DefaultRecordPageConflict, EXTENSION_DEFAULT_ROW_SCOPE_REFUSED_CODE,
152152
EXTENSION_MEMBERSHIP_KEYS_REFUSED_CODE, FIND_BOUND_ACTION_COLLISIONS, MISPLACED_DEFAULT_PAGE_CODE,
153153
NAMESPACE_CONFLICT_CODE, OBJECT_FIELD_TYPE_REFUSED_CODE, OBJECT_OWNERSHIP_CONFLICT_CODE,
154-
OBJECT_QUEUE_COLUMN_REFUSED_CODE, type ObjectContributor, type ObjectExtensionFoldOptions, REGISTRY_LOG_LEVELS,
155-
RESERVED_NAMESPACES, type RegistryLogLevel, type SchemaRegistryOptions, type SecurityCatalogNameConflict,
156-
type UnboundActionTarget, type UnboundActionTargetError, VALIDATION_RULE_COPY_REFUSED_CODE, bareNameColdBootWarning,
154+
OBJECT_QUEUE_COLUMN_REFUSED_CODE, type ObjectContributor, type ObjectExtensionFoldOptions, RESERVED_NAMESPACES,
155+
type RegistryLogLevel, type SchemaRegistryOptions, type SecurityCatalogNameConflict, type UnboundActionTarget,
156+
type UnboundActionTargetError, VALIDATION_RULE_COPY_REFUSED_CODE, bareNameColdBootWarning,
157157
collectManifestBoundActions, collectManifestObjectNames, computeFQN, describeBoundActionCollision,
158158
describeUnboundActionTargets, parseFQN, reconcileManagedApiMethods, warnFunctionalCompleteness,
159159
warnStrippedLegacyApiMethods,
@@ -319,6 +319,11 @@ function mergeObjectDefinitions(
319319
return merged;
320320
}
321321

322+
/** All valid {@link RegistryLogLevel} values — used to validate `OS_REGISTRY_LOG`. */
323+
export const REGISTRY_LOG_LEVELS: readonly RegistryLogLevel[] = [
324+
'debug', 'info', 'warn', 'error', 'silent',
325+
];
326+
322327
/**
323328
* Augment a registered object with implicit system fields.
324329
*

‎scripts/codemod-split-registry.mjs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ const PATH_READER_PINS = Object.freeze({
163163
// split PR does not edit, so the anchored declarations stay here.
164164
mergeObjectDefinitions: 'ADR-0029 and ADR-0146 anchor `registry.ts#mergeObjectDefinitions` (check:adr-symbol-anchors)',
165165
isShareableNamespace: 'ADR-0130 and ADR-0141 anchor `registry.ts#isShareableNamespace` (check:adr-symbol-anchors)',
166+
// `scripts/check-registry-log-declared.mjs` and `scripts/check-rest-log-declared.mjs`
167+
// read the level vocabulary out of `registry.ts` by path (`LEVELS_SOURCE`).
168+
REGISTRY_LOG_LEVELS: 'check:registry-log-declared and check:rest-log-declared read it from registry.ts by path (LEVELS_SOURCE)',
166169
TENANT_SCOPE_INDEX: "ADR-0117 anchors `registry.ts#organization_id`, which resolves as the `'organization_id'` token this declaration carries (check:adr-symbol-anchors)",
167170
});
168171

0 commit comments

Comments
 (0)