Skip to content

router: add enable_art toggle for ART#2556

Closed
ekroon wants to merge 1 commit intowundergraph:mainfrom
ekroon:feature/enable-art-independently
Closed

router: add enable_art toggle for ART#2556
ekroon wants to merge 1 commit intowundergraph:mainfrom
ekroon:feature/enable-art-independently

Conversation

@ekroon
Copy link
Copy Markdown

@ekroon ekroon commented Feb 25, 2026

What

  • add a new router config option enable_art (ENABLE_ART) to enable ART and query plan headers independently from dev_mode
  • propagate this option through router initialization (WithEnableArt) into the GraphQL pre-handler
  • allow ART request options when enable_art is true, even without a control plane JWT token
  • include enable_art in router usage tracking
  • update config schema and config golden fixtures

Why

Operators need a way to enable ART behavior without turning on full development mode.

Testing

  • go test ./pkg/config/... -update
  • go test ./...

Summary by CodeRabbit

  • New Features
    • Added a new enable_art configuration option to enable Advanced Request Tracing (ART) and query plan visibility independently, without requiring development mode or Cosmo Cloud authentication tokens.
    • Provides more granular control over Advanced Request Tracing features through router configuration.

@ekroon ekroon marked this pull request as draft February 25, 2026 13:35
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 25, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f271ff2 and 1c78223.

📒 Files selected for processing (9)
  • router/core/graph_server.go
  • router/core/graphql_prehandler.go
  • router/core/router.go
  • router/core/router_config.go
  • router/core/supervisor_instance.go
  • router/pkg/config/config.go
  • router/pkg/config/config.schema.json
  • router/pkg/config/testdata/config_defaults.json
  • router/pkg/config/testdata/config_full.json

Walkthrough

This PR adds an EnableArt configuration flag throughout the router codebase, enabling Advanced Request Tracing (ART) and query plan headers without requiring development mode or authentication. The flag is propagated from configuration through router initialization, prehandler, and graph mux construction layers.

Changes

Cohort / File(s) Summary
Configuration Layer
router/pkg/config/config.go, router/pkg/config/config.schema.json, router/pkg/config/testdata/config_defaults.json, router/pkg/config/testdata/config_full.json
Added new public field EnableArt (boolean) with default value false to config struct, schema definition, and test fixtures. Enables ART configuration independently of development mode.
Router Option & Initialization
router/core/router.go, router/core/router_config.go, router/core/supervisor_instance.go
Added WithEnableArt() option constructor and internal enableArt field to router, propagated through supervisor's option chain, and added usage tracking.
Request Processing
router/core/graphql_prehandler.go, router/core/graph_server.go
Added EnableArt field to PreHandlerOptions and BuildGraphMuxOptions; modified request option parsing to allow ART when either development mode or enableArt is enabled, bypassing authentication requirement.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@ekroon ekroon closed this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant