Conversation
…g or environment opt-in Assisted-By: devx/aa56a38c-289a-416e-8a9a-0de281e4e3e7
Keep Events reconstruction in an envelope-aware adapter shared by pull and deploy comparison without expanding generic transform interfaces. Preserve exact identity, effective versions and explicit empty lists, and normalize editing handles before strict fetched-schema validation. This is a sibling alternative on events-subscription-fanout, not a rollout change. Real TOML, manifest, fetched-contract and regression tests cover the complete path; CLI-team ownership approval remains outstanding.
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
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.
*
|
cdarne
force-pushed
the
events-subscription-fanout
branch
2 times, most recently
from
September 25, 2026 20:40
f32cb9e to
08bd94f
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
Make #8426's Events pull/deploy round trip honor module-only object identity while preserving legacy list entries, counts and effective API versions.
Alternative A — localized adapter
An Events-owned adapter handles remote reconstruction and local deploy comparison without expanding generic transform interfaces. Tradeoff: explicit Events dispatch in both callers and pinned per-entry versions.
Shared fixes preserve explicit empty-list clearing and normalize editing identity before fetched strict-schema validation. Outgoing object config has neither root nor nested handles. Needed #8425 robustness fixes are included because the common #8426 base predates them; author branches are untouched.
Review / validation
Sibling draft alternative to B and C, not intended to merge alongside them. CLI-team approval remains outstanding. Writer gates are unchanged; migration continuity and live Core UUID behavior are unverified. No public changeset while this remains a prototype.