Skip to content

chore: Replace AGENTS.md rules with lints and tests - #27188

Open
isaacs wants to merge 1 commit into
fix/remix-workerd-entryfrom
feat/agent-rules-checks
Open

isaacs wants to merge 1 commit into
fix/remix-workerd-entryfrom
feat/agent-rules-checks

Conversation

@isaacs

@isaacs isaacs commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Add the sdk/valid-span-origin lint rule. It checks span origins
against the trace origin format: string literals written to an origin
attribute, and string literals assigned to a constant whose name ends in
ORIGIN. Add scripts/agent-rules.test.mjs. It checks that no new
dev-packages test sets traceLifecycle, and that every exports
subpath with a worker entry puts workerd before browser.

Cloudflare bundlers set workerd, worker and browser, and the first
matching key wins. The test leaves the place of worker to each package:
webpack target: 'webworker' builds for browser Web Workers also set
worker and browser, so @sentry/react-router keeps worker last on
purpose (#24866).

Remove the AGENTS.md text these checks now enforce, text that restates
code, and the Coding Standards and Testing lines that showed no effect
in an ablation eval. REVIEW-RULES.md no longer points the review at
the removed Testing section, and now holds the stringifyForCodeInjection
rule itself, so reviews keep checking it.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

@isaacs
isaacs added this pull request to stack #27192 December 5, 2026 01:33
@isaacs isaacs changed the title feat/agent rules checks chore: Replace AGENTS.md rules with lints and tests Dec 5, 2026
@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 2e7910b (PR test merge using base PR #27198 at 2688388)

Against: 2688388 (base PR #27198) · base run #68950

✅ Baseline matches: this diff contains only this PR's changes.

Path Size % Change Change
@sentry/browser 31.22 kB - -
@sentry/browser - with treeshaking flags 29.25 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 29.21 kB - -
@sentry/browser (incl. Tracing) 54.77 kB - -
@sentry/browser (incl. Tracing Core) 41.31 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 54.77 kB - -
@sentry/browser (incl. Tracing, Profiling) 57.61 kB - -
@sentry/browser (incl. Tracing, Replay) 96.18 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 84.28 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 101.17 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 114.3 kB - -
@sentry/browser (incl. Feedback) 49.64 kB - -
@sentry/browser (incl. sendFeedback) 31.83 kB - -
@sentry/browser (incl. FeedbackAsync) 37.57 kB - -
@sentry/browser (incl. Metrics) 32.5 kB - -
@sentry/browser (incl. Logs) 32.79 kB - -
@sentry/browser (incl. Metrics & Logs) 33.53 kB - -
@sentry/react 33.7 kB - -
@sentry/react (incl. Tracing) 57.95 kB - -
@sentry/vue 39.36 kB - -
@sentry/vue (incl. Tracing) 57.75 kB - -
@sentry/svelte 31.24 kB - -
@sentry/effect (client) 42.84 kB - -
@sentry/effect (client, incl. Tracing) 55.6 kB - -
@sentry/effect (client, incl. Tracing, Logs, Metrics) 67.46 kB - -
@sentry/remix (Remix 3 client bundle) 59.82 kB - -
CDN Bundle 33.45 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing) 55.34 kB -0.01% -1 B 🔽
CDN Bundle (incl. Logs, Metrics) 36.3 kB +0.01% +1 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 57.92 kB -0.01% -2 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) 78.44 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay) 94.18 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 96.85 kB -0.01% -2 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 99.36 kB -0.01% -2 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 101.85 kB - -
CDN Bundle - uncompressed 97.58 kB - -
CDN Bundle (incl. Tracing) - uncompressed 163.76 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 106.19 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 171.51 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 239.49 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 287.15 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 294.89 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 299.13 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 306.86 kB - -
@sentry/nextjs (client) 61.01 kB - -
@sentry/sveltekit (client) 55.64 kB - -
@sentry/astro (client) - rolldown, without tracing 31.41 kB - -
@sentry/core/server 46.83 kB - -
@sentry/core/browser 14.6 kB - -
@sentry/node 161.35 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.7 kB - -
@sentry/node - without tracing 99.29 kB -0.01% -1 B 🔽
@sentry/node - without channel injection 151 kB -0.01% -1 B 🔽
@sentry/aws-serverless 110.98 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 213.78 kB - -
@sentry/cloudflare (withSentry) 496.22 kB - -
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 216.7 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 242.07 kB - -

View base workflow run

@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Optional E2E tests

All optional checks were successful. 65 successful. See the run.

Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v1 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hapi-21 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-pi-durable (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E react-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 (MCP SDK OpenTelemetry) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E node-mastra (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-mcp-v2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-express-send-to-sentry (static trace lifecycle) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hapi-21 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-eve (content off) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E deno (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-openai-decisions (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-fastify-6 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E debug-id-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps enabled by Sentry) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (delete all) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (cloudflare) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E node-eve (0.x) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (deno) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (manual upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-4-sourcemaps (Vite server) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-eve (orchestrion) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E react-router-7-framework-instrumentation Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (delete all) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (manual upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E node-flue (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E vinext-cf-workers (workers cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E vue-3 (no Options API) Test (optional) Successful in 1m Details

@isaacs
isaacs force-pushed the feat/agent-rules-checks branch from 5b40c1d to 78685d3 Compare December 5, 2026 02:01
@isaacs
isaacs marked this pull request as ready for review December 5, 2026 21:43
@isaacs

isaacs commented Dec 5, 2026

Copy link
Copy Markdown
Member Author

@isaacs

isaacs commented Dec 5, 2026

Copy link
Copy Markdown
Member Author

@sentry-junior review

sentry-junior[bot]

This comment was marked as resolved.

@isaacs
isaacs removed this pull request from stack #27192 December 5, 2026 22:32
@isaacs
isaacs force-pushed the feat/agent-rules-checks branch from 78685d3 to a5cb2d1 Compare December 5, 2026 22:32
@isaacs
isaacs changed the base branch from develop to fix/remix-workerd-entry December 5, 2026 22:32
@isaacs
isaacs added this pull request to stack #27199 December 5, 2026 22:32
@isaacs

This comment was marked as resolved.

Add the `sdk/valid-span-origin` lint rule. It checks span origins
against the trace origin format: string literals written to an origin
attribute, and string literals assigned to a constant whose name ends in
`ORIGIN`. Add `scripts/agent-rules.test.mjs`. It checks that no new
dev-packages test sets `traceLifecycle`, and that every `exports`
subpath with a worker entry puts `workerd` before `browser`.

Cloudflare bundlers set `workerd`, `worker` and `browser`, and the first
matching key wins. The test leaves the place of `worker` to each package:
webpack `target: 'webworker'` builds for browser Web Workers also set
`worker` and `browser`, so `@sentry/react-router` keeps `worker` last on
purpose (#24866).

Remove the AGENTS.md text these checks now enforce, text that restates
code, and the Coding Standards and Testing lines that showed no effect
in an ablation eval. `REVIEW-RULES.md` no longer points the review at
the removed Testing section, and now holds the `stringifyForCodeInjection`
rule itself, so reviews keep checking it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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