Skip to content

675 simulation data#676

Merged
alexanderkirtzel merged 8 commits into
mainfrom
675-simulation-data
Jun 16, 2026
Merged

675 simulation data#676
alexanderkirtzel merged 8 commits into
mainfrom
675-simulation-data

Conversation

@alexanderkirtzel

@alexanderkirtzel alexanderkirtzel commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added WALKEROS_OBSERVE_LEVEL and WALKEROS_CONFIG_FROZEN to control telemetry baseline and frozen-config runs.
    • Simulation now supports injecting data (without rebundling) and can report mappingKey for destination mapping matches.
    • Heartbeats now include recent errors/logs (secrets redacted) and richer per-destination counters.
  • Bug Fixes
    • Improved resilience for bundle/config/secret fetching with bounded retries and timeouts.
    • Fixed session start/event delivery when collection begins with run: false.
    • Fail-closed consent gating for consent-required destinations.
    • Updated Usercentrics consent handling to rely on official events and prevent dropped consent-change updates.
  • Documentation
    • Updated CLI/runner and Usercentrics docs for the new environment variables and behaviors.

@alexanderkirtzel alexanderkirtzel linked an issue Jun 15, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds bounded retry and telemetry controls to the CLI runtime, extends simulation with injected data and mapping-key reporting, migrates Usercentrics and session flows to official lifecycle events, and adds collector, BigQuery, and Express delivery timeout and acknowledgement changes.

Changes

CLI runtime, logging, and simulation

Layer / File(s) Summary
Fetch retry plumbing
packages/cli/src/runtime/fetch-retry.ts, packages/cli/src/runtime/config-fetcher.ts, packages/cli/src/runtime/resolve-bundle.ts, packages/cli/src/runtime/secrets-fetcher.ts, packages/cli/src/commands/bundle/package-manager.ts, packages/cli/src/__tests__/unit/runtime/*, packages/cli/src/commands/bundle/__tests__/package-manager-resilience.test.ts, website/docs/apps/runner.mdx, .changeset/cli-runner-fetch-resilience.md
Adds bounded retry helpers, reuses them in runtime and package downloads, and updates retry-focused tests and docs.
Logging rings and heartbeat payloads
packages/cli/src/core/cli-logger.ts, packages/cli/src/core/redact-line.ts, packages/cli/src/runtime/log-ring.ts, packages/cli/src/runtime/redact.ts, packages/cli/src/runtime/heartbeat.ts, packages/cli/src/commands/run/index.ts, packages/cli/src/runtime/index.ts, packages/cli/src/__tests__/unit/runtime/*, packages/cli/src/core/__tests__/*, .changeset/cli-runtime-log-rings.md
Adds log/error ring capture, redaction, heartbeat payload fields, and supporting exports and tests.
Run pipeline env gating and process guards
packages/cli/src/commands/run/pipeline.ts, packages/cli/src/commands/run/index.ts, packages/cli/src/__tests__/unit/commands/run-pipeline-*.test.ts, packages/cli/src/__tests__/unit/commands/run-command-guard.test.ts, packages/cli/src/__tests__/unit/commands/run-env-file-wiring.test.ts, .changeset/cli-runtime-observe-frozen-env.md, website/docs/apps/cli.mdx, package.json, turbo.json, apps/explorer/turbo.json
Adds frozen-config and observe-level gating, process error guards, bundle boot etag plumbing, and matching tests and workflow/task wiring.
Simulation data injection and mapping-key reporting
packages/core/src/types/simulation.ts, packages/cli/src/commands/push/simulation-result.ts, packages/cli/src/commands/push/index.ts, packages/cli/src/index.ts, packages/cli/src/commands/bundle/bundler.ts, packages/cli/src/commands/bundle/__tests__/config-classifier.test.ts, packages/cli/src/__tests__/unit/bundle/bundler-codegen.test.ts, packages/cli/src/commands/push/__tests__/simulate-*.test.ts, .changeset/cli-simulate-data-injection.md, .changeset/core-simulation-mapping-key.md
Adds data simulation overrides, exports the payload builder, and reports destination mappingKey in simulation results.
CLI workflow and release-note updates
packages/cli/src/__tests__/integration/bundle/cdn-jsdom.test.ts, .changeset/*, website/docs/apps/runner.mdx
Adjusts bundled smoke tests, changelog notes, and runner docs around the runtime changes.

Usercentrics and session lifecycle

Layer / File(s) Summary
Usercentrics types, schemas, and fixtures
packages/web/sources/cmps/usercentrics/src/types/index.ts, packages/web/sources/cmps/usercentrics/src/schemas/settings.ts, packages/web/sources/cmps/usercentrics/src/index.ts, packages/web/sources/cmps/usercentrics/src/examples/*, packages/web/sources/cmps/usercentrics/README.md, website/docs/sources/web/cmps/usercentrics/index.mdx, skills/walkeros-create-cmp-source/SKILL.md, .changeset/usercentrics-official-consent.md
Removes eventName, adds consent-history and initialization typing, and rewrites example fixtures and docs around official Usercentrics events.
Usercentrics adapters and tests
packages/web/sources/cmps/usercentrics/src/lib/v2.ts, packages/web/sources/cmps/usercentrics/src/lib/v3.ts, packages/web/sources/cmps/usercentrics/src/__tests__/*
Switches V2/V3 consent reading and event handling to official lifecycle events, explicit history, and updated cleanup behavior.
Session run-barrier deferral
packages/web/sources/session/src/index.ts, packages/web/sources/session/src/__tests__/*, .changeset/session-ungated-run-emit.md
Defers ungated session emission until the collector run lifecycle and updates the corresponding tests and note.

Collector, BigQuery, and Express delivery behavior

Layer / File(s) Summary
Collector timeout and consent gating
packages/core/src/types/destination.ts, packages/core/src/schemas/destination.ts, packages/collector/src/destination.ts, packages/collector/src/__tests__/destination*.test.ts, .changeset/collector-consent-init-gate.md
Adds per-destination timeout support and fail-closed consent gating for destination initialization with tests and schema updates.
BigQuery deadline propagation
packages/server/destinations/gcp/src/bigquery/*, packages/server/destinations/gcp/src/bigquery/__mocks__/*, packages/server/destinations/gcp/src/bigquery/__tests__/*
Propagates destination timeout to BigQuery writer calls and preserves raw append errors through updated mocks and tests.
Express async ack behavior
packages/server/sources/express/src/*, packages/server/sources/express/src/__tests__/*
Adds async response behavior to the Express source, with default respond-first handling and matching tests/docs.

Sequence Diagram(s)

sequenceDiagram
  participant runPipeline
  participant fetchWithRetry
  participant RemoteAPI
  runPipeline->>fetchWithRetry: fetch bundle/config/secrets
  loop attempts within budget
    fetchWithRetry->>RemoteAPI: request
    alt transient failure
      RemoteAPI-->>fetchWithRetry: timeout / 5xx / network error
      fetchWithRetry->>fetchWithRetry: backoff and retry
    else success
      RemoteAPI-->>fetchWithRetry: response
    end
  end
  fetchWithRetry-->>runPipeline: response or exhaustion error
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • elbwalker/walkerOS#657: Shares the CLI telemetry and observer wiring in packages/cli/src/commands/run/pipeline.ts, including resolveTelemetryOptions and FlowState handling.
  • elbwalker/walkerOS#631: Touches the same CLI runtime fetcher paths that now use fetchWithRetry, especially config and secret retrieval.
  • elbwalker/walkerOS#664: Related to the runtime trace-poller and traceUntil flow that this PR updates alongside WALKEROS_OBSERVE_LEVEL.

Suggested labels

utils

Poem

🐇 I hopped through retries with jittered cheer,
No frozen night could stall me here.
Official CMP bells now softly chime,
And session starts wait for run-time.
With mapping keys and redacted logs,
This burrow glows like moonlit fog.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 675-simulation-data

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/cli/src/commands/push/index.ts (1)

1376-1421: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Preserve mappingKey for destination error results

Line 1386 captures mappingKey from FlowState, but when collector.push(...) throws, Line 1415 returns through the error callback without mappingKey. That drops the matched rule key for exactly the failing destination path.

Suggested fix
 export async function simulateDestination(
   configOrPath: string | Flow.Json,
   event: WalkerOS.DeepPartialEvent,
   options: SimulateDestinationOptions,
 ): Promise<Simulation.Result> {
   const startTime = Date.now();
+  let mappingKey: string | undefined;
@@
-        let mappingKey: string | undefined;
         const targetStepId = stepId('destination', options.destinationId);
@@
-        if (collector.observers instanceof Set) {
-          collector.observers.add(captureMappingKey);
-        }
+        const hasObservers = collector.observers instanceof Set;
+        if (hasObservers) collector.observers.add(captureMappingKey);
 
         // Full pipeline: consent, mapping, enrichment, before chains
         // include filter ensures only the target destination receives the event
-        await collector.push(event, {
-          include: [options.destinationId],
-        });
+        try {
+          await collector.push(event, {
+            include: [options.destinationId],
+          });
+        } finally {
+          if (hasObservers) collector.observers.delete(captureMappingKey);
+        }
@@
       (error) =>
         buildSimulationResult({
           step: 'destination',
           name: options.destinationId,
           startTime,
+          mappingKey,
           error,
         }),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/commands/push/index.ts` around lines 1376 - 1421, The
mappingKey variable is captured from FlowState events during the
collector.push() execution, but when push throws an error, the error callback
handler does not pass the captured mappingKey to buildSimulationResult. Fix this
by adding the mappingKey property (with the same value captured by
captureMappingKey) to the buildSimulationResult call in the error callback
handler that starts around line 1413, ensuring the matched rule key is preserved
even when the destination step fails.
packages/web/sources/cmps/usercentrics/src/schemas/settings.ts (1)

7-21: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

SettingsSchema no longer exposes v3EventName, breaking the V3 adapter config contract.

packages/web/sources/cmps/usercentrics/src/lib/v3.ts reads settings.v3EventName, and packages/web/sources/cmps/usercentrics/src/types/index.ts declares it, but the schema object here omits it. If this schema is used to parse settings, v3EventName will be stripped and ignored at runtime.

Suggested fix
 export const SettingsSchema = z
   .object({
@@
     explicitOnly: z
       .boolean()
       .describe(
         'Only publish when the user has actively decided (V3: consent.type EXPLICIT; V2: an EXPLICIT entry in service consent history). Implicit/default page-load states are suppressed. Set false to publish any snapshot including implicit. Default: true.',
       )
       .optional(),
+
+    v3EventName: z
+      .string()
+      .describe(
+        "V3 window event name to listen for consent changes. Default: 'UC_UI_CMP_EVENT'.",
+      )
+      .optional(),
   })
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/web/sources/cmps/usercentrics/src/schemas/settings.ts` around lines
7 - 21, The SettingsSchema object is missing the v3EventName field definition,
which causes it to be stripped during runtime parsing even though it is declared
in the types and used by the V3 adapter code. Add a new field definition for
v3EventName to the schema object alongside categoryMap and explicitOnly. Use
z.string() to define it as a string type, chain .optional() to make it optional,
and include a .describe() call with an appropriate description explaining its
purpose for the V3 event configuration.
🧹 Nitpick comments (3)
packages/web/sources/cmps/usercentrics/README.md (1)

56-64: ⚡ Quick win

Explicit decision detection guidance is accurate across all three docs; reinforce the dual-API pattern in decision matrix.

All three documentation files correctly state V3's consent.type === EXPLICIT and V2's EXPLICIT entry in service consent history. However, the decision matrix in SKILL.md oversimplifies Usercentrics as "events only" (line 142) and "event detail only" (line 151), which obscures the critical dual-path pattern:

  • packages/web/sources/cmps/usercentrics/README.md#L56-L64: Correctly documents explicit detection and timing paths
  • website/docs/sources/web/cmps/usercentrics/index.mdx#L112-L118: Correctly documents explicit consent subsection and V2/V3 verification
  • skills/walkeros-create-cmp-source/SKILL.md#L140-L152: Decision matrix should clarify "Already loaded" (static read + UC_UI_INITIALIZED) and "Consent access" (official getters + event-triggered reads), not just "events only"

Update the decision matrix rows 142 and 151 to accurately represent the dual static-read + event-listener pattern so new implementers understand the full scope.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/web/sources/cmps/usercentrics/README.md` around lines 56 - 64, The
anchor documentation at packages/web/sources/cmps/usercentrics/README.md lines
56-64 and the sibling documentation at
website/docs/sources/web/cmps/usercentrics/index.mdx lines 112-118 both
correctly document the dual-path pattern for explicit decision detection (static
getter read or UC_UI_INITIALIZED). However, the decision matrix in
skills/walkeros-create-cmp-source/SKILL.md lines 140-152 oversimplifies this
pattern by describing Usercentrics as "events only" and "event detail only".
Update the decision matrix rows at lines 142 and 151 in SKILL.md to accurately
represent both paths: clarify that "Already loaded" encompasses static read plus
UC_UI_INITIALIZED timing, and that "Consent access" includes both official
getters and event-triggered reads, not just events. This ensures new
implementers understand the complete dual static-read and event-listener pattern
consistent with the correct documentation in the other two files.
skills/walkeros-create-cmp-source/SKILL.md (1)

703-709: 💤 Low value

"Previous-choice" note is correct; consider minor wording improvement for implementer clarity.

The guidance correctly identifies that returning visitors' explicit decisions must be detected from official stored consent metadata (V3 consent.type, V2 service history), not from a per-pageload event type field. This aligns with the actual implementation (v2.ts hasExplicitDecision() and v3.ts buildDetailFromV3()).

Minor suggestion for clarity: The phrase "not a per-pageload event type field" could be misinterpreted as ruling out all event-derived data. Consider:

"...not from the real-time type field of decision events (which reflects the current user action), but from official stored consent metadata or decision history (which proves an explicit prior decision was active)."

This helps implementers understand they're distinguishing between current-page intent vs. stored decision proof, not between events and non-events.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/walkeros-create-cmp-source/SKILL.md` around lines 703 - 709, Update
the wording in the "previous-choice" detection section to clarify the
distinction between real-time decision event data and stored consent metadata.
The current phrase "not a per-pageload event `type` field" could be
misinterpreted as ruling out all event-derived data. Replace it with more
explicit language that explains the difference: implementers should not use the
real-time `type` field of decision events (which reflects the current user
action), but instead rely on official stored consent metadata or decision
history (which proves an explicit prior decision was actually active). This
clarification helps implementers understand they are distinguishing between
current-page intent versus stored decision proof.
packages/web/sources/cmps/usercentrics/src/lib/v3.ts (1)

109-112: ⚡ Quick win

Avoid silent failure on UC_UI_INITIALIZED consent reads.

Line 111 swallows errors without logging. If getConsentDetails() fails on init, this path fails invisibly and is hard to diagnose.

💡 Suggested refactor
   const onInitialized = (): void => {
     const cmp = win.__ucCmp;
-    if (cmp) publishConsent(cmp).catch(() => {});
+    if (cmp)
+      publishConsent(cmp).catch((err) => {
+        logger.warn('v3 initialized consent read failed', err);
+      });
   };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/web/sources/cmps/usercentrics/src/lib/v3.ts` around lines 109 - 112,
The onInitialized function silently catches errors from the publishConsent call
without logging them, making it difficult to diagnose failures during consent
initialization. Replace the empty catch handler with proper error logging that
captures and logs the actual error details. This will ensure that if
publishConsent fails, the error information is recorded for debugging purposes
rather than being swallowed invisibly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/test.yml:
- Line 44: The actions/cache action on line 44 is pinned to a version tag (v4)
instead of a full commit SHA, which is inconsistent with other actions in the
workflow and weakens supply-chain integrity. Replace actions/cache@v4 with
actions/cache pinned to its full commit SHA (in the format
actions/cache@<full-commit-sha>) to match the pinning strategy used by
actions/checkout, actions/setup-node, and actions/upload-artifact elsewhere in
the workflow.

In `@packages/cli/src/runtime/fetch-retry.ts`:
- Around line 184-187: The AbortSignal.timeout(attemptTimeoutMs) at line 186 in
fetch-retry.ts remains active after fetch() resolves, causing the timeout to
potentially fire and abort the response body read downstream (in fetchTextToDisk
or extractToDir), resulting in an unretried AbortError. Create an
AbortController to manage the timeout signal, call abort() on it immediately
after the fetch completes to clear the timeout, and ensure the signal is no
longer active during body consumption. Additionally, update the incorrect
comment in resolve-bundle.ts (lines 126-132) that claims the timeout "already
fired and settled" to accurately describe that the timeout signal must be
managed to prevent aborting body reads.

In `@packages/cli/src/types/api.gen.d.ts`:
- Around line 6033-6041: The OpenAPI spec in packages/cli/openapi/spec.json
incorrectly advertises both text/event-stream and application/json media types
for the deployment stream endpoint's 200 response, which can cause generated
clients to use buffered JSON handling instead of streaming. Locate the
deployment stream endpoint in the OpenAPI spec (the endpoint that corresponds to
the generated DeploymentStreamStatusEvent content definition shown in the diff)
and remove the application/json entry from the 200 response content definition,
leaving only text/event-stream. After making this change, run npm run
generate:types to regenerate the TypeScript types file.

In `@packages/core/src/__tests__/cache-types.test-d.ts`:
- Around line 32-34: The test file currently only validates the negative case by
showing that `StoreCacheRule` rejects the `update` property, but doesn't test
the positive case for `EventCacheRule`. Add the `update` property to the
`_eventOk` object assignment to provide a positive assertion that
`EventCacheRule` accepts the `update` field, ensuring this type definition is
preserved in future changes and preventing accidental removal of the `update`
property.

In `@packages/web/sources/cmps/usercentrics/src/lib/v2.ts`:
- Around line 96-99: The early return condition in the read function is
unnecessarily gating V2 consent publishing on the optional isInitialized method.
Remove the isInitialized check from the conditional guard in the read function
so that the function only requires the getServicesBaseInfo method to be
available, allowing V2 consent reads to proceed on compatible deployments that
may not have the isInitialized method.

---

Outside diff comments:
In `@packages/cli/src/commands/push/index.ts`:
- Around line 1376-1421: The mappingKey variable is captured from FlowState
events during the collector.push() execution, but when push throws an error, the
error callback handler does not pass the captured mappingKey to
buildSimulationResult. Fix this by adding the mappingKey property (with the same
value captured by captureMappingKey) to the buildSimulationResult call in the
error callback handler that starts around line 1413, ensuring the matched rule
key is preserved even when the destination step fails.

In `@packages/web/sources/cmps/usercentrics/src/schemas/settings.ts`:
- Around line 7-21: The SettingsSchema object is missing the v3EventName field
definition, which causes it to be stripped during runtime parsing even though it
is declared in the types and used by the V3 adapter code. Add a new field
definition for v3EventName to the schema object alongside categoryMap and
explicitOnly. Use z.string() to define it as a string type, chain .optional() to
make it optional, and include a .describe() call with an appropriate description
explaining its purpose for the V3 event configuration.

---

Nitpick comments:
In `@packages/web/sources/cmps/usercentrics/README.md`:
- Around line 56-64: The anchor documentation at
packages/web/sources/cmps/usercentrics/README.md lines 56-64 and the sibling
documentation at website/docs/sources/web/cmps/usercentrics/index.mdx lines
112-118 both correctly document the dual-path pattern for explicit decision
detection (static getter read or UC_UI_INITIALIZED). However, the decision
matrix in skills/walkeros-create-cmp-source/SKILL.md lines 140-152
oversimplifies this pattern by describing Usercentrics as "events only" and
"event detail only". Update the decision matrix rows at lines 142 and 151 in
SKILL.md to accurately represent both paths: clarify that "Already loaded"
encompasses static read plus UC_UI_INITIALIZED timing, and that "Consent access"
includes both official getters and event-triggered reads, not just events. This
ensures new implementers understand the complete dual static-read and
event-listener pattern consistent with the correct documentation in the other
two files.

In `@packages/web/sources/cmps/usercentrics/src/lib/v3.ts`:
- Around line 109-112: The onInitialized function silently catches errors from
the publishConsent call without logging them, making it difficult to diagnose
failures during consent initialization. Replace the empty catch handler with
proper error logging that captures and logs the actual error details. This will
ensure that if publishConsent fails, the error information is recorded for
debugging purposes rather than being swallowed invisibly.

In `@skills/walkeros-create-cmp-source/SKILL.md`:
- Around line 703-709: Update the wording in the "previous-choice" detection
section to clarify the distinction between real-time decision event data and
stored consent metadata. The current phrase "not a per-pageload event `type`
field" could be misinterpreted as ruling out all event-derived data. Replace it
with more explicit language that explains the difference: implementers should
not use the real-time `type` field of decision events (which reflects the
current user action), but instead rely on official stored consent metadata or
decision history (which proves an explicit prior decision was actually active).
This clarification helps implementers understand they are distinguishing between
current-page intent versus stored decision proof.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c6dbde46-5a76-4abf-a8b6-becab6a400c3

📥 Commits

Reviewing files that changed from the base of the PR and between 3e1d7a7 and 16b3bd3.

📒 Files selected for processing (63)
  • .changeset/cli-runner-fetch-resilience.md
  • .changeset/cli-runtime-observe-frozen-env.md
  • .changeset/cli-simulate-data-injection.md
  • .changeset/core-simulation-mapping-key.md
  • .changeset/session-ungated-run-emit.md
  • .changeset/usercentrics-official-consent.md
  • .github/workflows/test.yml
  • apps/explorer/turbo.json
  • package.json
  • packages/cli/openapi/spec.json
  • packages/cli/src/__tests__/integration/bundle/cdn-jsdom.test.ts
  • packages/cli/src/__tests__/unit/bundle/bundler-codegen.test.ts
  • packages/cli/src/__tests__/unit/commands/run-pipeline-frozen.test.ts
  • packages/cli/src/__tests__/unit/commands/run-pipeline-telemetry.test.ts
  • packages/cli/src/__tests__/unit/runtime/resolve-bundle.test.ts
  • packages/cli/src/commands/bundle/__tests__/config-classifier.test.ts
  • packages/cli/src/commands/bundle/bundler.ts
  • packages/cli/src/commands/push/__tests__/simulate-data-injection.test.ts
  • packages/cli/src/commands/push/__tests__/simulate-mapping-key.test.ts
  • packages/cli/src/commands/push/__tests__/simulate-result-shape.test.ts
  • packages/cli/src/commands/push/index.ts
  • packages/cli/src/commands/push/simulation-result.ts
  • packages/cli/src/commands/run/pipeline.ts
  • packages/cli/src/index.ts
  • packages/cli/src/runtime/__tests__/config-fetcher.test.ts
  • packages/cli/src/runtime/__tests__/fetch-retry.test.ts
  • packages/cli/src/runtime/__tests__/secrets-fetcher.test.ts
  • packages/cli/src/runtime/config-fetcher.ts
  • packages/cli/src/runtime/fetch-retry.ts
  • packages/cli/src/runtime/resolve-bundle.ts
  • packages/cli/src/runtime/secrets-fetcher.ts
  • packages/cli/src/types/api.gen.d.ts
  • packages/core/src/__tests__/cache-types.test-d.ts
  • packages/core/src/__tests__/cache-types.test.ts
  • packages/core/src/__tests__/types/contract.test.ts
  • packages/core/src/__tests__/types/observer.test.ts
  • packages/core/src/__tests__/types/store.test.ts
  • packages/core/src/__tests__/types/telemetry.test.ts
  • packages/core/src/types/simulation.ts
  • packages/web/sources/browser/src/__tests__/command-coverage.test.ts
  • packages/web/sources/cmps/usercentrics/README.md
  • packages/web/sources/cmps/usercentrics/src/__tests__/index.test.ts
  • packages/web/sources/cmps/usercentrics/src/__tests__/stepExamples.test.ts
  • packages/web/sources/cmps/usercentrics/src/__tests__/test-utils.ts
  • packages/web/sources/cmps/usercentrics/src/__tests__/v2.test.ts
  • packages/web/sources/cmps/usercentrics/src/__tests__/v3.test.ts
  • packages/web/sources/cmps/usercentrics/src/examples/inputs.ts
  • packages/web/sources/cmps/usercentrics/src/examples/outputs.ts
  • packages/web/sources/cmps/usercentrics/src/examples/step.ts
  • packages/web/sources/cmps/usercentrics/src/index.ts
  • packages/web/sources/cmps/usercentrics/src/lib/v2.ts
  • packages/web/sources/cmps/usercentrics/src/lib/v3.ts
  • packages/web/sources/cmps/usercentrics/src/schemas/settings.ts
  • packages/web/sources/cmps/usercentrics/src/types/index.ts
  • packages/web/sources/session/src/__tests__/index.integration.test.ts
  • packages/web/sources/session/src/__tests__/index.test.ts
  • packages/web/sources/session/src/__tests__/stepExamples.test.ts
  • packages/web/sources/session/src/index.ts
  • skills/walkeros-create-cmp-source/SKILL.md
  • turbo.json
  • website/docs/apps/cli.mdx
  • website/docs/apps/runner.mdx
  • website/docs/sources/web/cmps/usercentrics/index.mdx
💤 Files with no reviewable changes (7)
  • packages/core/src/tests/types/contract.test.ts
  • packages/core/src/tests/cache-types.test.ts
  • packages/core/src/tests/types/observer.test.ts
  • packages/web/sources/browser/src/tests/command-coverage.test.ts
  • packages/core/src/tests/types/store.test.ts
  • packages/core/src/tests/types/telemetry.test.ts
  • packages/web/sources/cmps/usercentrics/src/index.ts

Comment thread .github/workflows/test.yml Outdated
Comment thread packages/cli/src/runtime/fetch-retry.ts Outdated
Comment thread packages/cli/src/types/api.gen.d.ts
Comment thread packages/core/src/__tests__/cache-types.test-d.ts
Comment thread packages/web/sources/cmps/usercentrics/src/lib/v2.ts
@github-actions

Copy link
Copy Markdown
Contributor

📦 Pre-release published (next)

Packages

Install: npm i @walkeros/core@next

🐳 Docker images published

  • walkeros/flow:4.2.1-next-1781526381392 (:next)
  • walkeros/cli:4.2.1-next-1781526381392 (:next)

Docker: docker pull walkeros/flow:next

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/runtime/__tests__/redact.test.ts`:
- Around line 265-283: The performance tests in the redact.test.ts file use
overly tight wall-clock time thresholds of 200ms in the
expect(elapsed).toBeLessThan(200) assertions within both the 60KB and 80KB test
cases. These thresholds are too strict and cause nondeterministic failures on
slower CI runners. Increase the time threshold from 200ms to a looser but still
reasonable bound (such as 500ms or 1000ms) in both test cases to preserve the
anti-ReDoS intent while eliminating test instability and flakiness.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0c0a8378-5878-4568-bfc1-f07beb366f3d

📥 Commits

Reviewing files that changed from the base of the PR and between 16b3bd3 and bd9188d.

📒 Files selected for processing (27)
  • .changeset/cli-runtime-log-rings.md
  • .changeset/collector-consent-init-gate.md
  • .github/workflows/test.yml
  • packages/cli/openapi/spec.json
  • packages/cli/src/commands/run/index.ts
  • packages/cli/src/commands/run/pipeline.ts
  • packages/cli/src/core/__tests__/cli-logger.test.ts
  • packages/cli/src/core/cli-logger.ts
  • packages/cli/src/runtime/__tests__/fetch-retry.test.ts
  • packages/cli/src/runtime/__tests__/heartbeat.test.ts
  • packages/cli/src/runtime/__tests__/log-ring.test.ts
  • packages/cli/src/runtime/__tests__/redact.test.ts
  • packages/cli/src/runtime/fetch-retry.ts
  • packages/cli/src/runtime/heartbeat.ts
  • packages/cli/src/runtime/index.ts
  • packages/cli/src/runtime/log-ring.ts
  • packages/cli/src/runtime/redact.ts
  • packages/cli/src/runtime/resolve-bundle.ts
  • packages/cli/src/types/api.gen.d.ts
  • packages/collector/src/__tests__/destination.consent-init-gate.test.ts
  • packages/collector/src/destination.ts
  • packages/core/src/__tests__/cache-types.test-d.ts
  • packages/web/destinations/heap/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/heap/src/examples/step.ts
  • packages/web/sources/cmps/usercentrics/src/__tests__/v2.test.ts
  • packages/web/sources/cmps/usercentrics/src/lib/v2.ts
  • website/docs/apps/runner.mdx
✅ Files skipped from review due to trivial changes (4)
  • .changeset/cli-runtime-log-rings.md
  • website/docs/apps/runner.mdx
  • .changeset/collector-consent-init-gate.md
  • packages/cli/src/types/api.gen.d.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/cli/src/runtime/resolve-bundle.ts
  • packages/core/src/tests/cache-types.test-d.ts
  • packages/cli/src/runtime/tests/fetch-retry.test.ts
  • .github/workflows/test.yml
  • packages/cli/src/runtime/fetch-retry.ts
  • packages/web/sources/cmps/usercentrics/src/lib/v2.ts
  • packages/web/sources/cmps/usercentrics/src/tests/v2.test.ts

Comment thread packages/cli/src/runtime/__tests__/redact.test.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/web/destinations/fullstory/src/__tests__/stepExamples.test.ts`:
- Around line 96-103: The elb call registering the walker destination at line 96
is not awaited, creating a race condition where the subsequent elb(event) call
at line 103 may execute before the destination is fully registered, causing
flaky assertions. Add the await keyword before the elb('walker destination',
...) call to ensure the destination registration completes before the event is
dispatched.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b07c7aae-9631-4c6e-bcd6-dc6503f046fa

📥 Commits

Reviewing files that changed from the base of the PR and between bd9188d and f6ae1c6.

📒 Files selected for processing (20)
  • packages/server/destinations/amplitude/src/__tests__/stepExamples.test.ts
  • packages/server/destinations/amplitude/src/examples/step.ts
  • packages/server/destinations/posthog/src/__tests__/stepExamples.test.ts
  • packages/server/destinations/posthog/src/examples/step.ts
  • packages/web/destinations/amplitude/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/amplitude/src/examples/step.ts
  • packages/web/destinations/clarity/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/clarity/src/examples/step.ts
  • packages/web/destinations/fullstory/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/fullstory/src/examples/step.ts
  • packages/web/destinations/heap/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/heap/src/examples/step.ts
  • packages/web/destinations/mixpanel/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/mixpanel/src/examples/step.ts
  • packages/web/destinations/optimizely/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/optimizely/src/examples/step.ts
  • packages/web/destinations/posthog/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/posthog/src/examples/step.ts
  • packages/web/destinations/tiktok/src/__tests__/stepExamples.test.ts
  • packages/web/destinations/tiktok/src/examples/step.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/web/destinations/heap/src/tests/stepExamples.test.ts
  • packages/web/destinations/heap/src/examples/step.ts

Comment thread packages/web/destinations/fullstory/src/__tests__/stepExamples.test.ts Outdated
@github-actions

Copy link
Copy Markdown
Contributor

📦 Pre-release published (next)

Packages

Install: npm i @walkeros/core@next

🐳 Docker images published

  • walkeros/flow:4.2.1-next-1781538735002 (:next)
  • walkeros/cli:4.2.1-next-1781538735002 (:next)

Docker: docker pull walkeros/flow:next

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/__tests__/integration/runtime/hot-swap.test.ts`:
- Around line 130-131: The current assertion on the oldCommand variable only
checks that it was not called with the specific argument 'shutdown', but allows
it to be called with other arguments. To strengthen the rollback safety check
and ensure complete no-shutdown behavior on a failed swap, replace the
`.not.toHaveBeenCalledWith('shutdown')` assertion with `.not.toHaveBeenCalled()`
so that oldCommand is never invoked at all during the failed swap scenario.

In `@packages/cli/src/runtime/__tests__/heartbeat.test.ts`:
- Around line 29-30: The mockLogger created using makeSpyLogger() persists
across test cases, causing jest.fn() call history to leak between tests and
weaken test isolation. Move the mockLogger creation into a beforeEach hook
instead of creating it once at the module level, or alternatively add
jest.clearAllMocks() in a beforeEach hook to reset mock call histories before
each test runs. Ensure that the existing afterEach restoration code (which
appears to be around lines 97-100) is preserved or adjusted as needed to work
with the new setup.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0994833d-4d3a-43f0-9fdd-47e88230c929

📥 Commits

Reviewing files that changed from the base of the PR and between f6ae1c6 and ac5592a.

📒 Files selected for processing (43)
  • packages/cli/openapi/spec.json
  • packages/cli/src/__tests__/integration/runtime/hot-swap.test.ts
  • packages/cli/src/__tests__/unit/commands/run-command-guard.test.ts
  • packages/cli/src/__tests__/unit/commands/run-env-file-wiring.test.ts
  • packages/cli/src/__tests__/unit/commands/run-pipeline-frozen.test.ts
  • packages/cli/src/__tests__/unit/runtime/heartbeat-counters.test.ts
  • packages/cli/src/commands/bundle/__tests__/package-manager-resilience.test.ts
  • packages/cli/src/commands/bundle/package-manager.ts
  • packages/cli/src/commands/run/__tests__/pipeline.test.ts
  • packages/cli/src/commands/run/index.ts
  • packages/cli/src/commands/run/pipeline.ts
  • packages/cli/src/core/__tests__/cli-logger-config.test.ts
  • packages/cli/src/core/__tests__/cli-logger-redact.test.ts
  • packages/cli/src/core/__tests__/redact-line.test.ts
  • packages/cli/src/core/cli-logger.ts
  • packages/cli/src/core/redact-line.ts
  • packages/cli/src/runtime/__tests__/heartbeat.test.ts
  • packages/cli/src/runtime/__tests__/poller.test.ts
  • packages/cli/src/runtime/__tests__/redact.test.ts
  • packages/cli/src/runtime/__tests__/runner-logger-tap.test.ts
  • packages/cli/src/runtime/__tests__/runner.test.ts
  • packages/cli/src/runtime/heartbeat.ts
  • packages/cli/src/runtime/poller.ts
  • packages/cli/src/runtime/redact.ts
  • packages/cli/src/runtime/runner.ts
  • packages/cli/src/types/api.gen.d.ts
  • packages/collector/src/__tests__/destination-timeout.test.ts
  • packages/collector/src/destination.ts
  • packages/core/src/types/destination.ts
  • packages/server/destinations/gcp/src/bigquery/__mocks__/@google-cloud/bigquery-storage.ts
  • packages/server/destinations/gcp/src/bigquery/__tests__/bigquery-storage-mock.d.ts
  • packages/server/destinations/gcp/src/bigquery/__tests__/index.test.ts
  • packages/server/destinations/gcp/src/bigquery/__tests__/writer.test.ts
  • packages/server/destinations/gcp/src/bigquery/index.ts
  • packages/server/destinations/gcp/src/bigquery/push.ts
  • packages/server/destinations/gcp/src/bigquery/pushBatch.ts
  • packages/server/destinations/gcp/src/bigquery/writer.ts
  • packages/server/sources/express/src/__tests__/cache-roundtrip.test.ts
  • packages/server/sources/express/src/__tests__/index.test.ts
  • packages/server/sources/express/src/index.ts
  • packages/server/sources/express/src/schemas/settings.ts
  • packages/server/sources/express/src/types.ts
  • packages/web/destinations/fullstory/src/__tests__/stepExamples.test.ts
✅ Files skipped from review due to trivial changes (3)
  • packages/server/destinations/gcp/src/bigquery/tests/bigquery-storage-mock.d.ts
  • packages/server/sources/express/src/types.ts
  • packages/server/destinations/gcp/src/bigquery/pushBatch.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/web/destinations/fullstory/src/tests/stepExamples.test.ts
  • packages/cli/src/runtime/tests/redact.test.ts
  • packages/cli/src/tests/unit/commands/run-pipeline-frozen.test.ts
  • packages/cli/src/types/api.gen.d.ts

Comment thread packages/cli/src/__tests__/integration/runtime/hot-swap.test.ts Outdated
Comment thread packages/cli/src/runtime/__tests__/heartbeat.test.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/core/src/schemas/destination.ts`:
- Around line 173-178: The timeout schema field in the destination.ts file
currently accepts negative values, but the runtime resolver silently defaults
any non-positive value to 10000 ms, hiding configuration errors. Add the
`.nonnegative()` constraint to the timeout field definition (between the
`.optional()` and `.describe()` calls) to ensure schema validation rejects
negative values and fails fast, aligning with the documented runtime behavior of
the resolveDestinationTimeout resolver.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fd2448f5-67ea-4f25-8681-21b40a020216

📥 Commits

Reviewing files that changed from the base of the PR and between ac5592a and 0ba416a.

📒 Files selected for processing (3)
  • packages/cli/src/__tests__/integration/runtime/hot-swap.test.ts
  • packages/cli/src/runtime/__tests__/heartbeat.test.ts
  • packages/core/src/schemas/destination.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/cli/src/tests/integration/runtime/hot-swap.test.ts
  • packages/cli/src/runtime/tests/heartbeat.test.ts

Comment on lines +173 to +178
timeout: z
.number()
.optional()
.describe(
'Per-destination delivery timeout in ms (default 10000); a delivery that does not settle in this window is routed to the DLQ like a thrown push.',
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify timeout normalization logic and whether negative-timeout behavior is covered by tests.

rg -n -C3 'function resolveDestinationTimeout|timeout > 0|DEFAULT_DESTINATION_TIMEOUT_MS'
rg -n -C3 'timeout' packages/collector/src/__tests__/destination-timeout.test.ts

Repository: elbwalker/walkerOS

Length of output: 5607


🏁 Script executed:

cat -n packages/core/src/schemas/destination.ts | sed -n '165,185p'

Repository: elbwalker/walkerOS

Length of output: 940


🏁 Script executed:

fd -e json package.json | head -5 | xargs grep -l zod

Repository: elbwalker/walkerOS

Length of output: 92


🏁 Script executed:

rg -n 'timeout.*-\d+|timeout.*<.*0' packages/

Repository: elbwalker/walkerOS

Length of output: 290


🏁 Script executed:

cat packages/core/package.json | grep -A2 -B2 zod

Repository: elbwalker/walkerOS

Length of output: 130


🏁 Script executed:

cat -n packages/web/core/src/__tests__/sendWeb.test.ts | sed -n '180,195p'

Repository: elbwalker/walkerOS

Length of output: 882


🏁 Script executed:

rg -n 'timeout.*-|negative' packages/collector/src/__tests__/destination-timeout.test.ts

Repository: elbwalker/walkerOS

Length of output: 135


🏁 Script executed:

rg -n 'schema.*parse|validate.*timeout|destination.*schema' packages/core/src/schemas/destination.ts -A3 -B3

Repository: elbwalker/walkerOS

Length of output: 44


Add numeric constraint to timeout schema to prevent silent misconfiguration.

The schema accepts negative values, but the runtime resolver (resolveDestinationTimeout) treats any non-positive value as invalid and silently defaults to 10000 ms. This hides configuration errors instead of failing fast. Adding .nonnegative() aligns schema validation with documented runtime behavior.

Suggested fix
     timeout: z
       .number()
+      .nonnegative()
       .optional()
       .describe(
-        'Per-destination delivery timeout in ms (default 10000); a delivery that does not settle in this window is routed to the DLQ like a thrown push.',
+        'Per-destination delivery timeout in ms (default 10000). Use 0 to apply the default; deliveries that do not settle in this window are routed to the DLQ like a thrown push.',
       ),
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/core/src/schemas/destination.ts` around lines 173 - 178, The timeout
schema field in the destination.ts file currently accepts negative values, but
the runtime resolver silently defaults any non-positive value to 10000 ms,
hiding configuration errors. Add the `.nonnegative()` constraint to the timeout
field definition (between the `.optional()` and `.describe()` calls) to ensure
schema validation rejects negative values and fails fast, aligning with the
documented runtime behavior of the resolveDestinationTimeout resolver.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Pre-release published (next)

Packages

Install: npm i @walkeros/core@next

🐳 Docker images published

  • walkeros/flow:4.2.1-next-1781594053720 (:next)
  • walkeros/cli:4.2.1-next-1781594053720 (:next)

Docker: docker pull walkeros/flow:next

@alexanderkirtzel alexanderkirtzel merged commit 5ffd9d1 into main Jun 16, 2026
3 of 5 checks passed
@alexanderkirtzel alexanderkirtzel deleted the 675-simulation-data branch June 16, 2026 12:03
@coderabbitai coderabbitai Bot mentioned this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

simulation data

1 participant