refactor: Configuration-gate experiments #2517

Merged
nex merged 7 commits from nex/refactor/new-unstable-policy into main 2026-11-14 13:03:16 +00:00
Owner

This pull request introduces a new unstable features policy (per #1884) and adjusts the existing codebase to adhere to the policy.

This PR also does the following:

  • Declares support for spec v1.19 (#880 suggests we support the changes required to advertise support)
  • Removes the unstable feature advertisement for MSC2666 (included in v1.19)
  • Removes the sticky event toggle, as the proposal has now been merged and consequently the feature is not eligible to be an experiment

Closes #1884

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
This pull request introduces a new unstable features policy (per #1884) and adjusts the existing codebase to adhere to the policy. This PR also does the following: - Declares support for spec v1.19 (#880 suggests we support the changes required to advertise support) - Removes the unstable feature advertisement for MSC2666 (included in v1.19) - Removes the sticky event toggle, as the proposal has now been merged and consequently the feature is not eligible to be an experiment Closes #1884 <!-- Example: This pull request allows us to warp through time and space ten times faster than before by double-inverting the warp drive with hyperheated jump fluid, both making the drive faster and more efficient. This resolves the common issue where we have to wait more than 10 milliseconds to engage, use, and disengage the warp drive when travelling between galaxies. --> <!-- Closes: #... --> <!-- Fixes: #... --> <!-- Uncomment the above line(s) if your pull request fixes an issue or closes another pull request by superseding it. Replace `#...` with the issue/pr number, such as `#123`. --> **Pull request checklist:** <!-- You need to complete these before your PR can be considered. If you aren't sure about some, feel free to ask for clarification in #dev:continuwuity.org. --> - [x] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [x] My contribution follows the [code style][c2], if applicable. - [x] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [ ] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [x] My commit messages follow the [commit message format][c1cm] and are descriptive. <!-- Notes on these requirements: - While not required, we encourage you to sign your commits with GPG or SSH to attest the authenticity of your changes. - While we allow LLM-assisted contributions, we do not appreciate contributions that are low quality, which is typical of machine-generated contributions that have not had a lot of love and care from a human. Please do not open a PR if all you have done is asked ChatGPT to tidy up the codebase with a +-100,000 diff. - In the case of code style violations, reviewers may leave review comments/change requests indicating what the ideal change would look like. For example, a reviewer may suggest you lower a log level, or use `match` instead of `if/else` etc. - In the case of code style violations, pre-commit check failures, minor things like typos/spelling errors, and in some cases commit format violations, reviewers may modify your branch directly, typically by making changes and adding a commit. Particularly in the latter case, a reviewer may rebase your commits to squash "spammy" ones (like "fix", "fix", "actually fix"), and reword commit messages that don't satisfy the format. - Pull requests MUST pass the `Checks` CI workflows to be capable of being merged. This can only be bypassed in exceptional circumstances. If your CI flakes, let us know in matrix:r/dev:continuwuity.org. - Pull requests have to be based on the latest `main` commit before being merged. If the main branch changes while you're making your changes, you should make sure you rebase on main before opening a PR. Your branch will be rebased on main before it is merged if it has fallen behind. - We typically only do fast-forward merges, so your entire commit log will be included. Once in main, it's difficult to get out cleanly, so put on your best dress, smile for the cameras! --> [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages
nex added this to the 26.11.0 milestone 2026-11-13 18:14:55 +00:00
refactor: Configuration-gate experiments
Some checks failed
Auto Labeler / Apply labels based on changed files (pull_request_target) Successful in 4s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 7s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m31s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m32s
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
7ee73d27ec
chore: Update reference config file
Some checks failed
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 8s
Checks / Prek / Check changed files (pull_request) Successful in 10s
Documentation / Build and Deploy Documentation (pull_request) Has been cancelled
Checks / Prek / Pre-commit & Formatting (pull_request) Has been cancelled
Checks / Prek / Clippy and Cargo Tests (pull_request) Has been cancelled
b091030e91
chore: Fix display for experiments
Some checks failed
Checks / Changelog / Check changelog is added (pull_request_target) Failing after 8s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m4s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m33s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 11m44s
14da0c291a
Jade approved these changes 2026-11-13 18:35:23 +00:00
@ -0,0 +14,4 @@
typically only accept implementations of proposals that seem like they are a net positive for a
large portion of the Matrix ecosystem, rather than aiming to "implement everything". As such, the
unstable feature list should typically be small and manageable.
Owner

This needs effectively a copy paste of the bullet points in #1884, plus probably a bit stating that any MSCs that are enabled by default have documented why they meet the criteria or why they are an exception.

This needs effectively a copy paste of the bullet points in #1884, plus probably a bit stating that any MSCs that are enabled by default have documented why they meet the criteria or why they are an exception.
Author
Owner

Extrapolated into ed5c51334c; resolve this thread if you think it's satisfactory, let me know if not.

Extrapolated into ed5c51334cee7cd4ba7dd7015f0638262c8581ca; resolve this thread if you think it's satisfactory, let me know if not.
Jade marked this conversation as resolved
@ -0,0 +2,4 @@
/// Configuration for experimental features.
#[derive(Debug, Deserialize, Default, Clone)]
pub struct Experiments {
Owner

This is missing the bits and bobs to add it to the configuration, check the other nested structs to see how that works

This is missing the bits and bobs to add it to the configuration, check the other nested structs to see how that works
Author
Owner

I deliberately omitted it so that people don't just enable experiments without understanding the consequences. I was thinking that if an unstable feature is widely favoured, that'll be reflected in people recommending it in support and such, rather than it being promoted in documentation. This also means the section can't become stale across updates, since the config file will gradually end up containing ghost references to fields that got removed.
Synapse takes a similar approach I believe for similar reasons. If you disagree I'm happy to change it, I just don't feel like it's a good idea for the social and technical reasons.

I deliberately omitted it so that people don't just enable experiments without understanding the consequences. I was thinking that if an unstable feature is widely favoured, that'll be reflected in people recommending it in support and such, rather than it being promoted in documentation. This also means the section can't become stale across updates, since the config file will gradually end up containing ghost references to fields that got removed. Synapse takes a similar approach I believe for similar reasons. If you disagree I'm happy to change it, I just don't feel like it's a good idea for the social and technical reasons.
Member

I think it'd be really annoying for it not to be in the config reference. Not elsewhere in docs is fine, but should definitely be in the reference IMO.

I think it'd be really annoying for it not to be in the config reference. Not elsewhere in docs is fine, but should definitely be in the reference IMO.
Author
Owner

The issue there is the config reference is copied into each continuwuity install via packages, which means there will be config drift:

This also means the section can't become stale across updates, since the config file will gradually end up containing ghost references to fields that got removed.

The issue there is the config reference is copied into each continuwuity install via packages, which means there will be config drift: > This also means the section can't become stale across updates, since the config file will gradually end up containing ghost references to fields that got removed.
Member

Hm, but this kind of ends up happening anyways in general, as the config is updated, and at least this way the configuration reference on the website will be canonical and have all the options.

Hm, but this kind of ends up happening anyways in general, as the config is updated, and at least this way the configuration reference on the website will be canonical and have all the options.
Author
Owner

The config isn't frequently updated, the experiments struct is expected to be significantly hotter than the rest of the config file (relatively speaking). I'm sure documenting the experiments somewhere in the docs would be fine, but I'm really against embedding it into the reference config that gets pushed into packages

The config isn't *frequently* updated, the experiments struct is expected to be significantly hotter than the rest of the config file (relatively speaking). I'm sure documenting the experiments somewhere in the docs would be fine, but I'm really against embedding it into the reference config that gets pushed into packages
Owner

Having a more striped-down configuration in packages is a different issue/enhancement. Ideally we still have a complete config reference generated automatically and available.

Having a more striped-down configuration in packages is a different issue/enhancement. Ideally we still have a complete config reference generated automatically and available.
Author
Owner

mmm I feel like that's a "we'll fix it later" that will inevitably never happen, but I'll trust on that for now and embed it

mmm I feel like that's a "we'll fix it later" that will inevitably never happen, but I'll trust on that for now and embed it
Author
Owner

Can't get the config generator to play ball... I'll push what I've got now and pick it up later, maybe someone else can crack it in the meantime

Can't get the config generator to play ball... I'll push what I've got now and pick it up later, maybe someone else can crack it in the meantime
Author
Owner

@Henry-Hiles figured the issue out and fixed it up, the config ref should now contain all experiments :D

@Henry-Hiles figured the issue out and fixed it up, the config ref should now contain all experiments :D
nex marked this conversation as resolved
feat: Theoretically add experiments to the config reference
All checks were successful
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 7s
Checks / Prek / Check changed files (pull_request) Successful in 9s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m12s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m32s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m6s
009b6b0ebc
For some reason it doesn't *actually* embed. I'm not too sure how the config generator works, so maybe im just missing something.
fix(config): Include experiments in the generated example config
All checks were successful
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 10s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m17s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m44s
Checks / Prek / Check changed files (pull_request) Successful in 15s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 9m47s
17b7c5edf8
docs: Explain everything that was mentioned in 1884
All checks were successful
Checks / Changelog / Check changelog is added (pull_request_target) Successful in 7s
Checks / Prek / Check changed files (pull_request) Successful in 6s
Checks / Prek / Pre-commit & Formatting (pull_request) Successful in 1m34s
Documentation / Build and Deploy Documentation (pull_request) Successful in 1m35s
Checks / Prek / Clippy and Cargo Tests (pull_request) Successful in 8m56s
ed5c51334c
nex merged commit 20943c6210 into main 2026-11-14 13:03:16 +00:00
nex deleted branch nex/refactor/new-unstable-policy 2026-11-14 13:03:17 +00:00
Sign in to join this conversation.
No milestone
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
continuwuation/continuwuity!2517
No description provided.