Conversation
…uration Assisted-By: devx/aa56a38c-289a-416e-8a9a-0de281e4e3e7
…vents configuration Assisted-By: devx/aa56a38c-289a-416e-8a9a-0de281e4e3e7
…g or environment opt-in Assisted-By: devx/aa56a38c-289a-416e-8a9a-0de281e4e3e7
Supply minimal readonly module identity to reverse transforms in both remote reconstruction and local deploy comparison. Events uses outer object identity without persisting a redundant nested handle, preserves effective versions and empty lists, and validates normalized configs against the fetched strict contract before serialization. This sibling alternative on events-subscription-fanout preserves rollout gates. Real TOML, manifest, fetched-contract and no-op tests cover the round trip; the generic context boundary still needs CLI-team approval.
Restore the original transform-test structure and apply only necessary contract changes, so reviewers can see what behavior actually differs. Consolidate the duplicated parser and empty-list integration scaffolding while retaining strict fetched-schema, real TOML, manifest and no-op checks. Production code and the strict schema fixture are unchanged. Independent coverage review, full app tests, type-check, lint and targeted mutation checks verify that the important regression guards remain effective.
This was referenced Sep 25, 2026
Pass optional readonly module identity through the existing reverse transform options in both remote reconstruction and local deploy comparison. Specifications can use envelope identity without adding feature-specific branches to generic callers. Keep this framework capability independent of Events adoption. A synthetic specification verifies both identity sources and unchanged config output; existing transforms do not need to consume the new context.
Make the extracted framework capability an ancestor of the Events prototype, so reviewers can discuss the generic context independently and review this PR against that prerequisite. Preserve published branch history rather than force-rewriting the existing draft. Move generic context coverage into the prerequisite while retaining the Events round-trip and strict-contract tests here. The combined production code is unchanged from the previously validated Events prototype.
3 tasks
dpeacock
changed the base branch from
events-subscription-fanout
to
dp-module-transform-context
September 25, 2026 13:24
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/api.d.ts@@ -37,21 +37,6 @@ export declare function isTransientNetworkError(error: unknown): boolean;
* - Permanent: certificate validation failures, misconfigured SSL
*/
export declare function isNetworkError(error: unknown): boolean;
-/**
- * Checks if an error is an aborted request: a user cancelling the command, the host process
- * cancelling it, or one of the CLI's own request timeouts firing.
- *
- * Not used by the retry logic, because a user-cancelled request must not be retried.
- * `isTransientNetworkError` separately matches the CLI's own timeout message, so timeouts do
- * still retry.
- *
- * The `name` check matches the `AbortError` shape that fetch throws, not cli-kit's own
- * `AbortError`, which leaves `name` as 'Error'.
- *
- * @param error - Error to be checked.
- * @returns A boolean indicating if the request was aborted.
- */
-export declare function isAbortedFetchError(error: unknown): boolean;
export declare function simpleRequestWithDebugLog<T extends {
headers: Headers;
status: number;
packages/cli-kit/dist/public/node/local-storage.d.ts@@ -48,7 +48,6 @@ export declare class LocalStorage<T extends Record<string, any>> {
*
* @param error - The error that occurred.
* @param operation - The operation that failed.
- * @param configPath - The local storage configuration file path.
* @throws AbortError if the error is permission-related.
* @throws BugError if the error is not permission-related.
*/
packages/cli-kit/dist/public/node/context/local.d.ts@@ -11,12 +11,6 @@ export declare function isTerminalInteractive(): boolean;
* @returns The path to the user's home directory.
*/
export declare function homeDirectory(): string;
-/**
- * Clears the memoized result of isUnitTest so the environment variable is re-read.
- *
- * Only intended for test helpers that temporarily toggle unit-test detection.
- */
-export declare function resetMemoizedIsUnitTest(): void;
/**
* Returns true if the CLI is running in debug mode.
*
packages/cli-kit/dist/public/node/testing/output.d.ts@@ -8,36 +8,6 @@ interface OutputMock {
error: () => string;
clear: () => void;
}
-interface StandardStreamsMock {
- stdout: () => string;
- stderr: () => string;
- restore: () => void;
-}
-export interface CapturedStandardStreams {
- stdout: () => string;
- stderr: () => string;
-}
-/**
- * Runs a callback with process stdout/stderr captured and unit-test output suppression disabled,
- * so tests can assert on what a command actually writes to the standard streams.
- *
- * The callback receives accessors instead of the function returning captured output so that
- * assertions remain possible when the callback throws (for example commands that abort).
- * Streams, console.warn and unit-test detection are restored afterwards.
- * Not safe for concurrent tests.
- *
- * @param run - Callback receiving accessors for the captured stdout and stderr.
- * @returns The value returned by the callback.
- */
-export declare function withCapturedStandardStreams<T>(run: (streams: CapturedStandardStreams) => T | Promise<T>): Promise<T>;
-/**
- * Captures writes to stdout and stderr, including console warnings intercepted by Vitest.
- * Call restore in a finally block. This replaces process globals and must not be used in concurrent tests.
- * Prefer withCapturedStandardStreams, which also disables unit-test output suppression while it runs.
- *
- * @returns Captured output and a function to restore the original writers.
- */
-export declare function mockAndCaptureStandardStreams(): StandardStreamsMock;
/**
* Returns a set of functions to get the outputs ocurred during a test run.
*
|
dpeacock
force-pushed
the
dp-module-transform-context
branch
from
September 25, 2026 16:53
935bbd0 to
54e984d
Compare
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?
Complete #8426's Events pull/deploy round trip using module-only object identity while preserving legacy list handles, subscription counts and effective API versions.
WHAT is this pull request doing?
Use the readonly module identity provided by #8674 to reconstruct Events editing handles, normalize them before fetched strict-schema validation, and omit duplicate identity from outgoing object config. Preserve explicit empty-list clearing and effective versions across modules.
This is the Events consumer of #8674; generic types, callers and context tests are reviewed there. The combined production code is unchanged from the previously validated B prototype. Published history is preserved.
Validation
Alternative B remains separate from A and C, not intended to merge alongside them. Writer gates are unchanged; CLI-team agreement, migration continuity and live Core UUID behavior remain outstanding. No public changeset while this remains a prototype.
Checklist