Skip to content

feat(webapp): dashboard parity for mollifier-buffered runs#3757

Draft
d-cs wants to merge 6 commits into
mollifier-phase-3-mutationsfrom
mollifier-phase-3-dashboard
Draft

feat(webapp): dashboard parity for mollifier-buffered runs#3757
d-cs wants to merge 6 commits into
mollifier-phase-3-mutationsfrom
mollifier-phase-3-dashboard

Conversation

@d-cs
Copy link
Copy Markdown
Collaborator

@d-cs d-cs commented May 26, 2026

Summary

Dashboard surfaces handle buffered runs by falling back to the mollifier snapshot:

  • Run detail, span detail, streams view (_app.../runs.\$runParam, resources.../spans.\$spanParam, resources.../streams.\$streamKey).
  • Redirect routes (@.runs.\$runParam, runs.\$runParam, projects.v3.\$projectRef.runs.\$runParam).
  • Action routes — cancel / replay / idempotency-reset / debug — under resources.taskruns/... and resources.../idempotencyKey.reset.
  • Logs download.
  • Realtime subscription route + per-run resource (realtime.v1.runs.\$runId, resources.../realtime.v1.*).
  • CancelRunDialog gains an onCancelSubmitted callback so submit isn't raced by the Radix DialogClose wrapper.

Stacked on the mutations PR.

Test plan

  • `pnpm run typecheck --filter webapp` passes
  • `pnpm run test --filter webapp test/mollifierRealtimeRunResource.test.ts` passes
  • `pnpm run test --filter webapp test/mollifierRealtimeRunResourceBuffer.test.ts` passes
  • `pnpm run test --filter webapp test/mollifierRealtimeSubscription.test.ts` passes
  • Manual smoke: trigger a buffered run, open it in the dashboard, replay/cancel from the UI

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

🦋 Changeset detected

Latest commit: 28112c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
@trigger.dev/redis-worker Patch
@internal/run-engine Patch
@internal/schedule-engine Patch
@trigger.dev/build Patch
@trigger.dev/core Patch
@trigger.dev/plugins Patch
@trigger.dev/python Patch
@trigger.dev/react-hooks Patch
@trigger.dev/rsc Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/sdk Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch
@trigger.dev/rbac Patch
trigger.dev Patch
references-ai-chat Patch
d3-chat Patch
references-d3-openai-agents Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@internal/redis Patch
@internal/replication Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/zod-worker Patch
references-nextjs-realtime Patch
references-realtime-hooks-test Patch
references-realtime-streams Patch
@internal/sdk-compat-tests Patch
references-telemetry Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 01be01af-b3bb-4393-a81e-cbd0464e9ca9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mollifier-phase-3-dashboard

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread apps/webapp/app/routes/realtime.v1.runs.$runId.ts
Comment thread apps/webapp/app/routes/resources.runs.$runParam.logs.download.ts
Comment thread apps/webapp/app/routes/resources.taskruns.$runParam.debug.ts
@d-cs d-cs self-assigned this May 26, 2026
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from b8ead31 to 109fbd7 Compare May 26, 2026 11:12
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from dd31d60 to ba09531 Compare May 26, 2026 11:12
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 109fbd7 to c7a66bd Compare May 26, 2026 13:24
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from ba09531 to 1de95f4 Compare May 26, 2026 13:24
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 3157546 to 432f81a Compare May 26, 2026 14:28
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from c7a66bd to 094d006 Compare May 26, 2026 14:44
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 432f81a to 8c19830 Compare May 26, 2026 14:44
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 094d006 to 9914976 Compare May 26, 2026 15:00
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 8c19830 to fd7e01d Compare May 26, 2026 15:00
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 9914976 to 2ee45a8 Compare May 26, 2026 15:12
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from fd7e01d to 83880f8 Compare May 26, 2026 15:12
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 83880f8 to 1a8fbc6 Compare May 26, 2026 15:24
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from f4b6064 to 0547ba9 Compare May 26, 2026 16:00
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 1a8fbc6 to 558703b Compare May 26, 2026 16:00
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 0547ba9 to 0708ce5 Compare May 26, 2026 16:20
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 558703b to 372ca71 Compare May 26, 2026 16:20
d-cs added a commit that referenced this pull request May 27, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from d7eb3b6 to 79a0885 Compare May 27, 2026 12:21
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from ba084d8 to eb520ef Compare May 27, 2026 12:58
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 79a0885 to c2898d3 Compare May 27, 2026 12:58
d-cs added a commit that referenced this pull request May 27, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d-cs added a commit that referenced this pull request May 27, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from c2898d3 to 0cdfe2c Compare May 27, 2026 13:47
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 2ea3d92 to 46c08fb Compare May 27, 2026 14:06
d-cs added a commit that referenced this pull request May 27, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 0cdfe2c to bdc87f5 Compare May 27, 2026 14:06
d-cs added a commit that referenced this pull request May 27, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from bdc87f5 to 04fab12 Compare May 27, 2026 15:07
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch 2 times, most recently from 0396ab9 to 65ca573 Compare May 27, 2026 15:27
d-cs added a commit that referenced this pull request May 27, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 04fab12 to 17e5432 Compare May 27, 2026 15:27
d-cs added a commit that referenced this pull request May 27, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 17e5432 to e50c7b9 Compare May 27, 2026 15:42
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 65ca573 to 15f5580 Compare May 27, 2026 15:42
d-cs added a commit that referenced this pull request May 27, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 15f5580 to f6d15b1 Compare May 27, 2026 16:50
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from e50c7b9 to cbc70ed Compare May 27, 2026 16:50
d-cs and others added 5 commits May 27, 2026 17:57
Dashboard run detail, span detail, streams view, realtime
subscription, redirect routes, replay/cancel/idempotency-reset
action routes, the logs download route, and the cancel dialog all
handle buffered runs by falling back to the mollifier snapshot.

Stacked on the mutations PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Three issues:

- spans.\$spanParam/route.tsx loader returned a raw \`Response\` (204
  on spanId-mismatch) alongside typedjson, collapsing the
  discriminated \`{type: "run"|"span"}\` union in the useTypedFetcher
  consumer. Switched to \`throw new Response(null, { status: 204 })\`
  so Remix exits cleanly without polluting the return type.

- resources.taskruns.\$runParam.debug.ts loader's buffered branch
  returned \`engine: "V2"\` with \`runtimeEnvironment: null\`, widening
  the V2 variant in debugRun.tsx and breaking every MarQS / RunQueue
  key call site (run.runtimeEnvironment now nullable). Switched to
  \`engine: "BUFFERED" as const\` so debugRun.tsx narrows the buffered
  case to a dedicated panel — the V1/V2 panels recover their non-null
  runtimeEnvironment assumption.

- Devin r3305402673: bare \`catch {}\` was swallowing the intentional
  \`throw new Response("Not Found", { status: 404 })\` auth-check
  fallthrough. Narrowed the try to only wrap \`buffer.getEntry\` (the
  one call that can transient-fail). Authorization and snapshot
  parsing now live outside the try, so an intentional 404 throw isn't
  masked by the transient-error catch. Keeps \`throw\` rather than
  Devin's suggested \`return\` because the consumer is typedjson-typed
  and a raw-Response return collapses the discriminated union.

Also adds a dedicated DebugRunDataBuffered panel for buffered runs
that renders the snapshot's queue / concurrencyKey / task identifier
(buffered runs aren't on a PG queue, so the existing MarQS/RunQueue
panels would 404 anyway).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Remove plan-tracking shorthand (Q2/Q4/Q5) from dashboard-layer mollifier route comments; reword to plain English. Comment-only; no behaviour change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from f6d15b1 to fcd196d Compare May 27, 2026 16:58
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from cbc70ed to da1a1dd Compare May 27, 2026 16:58
… metadata fallback errors

The tags API skipped MAX_TAGS_PER_RUN enforcement on the buffered path,
letting a buffered run exceed the cap the trigger validator applies at
creation. Enforce it atomically in the mutateSnapshot Lua: append_tags
now accepts an optional maxTags and returns "limit_exceeded" (writing
nothing) when the deduped count would overflow. mutateWithFallback gains
a symmetric rejectedResponse builder + a "rejected" outcome; the tags
route returns 422, matching the PG path.

Also stop silently swallowing PG failures in the metadata route's
parent/root op fan-out: warn (with targetRunId + error) before the
best-effort buffer fallback so a genuine PG outage is observable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant