Repository navigation
[stable/5.2] Check stable-line pull requests with Patch QA and Patch provenance - #9217
Open
craigmichaelmartin wants to merge 3 commits into
Open
craigmichaelmartin wants to merge 3 commits into
craigmichaelmartin wants to merge 3 commits into
Conversation
Backports #9196 to stable/5.2, the newest line: Patch QA and Patch provenance on pull requests into the line, the shared tarball build for Patch QA and Release QA package, and the published-release smoke test in release.yml. Each stable branch runs its own copy of these workflows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
gonzaloriestra
approved these changes
Dec 4, 2026
Contributor
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/session.d.ts@@ -61,53 +61,21 @@ export interface OAuthSession {
appManagement?: string;
userId: string;
}
-/**
- * What a command analytics user ID identifies:
- *
- * - `account`: a Shopify account UUID.
- * - `store_admin_user`: the numeric ID of a user of a store's admin.
- * - `preview_store_shop`: the shop ID that a preview store created without an account reports.
- * - `credential`: a pseudonym derived from a token or a password.
- */
-export type UserIdKind = 'account' | 'store_admin_user' | 'preview_store_shop' | 'credential';
-/** A command analytics user ID and what it identifies. `kind` is `undefined` when that is not known. */
-interface AnalyticsUserId {
- id: string;
- kind: UserIdKind | undefined;
-}
type AuthMethod = 'partners_token' | 'service_account_token' | 'device_auth' | 'theme_access_token' | 'custom_app_token' | 'none';
/**
- * Retrieves a stable user identifier for analytics, and what it identifies, from one decision, so that the kind always
- * describes the ID that is returned.
+ * Retrieves a stable user identifier for analytics, or `'unknown'` if none applies.
*
* Evaluation order:
- * 1. If an automation token or theme token variable is set, returns a deterministic UUID derived from that secret, of
- * kind `credential`.
- * 2. Otherwise, if `setLastSeenUserIdAfterAuth` was called (e.g. after OAuth), returns that ID and the kind recorded
- * with it.
- * 3. Otherwise, if a persisted CLI session ID is available, returns it, of kind `account`.
- * 4. Otherwise returns `'unknown'`, of no kind.
- *
- * @returns A Promise that resolves to the user ID and its kind.
- */
-export declare function getLastSeenUserIdWithKindAfterAuth(): Promise<AnalyticsUserId>;
-/**
- * Retrieves a stable user identifier for analytics, or `'unknown'` if none applies. The ID is the one that
- * `getLastSeenUserIdWithKindAfterAuth` returns, in the same evaluation order.
+ * 1. If an app automation token or theme token is used, returns a deterministic UUID
+ * derived from that secret.
+ * 2. Otherwise, if `setLastSeenUserIdAfterAuth` was called (e.g. after OAuth), returns that value.
+ * 3. Otherwise, if a persisted CLI session id is available, returns it.
+ * 4. Otherwise returns `'unknown'`.
*
* @returns A Promise that resolves to the user ID as a string.
*/
export declare function getLastSeenUserIdAfterAuth(): Promise<string>;
-/**
- * Records the user ID of the command analytics event and what that ID identifies.
- *
- * `getLastSeenUserIdWithKindAfterAuth` returns the kind only together with this ID. A token variable takes precedence
- * over both, so that the kind never describes an ID that the event does not report.
- *
- * @param id - The user ID.
- * @param kind - What the user ID identifies. `undefined` records that it is not known.
- */
-export declare function setLastSeenUserIdAfterAuth(id: string, kind: UserIdKind | undefined): void;
+export declare function setLastSeenUserIdAfterAuth(id: string): void;
/**
* Retrieves the last seen authentication method used in the current session.
*
packages/cli-kit/dist/public/common/version.d.ts@@ -1 +1 @@
-export declare const CLI_KIT_VERSION = "5.2.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "5.2.1";
\ No newline at end of file
packages/cli-kit/dist/public/node/base-command.d.ts@@ -15,14 +15,6 @@ declare abstract class BaseCommand extends Command {
static descriptionWithMarkdown?: string;
static jsonOutputSchema?: JsonOutputSchema;
static get requiresSyncAnalytics(): boolean;
- /**
- * Whether the command's error messages are left out of the analytics event sent to the event collector, because they
- * can quote flag values that hold user data. The value is read before the flags are parsed, so it also covers an
- * error raised by flag parsing.
- *
- * @returns `true` to leave the command's error messages out.
- */
- static get withholdsErrorMessageFromAnalytics(): boolean;
static nonTTYFlagRequirements(_flags: FlagOutput): NonTTYFlagRequirement[];
static descriptionForHelp(): string | undefined;
/** @deprecated Use descriptionForHelp instead. */
packages/cli-kit/dist/public/node/metadata.d.ts@@ -43,13 +43,6 @@ declare const coreData: RuntimeMetadataManager<CmdFieldsFromMonorail, {
startTopic?: string;
startArgs: string[];
requiresSyncAnalytics?: boolean;
- withholdsErrorMessageFromAnalytics?: boolean;
- };
- graphqlExecute: {
- operation_type?: "query" | "mutation" | "unknown";
- query_source?: "inline" | "file";
- allow_mutations_flag_used?: boolean;
- variables_used?: boolean;
};
} & {
environmentFlags: string;
@@ -72,13 +65,6 @@ export declare const getAllPublicMetadata: () => Partial<CmdFieldsFromMonorail>,
startTopic?: string;
startArgs: string[];
requiresSyncAnalytics?: boolean;
- withholdsErrorMessageFromAnalytics?: boolean;
- };
- graphqlExecute: {
- operation_type?: "query" | "mutation" | "unknown";
- query_source?: "inline" | "file";
- allow_mutations_flag_used?: boolean;
- variables_used?: boolean;
};
} & {
environmentFlags: string;
@@ -100,13 +86,6 @@ export declare const getAllPublicMetadata: () => Partial<CmdFieldsFromMonorail>,
startTopic?: string;
startArgs: string[];
requiresSyncAnalytics?: boolean;
- withholdsErrorMessageFromAnalytics?: boolean;
- };
- graphqlExecute: {
- operation_type?: "query" | "mutation" | "unknown";
- query_source?: "inline" | "file";
- allow_mutations_flag_used?: boolean;
- variables_used?: boolean;
};
} & {
environmentFlags: string;
packages/cli-kit/dist/public/node/session.d.ts@@ -20,11 +20,8 @@ export type AccountInfo = UserAccountInfo | ServiceAccountInfo | UnknownAccountI
* Records the user ID that should be attached to command analytics for this process.
*
* @param userId - User identifier to report on the command analytics event.
- * @param kind - What the user ID identifies: a Shopify account UUID (`account`), the numeric ID of a user of a store's
- * admin (`store_admin_user`), the shop ID that a preview store created without an account reports
- * (`preview_store_shop`), or a pseudonym derived from a token or a password (`credential`). Omit it when it is not known.
*/
-export declare function setLastSeenUserId(userId: string, kind?: 'account' | 'store_admin_user' | 'preview_store_shop' | 'credential'): void;
+export declare function setLastSeenUserId(userId: string): void;
/**
* Finds a stored Shopify account session by alias without changing the current session.
*
packages/cli-kit/dist/public/node/store-auth-session.d.ts@@ -103,17 +103,6 @@ export declare function clearStoredStoreAppSession(store: string, userIdOrStorag
* @returns An Admin session, or undefined when no usable session is cached.
*/
export declare function getStoreAuthAdminSession(store: string, storage?: LocalStorage<StoreAuthSessionSchema>): AdminSession | undefined;
-/**
- * What the user ID of a stored store auth session identifies, for command analytics.
- *
- * - A standard session's user ID is the numeric ID of a user of the store's admin.
- * - A preview store created without an account reports its shop ID as the user ID.
- * - A preview store created with a placeholder account reports that account's UUID.
- *
- * @param session - The stored store auth session.
- * @returns The kind of the session's user ID.
- */
-export declare function storedSessionUserIdKind(session: StoredStoreAppSession): 'account' | 'store_admin_user' | 'preview_store_shop';
/**
* Check whether a stored store auth session is expired, including the refresh margin.
*
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Backports #9196 to
stable/5.2, the newest line, which takes the next patch releases. Each stable branch runs its own copy of these workflows, so they check pull requests into the line only once they are on it.WHAT is this pull request doing?
The same change as #9196: Patch QA and Patch provenance on pull requests into the line, the shared tarball build for Patch QA and Release QA package, and the published-release smoke test in
release.yml.How to manually test your changes?
This pull request runs both checks on its own head. Patch QA should build the tarball, install it and pass the checks on all five platforms, and find the same files as
@shopify/[email protected]. Patch provenance should fail, as it does for any pull request that isn't a backport ofmainor the line's Version Packages: this one changes.github/.🤖 Generated with Claude Code