Skip to content

ref(project-state): Introduce a dedicated state for 'new allowed'#5998

Open
Dav1dde wants to merge 4 commits into
masterfrom
dav1d/new-allowed
Open

ref(project-state): Introduce a dedicated state for 'new allowed'#5998
Dav1dde wants to merge 4 commits into
masterfrom
dav1d/new-allowed

Conversation

@Dav1dde
Copy link
Copy Markdown
Member

@Dav1dde Dav1dde commented May 13, 2026

Introduces a dedicated state in the ProjectState for Proxy Relays which do not fetch project configs from upstream.

This makes a few implicit decisions explicit and more obvious. This PR is largely without side-effects. The biggest "hidden" change is that enabled() now returns None for the new state, but all usages of enabled() use it to check feature flags, which will always fail even with the previous dummy state.

Also taking suggestions for a better name than DummyAllowed.

@Dav1dde Dav1dde requested a review from a team as a code owner May 13, 2026 14:25
@Dav1dde Dav1dde self-assigned this May 13, 2026
Copy link
Copy Markdown
Contributor

@loewenheim loewenheim left a comment

Choose a reason for hiding this comment

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

LGTM. Am I understanding correctly that it would be nicer to send no project config, rather than one with all fields empty/defaulted, but this is left as future work?

//
// To support this, the proxy Relay would have to act as a pure proxy and not fetch
// the project configuration from its own cache.
continue;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it make sense to log a warning here?

Copy link
Copy Markdown
Member Author

@Dav1dde Dav1dde May 22, 2026

Choose a reason for hiding this comment

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

I decided against it, because it would log warnings on the "correctly" setup proxy Relay, instead of the incorrectly setup managed Relay.

Meaning someone could generate these warnings from the outside maliciously and they wouldn't be actionable for the user running the proxy Relay.

But maybe I am also overthinking it.

Comment thread relay-server/src/services/buffer/mod.rs
Comment thread relay-server/src/services/buffer/mod.rs Outdated
Comment thread relay-server/src/services/buffer/mod.rs
Comment thread relay-server/src/services/projects/project/mod.rs Outdated
Comment thread relay-server/src/services/buffer/mod.rs
Comment thread relay-server/src/services/projects/project/mod.rs Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b84c747. Configure here.

Comment thread relay-server/src/services/buffer/mod.rs
Comment thread relay-server/src/services/projects/project/mod.rs
@Dav1dde Dav1dde force-pushed the dav1d/new-allowed branch from b84c747 to a488368 Compare May 26, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants