Skip to content

ci(webapp): wire the run-ops legacy guard into CI and add oxlint residency fences#4279

Merged
d-cs merged 5 commits into
mainfrom
feat/runops-legacy-guard-ci
Jul 17, 2026
Merged

ci(webapp): wire the run-ops legacy guard into CI and add oxlint residency fences#4279
d-cs merged 5 commits into
mainfrom
feat/runops-legacy-guard-ci

Conversation

@d-cs

@d-cs d-cs commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

What

  • Runs apps/webapp/scripts/runOpsLegacyGuard.ts --check as its own PR job (runops-guard), so code that reaches a run-graph table through the control-plane Prisma client instead of the RunStore fails the build.
  • Adds a trigger-runops oxlint plugin with two fast, in-editor rules scoped to apps/webapp/app: one for direct prisma.taskRun-style access, one for a control-plane client wired into a read-through slot. These are the cheap fence; the guard is the type-aware gate.
  • Fixes CancelTaskRunService.callV1: historical V1 runs are legacy-resident, so its two finalize writes now go through runOpsLegacyPrisma instead of the control-plane client (they'd miss the row once legacy is a separate database).
  • Regenerates the guard baseline, which had drifted stale (it referenced files deleted in an earlier PR).

Why

The guard existed but ran nowhere, so its baseline rotted and a real residency gap (the V1 cancel writes) sat undetected. Wiring it into CI turns it into a ratchet against new control-plane run-graph access.

Verification

Local, against a clean regen: oxfmt --check, oxlint ., guard --check, and typecheck --filter webapp all pass. Remaining baseline entries are 4 batch-results router reads through type-opaque as PrismaReplicaClient casts (correct at runtime, accepted) + 2 sanctioned legacy annotations.

d-cs added 2 commits July 17, 2026 13:23
…-ops handle

CancelTaskRunService.callV1 finalizes historical (engine V1) runs, which are
legacy-resident. It wrote them through the control-plane client, which misses
the row once legacy run-ops data lives on its own database. Route those two
writes through runOpsLegacyPrisma, matching every other legacy run-graph write.
Run apps/webapp/scripts/runOpsLegacyGuard.ts --check as its own PR job so new
code that reaches a run-graph table through the control-plane client (instead
of the RunStore) fails the build. Add fast in-editor oxlint rules (trigger-runops
plugin) covering the direct-call and read-through-slot cases, scoped to
apps/webapp/app. Regenerate the guard baseline, which had drifted stale.
@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1cbbb83

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@d-cs d-cs self-assigned this Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9d828389-a3d2-4df4-9d0f-28581c80ee24

📥 Commits

Reviewing files that changed from the base of the PR and between f98b350 and 3835389.

📒 Files selected for processing (2)
  • apps/webapp/app/v3/runOpsMigration/track1-baseline.json
  • apps/webapp/app/v3/services/cancelTaskRun.server.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/webapp/app/v3/services/cancelTaskRun.server.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (23)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 12)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 12)
  • GitHub Check: sdk-compat / Node.js 26.4 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Node.js 20.20 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Node.js 24.18 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Node.js 22.23 (warp-ubuntu-latest-x64-4x)
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - pnpm)
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
  • GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
  • GitHub Check: code-quality / code-quality
  • GitHub Check: Zizmor
  • GitHub Check: audit
  • GitHub Check: audit
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
🔇 Additional comments (1)
apps/webapp/app/v3/runOpsMigration/track1-baseline.json (1)

78-78: LGTM!

Also applies to: 118-118


Walkthrough

The changes add and configure the trigger-runops oxlint plugin, route historical V1 cancellation updates through runOpsLegacyPrismaClient, and update the Track-1 baseline. The legacy guard gains deterministic Prisma type resolution, classification anchors, and generated-client preflight checks. A reusable GitHub Actions workflow runs the guard and includes its result in pull request check aggregation.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description has useful content, but it misses required template sections like Closes #, checklist, testing, changelog, and screenshots. Add the missing template sections: Closes #, checklist items, Testing steps, Changelog, and Screenshots (or mark them N/A if not needed).
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes wiring the run-ops legacy guard into CI and adding oxlint residency fences.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 feat/runops-legacy-guard-ci

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.

@d-cs
d-cs marked this pull request as ready for review July 17, 2026 12:25

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

…nt of build state

The guard resolved the Prisma client packages through their built dist/, which
the CI job does not build (install + generate only). That left every client type
unresolved in CI, so the guard classified nothing as control-plane and reported
0 violations - blind, and would rubber-stamp a real leak. Pin resolution to the
checked-in sources, match declaration files against absolute generated-client
dirs, and add a preflight + classification anchors that exit non-zero rather
than pass blind.
coderabbitai[bot]

This comment was marked as resolved.

d-cs and others added 2 commits July 17, 2026 15:32
Swap cancelTaskRun's V1 finalize writes from runOpsLegacyPrisma (control-plane
typed, needed a runops-legacy-ok annotation) to the branded runOpsLegacyPrismaClient,
which the guard classifies as run-ops. Same legacy writer at runtime; drops the two
annotations and their baseline entries. Matches the existing legacyWriter usage.
@d-cs
d-cs merged commit 2856662 into main Jul 17, 2026
47 checks passed
@d-cs
d-cs deleted the feat/runops-legacy-guard-ci branch July 17, 2026 15:27
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.

2 participants