1309 Commits

Author SHA1 Message Date
gnuxie
7ef871d3c7 v2.9.0
Some checks failed
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
v2.9.0
2025-12-18 12:57:34 +00:00
Gnuxie
1221eb2eed Enable the capability set provider migration for ServerBanSync (#1016)
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
2025-12-16 13:00:12 +00:00
Gnuxie
e39642a19d Use the capability name and not the interface name in capability provider set. (#1015)
Some checks failed
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Docker Hub - Develop / docker-latest (push) Has been cancelled
The keys on the capability provider set are arbritrary property names
set by the protection, not the interface names as there can be
multiple capabilities that share the same interface.
2025-12-12 14:14:25 +00:00
Gnuxie
785f4df264 Improve ServerBanSyrnchronisationProtection (#1014)
* Update ServerBanSynchronisationCapabilityRenderer.

https://github.com/the-draupnir-project/planning/issues/87.

* Add migration for old server ban sync capabilities.

https://github.com/the-draupnir-project/planning/issues/87.

* Test migration of serverConsequences capability provider set.

https://github.com/the-draupnir-project/planning/issues/87

* Update MPS for new ServerBanSychrnosation protection.

- Only render results of changes when the ACL capability when the `m.room.server_acl` failed to send.
- Only apply ACL once every 15seconds
- Migrate `serverConsequences` from MPS to server ban synchronisation specific capability provider.
2025-12-12 13:21:17 +00:00
gnuxie
81301f2188 v2.8.0
Some checks failed
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Docker Hub - Develop / docker-latest (push) Has been cancelled
v2.8.0
2025-11-23 12:45:44 +00:00
Gnuxie
5b134493a8 Add preview to watch command. (#1007)
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
https://github.com/the-draupnir-project/planning/issues/2
2025-11-22 21:52:16 +00:00
renovate[bot]
e64c43698d Update dependency js-yaml to v4.1.1 [SECURITY] (#1005)
Some checks failed
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-15 17:50:20 +00:00
Gnuxie
492f6816ed Add value proposition to readme. (#996)
Some checks failed
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
https://docs.oscollective.org/resources/resources/companies-and-trust
2025-11-13 13:29:20 +00:00
Gnuxie
8def00c2ed fix spurious error log line regarding room takedowns when the room ha… (#995)
Some checks failed
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Docker Hub - Develop / docker-latest (push) Has been cancelled
* fix spurious error log line regarding room takedowns when the room has already been taken down.

This is normal, and while generally the bot shouldn't attempt to take down the same rooms which succeeded in the past, there's no way of knowing that the room hasn't
been unblocked by the synapse admin API while draupnir was offline.
Because there's no endpoint to get only the blocked rooms, we have to attempt to block them all again, but what we can do is lower that from critical severity to debug, since it's not actually a fatal error at all.

* prettier

---------

Co-authored-by: esoteric_programmer <nomail@no.email>
2025-11-07 12:28:28 +00:00
Gnuxie
0c448ab85e Announce the first cycle review and second cycle selection. (#984)
Some checks failed
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Docker Hub - Develop / docker-latest (push) Has been cancelled
What the notice looks like:

<img width="760" height="228" alt="image" src="https://github.com/user-attachments/assets/3c1df304-24f4-40cc-9109-4d3398d58fc3" />

Element web was used to send the message

raw markdown:

```
#### 📰 Draupnir Assembly: Call for Participation

The Longhouse Assembly is discussing the next direction of the project.

If you value what the Draupnir project does for your community, then we really want to hear from you:

- ➡️ [Read about the current longhouse cycle](https://the-draupnir-project.github.io/draupnir-documentation/governance/reports/2510A-cycle-review)
- ➡️ [Read about the pathways going forward](https://the-draupnir-project.github.io/draupnir-documentation/governance/reports/2510A-selection)
- ➡️ [Cast your vote](https://cryptpad.fr/form/#/2/form/view/ewtgdO-YIwCjLhfJpwsj87m7RU7v6hJKHbu3BWqa1kg/)
- ➡️ [Join the Assembly Discussion](https://matrix.to/#/!UMROhYUQcvtGuoIIka:matrix.org/%247C2Sv-B-6HJ7fVMlCRd3R9jlZqe2rUxlPliEaB-M4yE?via=matrix.org&via=feline.support&via=asgard.chat)
```
2025-10-28 14:36:37 +00:00
Gnuxie
9ceab2a2fc Merge pull request #988 from the-draupnir-project/gnuxie/tests-being-weird
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Fix test failures on main innit

Closes https://github.com/the-draupnir-project/Draupnir/issues/985.
We're solving this problem structurally by introducing a `Lifetime` primitive for resource management. https://github.com/the-draupnir-project/planning/issues/79.
2025-10-28 13:16:10 +00:00
gnuxie
3945cf8b51 Fix ancient racey code in shutdown command test. 2025-10-28 13:09:49 +00:00
gnuxie
61d5884c44 Update to MPS 5.0.0 for lifetimes. 2025-10-28 12:57:50 +00:00
gnuxie
6272da337b Plumb lifetimes into all protections.
https://github.com/the-draupnir-project/planning/issues/80

Lifetimes make it impossible to forget to link up various
destructor/finalizer methods, and makes it impossible to forget to run
them. It's a good structural solution to the problem we keep having.

We haven't updated protections to use them properly yet, ie allocate
things against the lifetime, but for now the protections themeselves
are allocated against the lifetime.
2025-10-28 12:46:08 +00:00
gnuxie
cb86d6d0cd v2.7.1
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
v2.7.1
2025-10-13 15:24:34 +01:00
Gnuxie
a3f9f1af8d Dependency updates for bug fixes (#981)
* Update to MPS4BotSDK v4.0.2

- Marks v12 policy rooms as editable.
- Ensures paginators for /messages and /relations are returning ResultError.

https://github.com/the-draupnir-project/planning/issues/64.

* Update mps-interface-adaptor.

This should improve logging for
https://github.com/the-draupnir-project/Draupnir/issues/976.  Done
under https://github.com/the-draupnir-project/planning/issues/64.
2025-10-13 14:13:44 +01:00
Gnuxie
b240282651 Re-add the alias add command to Draupnir. (#980)
Fixes https://github.com/the-draupnir-project/Draupnir/issues/970.
2025-10-13 14:09:12 +01:00
gnuxie
61a0210cd1 v2.7.0
Some checks failed
Tests / Unit tests (push) Has been cancelled
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
v2.7.0
2025-10-10 13:07:24 +01:00
Gnuxie
80c3570bce Update to MPS4BotSDK 4.0. (#975)
Fixes a bug with messages pagination.
2025-10-10 12:28:24 +01:00
Gnuxie
b16f238e5c Merge pull request #973 from the-draupnir-project/gnuxie/draupnir-news-cleanup
1. Enable news by default
2. Make sure we copy the news json file into the build output (fixes https://github.com/the-draupnir-project/Draupnir/issues/972)

https://github.com/the-draupnir-project/planning/issues/60
2025-10-10 12:17:03 +01:00
gnuxie
2cd0d24b6b Update to MPS v4.1.0 to fix protections looping on self changes.
https://github.com/the-draupnir-project/Draupnir/issues/963
https://github.com/the-draupnir-project/planning/issues/60
2025-10-10 12:11:07 +01:00
gnuxie
b365ac9244 Make sure that we only store seen news when there is unseen news.
https://github.com/the-draupnir-project/planning/issues/60
2025-10-10 11:47:14 +01:00
gnuxie
da78010afb Enable DraupnirNews by default.
https://github.com/the-draupnir-project/planning/issues/60.
2025-10-10 10:22:06 +01:00
gnuxie
ba4ca1479d Copy json news file to build output x3
https://github.com/the-draupnir-project/Draupnir/issues/972.

Sorry everypony. We didn't want to use JSON Modules because that
sounds weird and this seems like a safer bet for now.
2025-10-10 10:15:31 +01:00
Gnuxie
b73cfd7907 Draupnir news system (#965)
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
* Add infrastructure for testing Draupnir news.

https://github.com/the-draupnir-project/planning/issues/56.

* Update protections for new PermalinkSchema.

https://github.com/the-draupnir-project/planning/issues/57

* Add a way to announce Draupnir longhouse assemblies.

This is kind of stupid though we should have just made a generic news
system that deals with actual events pulled from the static blog
and just sent into the room...

https://github.com/the-draupnir-project/planning/issues/56.

* Update news to just use a blob in the repository.

https://github.com/the-draupnir-project/planning/issues/56.

* Simplify seen news mechanism.

https://github.com/the-draupnir-project/planning/issues/56.

* Cut some dependencies out of DraupnirNews for unit testing.

https://github.com/the-draupnir-project/planning/issues/58

* Rename the longhouse assembly thing to be a generic news reader.

It was already changed to be generic we just forogt the name.
https://github.com/the-draupnir-project/planning/issues/58.

* Improve code quality of DraupnirNews.

No way is this being tested without being a lot neater.  The problem
is that any test was going to be too coupled to implementation due to
the shared responsibilities of the old class.

https://github.com/the-draupnir-project/planning/issues/58.

* Add DraupnirNews unit test.

https://github.com/the-draupnir-project/planning/issues/58.

* Allow filesystem news to show when remote news fails to fetch.

Discovery from https://github.com/the-draupnir-project/planning/issues/58.

* Add a comment about how news gets cleaned up.
2025-10-09 16:49:53 +01:00
dependabot[bot]
fb14cea361 Bump tar-fs from 2.1.3 to 2.1.4 (#950)
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.3 to 2.1.4.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.3...v2.1.4)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 2.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-29 23:01:52 +01:00
Gnuxie
2f6f945876 Prompt to watch policy rooms on replacement (#955)
Part of https://github.com/the-draupnir-project/planning/issues/48

* Wire up prompt listener to prompt meow!

* Show differences in powered users and creators between rooms.

Upgraded policy rooms.

* Scan for replaced policy rooms on protection enable.

* Report errors with replacement process to management room.

* Comment clarity.

* Update MPS and MPS-for-interface-adaptor to support PR.

* Note about why we want to prompt on upgrade.
2025-09-29 20:19:24 +01:00
Gnuxie
3e246ecdb6 Fix rooms command integration test. (#958)
Fixes https://github.com/the-draupnir-project/Draupnir/issues/957.
2025-09-29 20:13:12 +01:00
Gnuxie
8326d7fe0f Add TimelineRedactionQueue. (#949)
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
This just batches the redactions going on within a single room to the
same `/messages` request. And blocks the next request for that room
from happening until the current request has completed.

This is necessary because `/messages` pagination is really heavy on
homeservers as it can force them to backfill.

There is also some really strange bug in Synapse that is triggered by
Draupnir's behaviour
https://github.com/element-hq/synapse/issues/18829.
2025-09-25 15:56:35 +01:00
gnuxie
f1dad52288 v2.6.1
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
v2.6.1
2025-08-14 19:20:06 +01:00
Gnuxie
73c2bc72e4 Conceputalise prividlidged creators and update MPS with changes to permissions calculation. (#937)
https://github.com/the-draupnir-project/planning/issues/44
* Use `RoomVersionMirror` to determine prividlidged creators.

On policy room creation.

* Update MPS for prividlidged creators conception.

Fixes https://github.com/the-draupnir-project/Draupnir/issues/935.
Fixes https://github.com/the-draupnir-project/Draupnir/issues/934.
2025-08-14 18:07:28 +01:00
Gnuxie
53947214c2 Fix policy room creation in V12 rooms. (#936)
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
It turns out that we got confused and thought we'd fixed policy room creation when we fixed management room creation.
Even though the PR description never claimed that. In any case it looks like we were not in a very present state of mind while making the change and managed to somehow rely on string comparison for room versions...

Follow up from: https://github.com/the-draupnir-project/Draupnir/pull/924

* Fix subtle bug with management room creation.

I don't really understand why I did this in the first place it was
stupid.  I think morbid curiosity won.

* Update MPS4bot-sdk for V12 policy room creation.

It turns out last time we fixed management room creation but not
policy room creation... and we didn't even do that properly.
2025-08-14 14:03:35 +01:00
Gnuxie
b05e24e78d Add seperate room for policy change notification protection. (#933)
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
This reverts commit 3d138d96df but we
also modified it to make it stil work.
2025-08-13 11:26:59 +01:00
gnuxie
d77f494a65 v2.6.0
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
v2.6.0
2025-08-12 19:37:21 +01:00
Gnuxie
ead830cb79 Update interface-manager for V12 Room ID support in command parsing. (#932)
Fixes https://github.com/the-draupnir-project/Draupnir/issues/928.
2025-08-12 18:19:59 +01:00
Gnuxie
837a0d4fa7 Protect replacement rooms on tombstone. (#925)
Some checks failed
Docker Hub - Develop / docker-latest (push) Has been cancelled
Tests / Build & Lint (push) Has been cancelled
Tests / Unit tests (push) Has been cancelled
Tests / Integration tests (push) Has been cancelled
Tests / Application Service Integration tests (push) Has been cancelled
Part of https://github.com/the-draupnir-project/planning/issues/46.
2025-08-12 15:42:40 +01:00
Gnuxie
44a6684e28 Fix flakey BlockInvitationsOnServer test case. (#931)
Wait for the new takedown policy to come down `/sync` before testing
the protection can block the takendown user.

There doesn't seem to be a way conceptually to avoid this. I would not
be comfortable with injecting a fake event into the model and we'd
probably have a nightmare creating that concept.

See https://github.com/the-draupnir-project/Draupnir/pull/930#issuecomment-3179386744.
2025-08-12 15:36:02 +01:00
Gnuxie
613059d789 Make room discovery a synchronous part of the takedown command. (#930)
Discovery was happening asynchronously in the takedown command as a
background task that was triggered by the command.  When a room is
used in the takedown command, we do inform Draupnir's room discovery,
but it happens as a background task.  Maybe it should not be a
background task though, not to fail the command when the informing
fails, but to make sure the command is blocked on all side effects
happening and then we don't have to write timeouts in tests,
which are probably still flakey.
2025-08-12 14:31:57 +01:00
Gnuxie
69f21a11e7 fix Room Discovery protection cleanup (#929)
We have identified that the `RoomDiscovery` component of the `RoomTakedownProtection` and `BlockServersOnInviteProtection` doesn't cleanup properly once disabled. Because a deferred background task used to batch discovered rooms together wasn't being cancelled. We believe this is the cause for the issues described in #927 . Although it remains unclear why this violates the integrity of the hash store in subsequent test runs...

* Update to MPS 3.10.0 for cancellable batches.

* Cancel room discovery batch when protections are disabled.

Possible fix for https://github.com/the-draupnir-project/Draupnir/issues/927.
2025-08-12 14:02:49 +01:00
Gnuxie
46e1054834 Merge pull request #926 from the-draupnir-project/gnuxie/weirdo-tests
Improvements to integration tests
2025-08-11 13:48:32 +01:00
gnuxie
5afd97c2f6 "Fix" a race condition with store disposal in fixtures.
https://github.com/the-draupnir-project/Draupnir/issues/927.
2025-08-11 13:42:30 +01:00
gnuxie
fe3cb2e94f Stop dumping the config after every test.
There was a bug where the process.exit handle was being registered
multiple times.
2025-08-07 18:01:59 +01:00
gnuxie
ede92ca6ee Make sure patchMatrixClient is called in all entrypoints.
It wasn't called in integration tests.
Possibly fixes:
https://github.com/the-draupnir-project/Draupnir/issues/760
https://github.com/the-draupnir-project/Draupnir/issues/759
2025-08-07 18:01:00 +01:00
gnuxie
283a50d5e3 v2.5.1 v2.5.1 2025-08-06 17:26:38 +01:00
Gnuxie
dccb0e39b9 Fix appservice management room creation for room V12 (#924)
* Update MPS for client capability negotiation.

* Update appservice room creation for V12.
2025-08-06 17:17:05 +01:00
Gnuxie
1f8da29799 Attempt to allow Draupnir to use room V12. (#918)
- Updated to matrix-basic-types 1.4.0 which changes
  the regex validating room ids.

- Changed the package override so that all dependencies
  use matrix-basic-types 1.4.0, including the matrix-protection-suite.

- Removed code that tries to store details about discovered rooms in
  the room takdedown protection. These were unreliable for so many
  reasons and also are now broken given the room origin cannot be
  extracted from the room id. Details for why this is can be found in
  the reviews of
  matrix-org/matrix-spec-proposals#4291.
2025-07-16 20:35:22 +01:00
Gnuxie
4e13f0d8e2 Improve message users see failing to join acceptInvitesFromSpace. (#917) 2025-07-14 12:13:11 +01:00
gnuxie
0618eee59b v2.5.0 v2.5.0 2025-07-08 12:52:27 +01:00
Gnuxie
5565ef3bc7 Use json reviver in express.json() middleware. (#913) 2025-06-24 13:49:04 +01:00
Gnuxie
5b445d273e Merge pull request #910 from the-draupnir-project/gnuxie/media-extraction
Use new `EventMixin` extraction API from MPS in protections.

This allows protections to retrieve extensible events style mixins from any event.

We also add a protection to automatically redact any event with an erroneous mixin that is likely to cause issues for other clients.

MPS Describes all `m.room.message` `msgtype`s as mixins too.
2025-06-24 11:52:29 +01:00