Repository navigation
add experiments, turned on per organization - #110
Merged
Merged
Conversation
hkonsti
force-pushed
the
hkonsti/org-experiments
branch
from
October 16, 2026 00:52
db89bff to
9b707ec
Compare
An organization's `experiments` hold the ids of the experiments on for it and `insider` turns all of them on, both set from the internal admin. The session and both ways an agent signs in read them in the same query, so `request.user`, `SignedInAgent` and `/api/me` carry the experiments on, asked with `hasExperiment` in the api and `useExperiment` in the web app. `EXPERIMENTS` in @proxy/utils names each; none yet.
hkonsti
force-pushed
the
hkonsti/org-experiments
branch
from
October 16, 2026 01:04
9b707ec to
e153e8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Experiments: features turned on for some organizations before everyone gets them.
v019_add_organization_experiments):Organization.experiments String[]holds the ids of the experiments that are on, andOrganization.insider Booleanturns all of them on. Both are set from the internal admin (follow-up PR inpersonalagentproxy/internal). Nothing in the app sets them.@proxy/utils,src/experiments.ts):EXPERIMENTSmaps each id to what the admin calls it, and is empty for now.Experimentis its keys. When an experiment ships or is dropped, deleting it there makes the compiler point at every place that asked for it. Its id left in the database is ignored (organizationExperimentsdrops it).auth.ts) and both ways an agent signs in, cookie and MCP token (signed-in-agent.ts, shared byagent.tsandoauth.ts), select the organization's flags in the query they already run.Using it
There are no consumers yet. This is the API:
/api/meanswersexperiments. Hiding something in the web app is only for looks; the API has to check too. The agent web pages'/api/agent/medoesn't include experiments yet; add it there when an agent page needs one.Tested
organizationExperimentsdrops unknown ids and gives an insider every experiment;toSignedInAgentcarries them and refuses a revoked agent.EXPERIMENTSreads as[]from the session and the agent cookie.bun run typecheck,bun run test,bun run lint.Open workspace in Conductor