Commit Graph
625 Commits
Author SHA1 Message Date
straiforosandTangled fcd2030275 feat(custom-templates): Add notification templates capability for customizes notifications with examples
- use tranquil_pds not comms since the validate email and templates are reexported from pds package
- implement handlebars syntax
- update templates to be transport agnostic, email, discord, telegram with handlebar examples with conditions
- refactor template and notice logic from PR #269, and #299 to be self contained enforcing all substitutions to be defined within the enum properties
- fix open TODOs, store.rs uses get_string within the ids.rs get_built_ins method
- UTC logging for User facing notices restored
- new api error for verification channel requires bot
- fix tests to use metadata for html body...
- remove unwrap and handle template rendering error explicitly
- update verify_link to use handlebars trusted url syntax {{{verify_link}}}
- fix verification enqueueing to include channel in template rendering
- use locale enum for validation and display instead of string array separately maintained
- support text only templates for signal and discord
- fix missing verify_link and verify_page in migration and signup verification templates with unit tests
- consolidated body and subject notice methods into a single rendered function
2026-10-14 10:24:25 +00:00
Johanna LarssonandTangled c0a74b276e chore: bump dependencies 2026-10-07 07:41:22 +00:00
teqandTangled 2b1f9d4e37 fix: email 2fa consent 2026-10-06 07:40:12 +00:00
teqandTangled d6cd5d9950 test: email 2fa consent 2026-10-06 07:40:12 +00:00
teqandTangled 39da886d5a fix: registration binding 2026-10-06 07:40:12 +00:00
teqandTangled f8f66a897e test: registration binding 2026-10-06 07:40:12 +00:00
teqandTangled 8c05836794 fix: delegation consent grant 2026-10-06 07:40:12 +00:00
teqandTangled abacd5e6c7 test: delegation consent grant 2026-10-06 07:40:12 +00:00
teqandTangled 34d4277ebd fix: oauth request auth 2026-10-06 07:40:12 +00:00
teqandTangled f52b8b799e test: oauth request auth 2026-10-06 07:40:12 +00:00
teqandTangled c19a41f876 fix: route oauth requests by id 2026-10-06 07:40:12 +00:00
teqandTangled b42352677f fix: store revoked delegation 2026-10-06 07:40:12 +00:00
teqandTangled a9d79f5ff8 test: store revoked delegation 2026-10-06 07:40:12 +00:00
teqandTangled d1f3c6f540 fix: passkey counter id 2026-10-06 07:40:12 +00:00
teqandTangled c996bea1fb test: passkey counter id 2026-10-06 07:40:12 +00:00
nekomimi.petandTangled 2d84be92c8 frontend: log in to the new PDS by DID, not email, during migration 2026-10-06 06:15:33 +00:00
Johanna LarssonandTangled e3b987b4e5 ci: tag main on every image push
Instead of moving :latest, this adds :main for the intrepid adventurers who wish to live dangerously.

And then we can have :latest track the latest proper release instead.
2026-10-02 11:06:50 +00:00
Lewis 072e993c9d docker-compose: did-method-plc apparently needs forcing to main branch
Lewis: May this revision serve well! <did:plc:3fwecdnvtcscjnrx2p4n7alz>
2026-10-02 13:35:24 +03:00
juneandTangled 2817d9f2fd docs: add ebil pds to the instance list :3
meow meow
2026-10-02 10:10:40 +00:00
LewisandTangled 9538a1dd48 docs: impromptu LLM-talk and other small touches
Lewis: May this revision serve well! <did:plc:3fwecdnvtcscjnrx2p4n7alz>
2026-10-02 09:07:25 +00:00
LewisandTangled 1383002155 types: locale newtype, single comms type, channel identifiers
Lewis: May this revision serve well! <did:plc:3fwecdnvtcscjnrx2p4n7alz>
2026-10-01 08:29:01 +00:00
LewisandTangled d44c114add password: take/verify scrypt passwords too from mysterious sources
Lewis: May this revision serve well! <did:plc:3fwecdnvtcscjnrx2p4n7alz>
2026-10-01 07:30:29 +00:00
Johanna LarssonandTangled 78f751d924 replace 2026-09-30 07:00:58 +00:00
Johanna LarssonandTangled 66ea8287a0 refactor: drop aws crates for s3
We were just using them for S3 support. This PR switches us over to the s3 crate which works the same way, with some minor differences.

The main implication of this change is that we're no longer doing all the AWS stuff, like checking aws profile in home directory, or automatic discovery of metadata.

This change is covered by our brand new s3 test suite, but I also did the old school `just test-full` with minio.
2026-09-27 09:00:44 +00:00
Johanna LarssonandTangled 3054f04354 ci: restore image publishing 2026-09-27 07:32:18 +00:00
Johanna LarssonandTangled 78c8e08341 fix: abort multipart upload on errors
adds a test that proves it works too!
2026-09-26 19:07:04 +00:00
Johanna LarssonandTangled c56801bcf5 fix: ensure s3 blob uploads are streaming
The existing code buffered the whole thing into vec which defeated the purpose of `put_stream`.
2026-09-26 19:07:04 +00:00
Johanna LarssonandTangled 1475bdfe30 test(storage): use s3s to test S3BlobStorage
Introduces s3s and s3s-fs to run an in-memory s3 server in tests. With this we can promote s3 tests to run in `just test`, they won't need containers, and they're super fast. Adds `just test-s3` to run them more easily.

```
 Nextest run ID db9a9530-738e-4c92-ad3a-23289252cac2 with nextest profile: default                                                                                                              Starting 6 tests across 1 binary                                                                                                                                                                PASS [   0.356s] tranquil-storage::s3 put_stream_error_aborts_upload                                                                                                                        PASS [   0.356s] tranquil-storage::s3 put_stream_empty_aborts_upload                                                                                                                        PASS [   0.358s] tranquil-storage::s3 copy                                                                                                                                                  PASS [   0.360s] tranquil-storage::s3 put_get_head_delete                                                                                                                                   PASS [   0.360s] tranquil-storage::s3 put_stream                                                                                                                                            PASS [   0.447s] tranquil-storage::s3 put_stream_multipart                                                                                                                          ────────────                                                                                                                                                                                     Summary [   0.448s] 6 tests run: 6 passed, 0 skipped
```

Also optimizes more hashing functions because it matters in tests.
2026-09-26 19:07:04 +00:00
Johanna LarssonandTangled 5fd900ee1a build: switch governor to system time
We can make this test only by adding a feature for it and checking, but it didn't seem immediately worth it to me. Ping me if you want me to change it.

Shaves about 15-20% off of a j2 test run, because we spent about 200ms on every one of the 500 tests against the server just initializing the governor clock.
2026-09-25 16:42:41 +00:00
Johanna LarssonandTangled b758372457 ci: speed up test by running against /dev/shm 2026-09-25 15:45:00 +00:00
Johanna LarssonandTangled 845eee122d test: introduce test jail to hide lewis' sins
We've got a bunch of tests that never pass because they time out on their own, or that take 10s because they test a 10s timeout, that we can rethink. Together they introduce a lot of slowness.

This puts anything over 10s in CI into test jail.
2026-09-25 13:16:17 +00:00
Johanna LarssonandTangled 779733f6c9 test: lower bcrypt cost in tests
The default is 12 but we can go down to 4 to waste less time on this.
2026-09-25 13:16:17 +00:00
Johanna LarssonandTangled 3230740097 ci: split workflow into two and apply flags
Taking some flags from the knot2 build and splitting it in the hopes that that's enough time to finish
2026-09-25 13:16:17 +00:00
Johanna LarssonandTangled b5ad3a92cc build: set tikv-jemalloc-sys opt-level to 1
`gcc` uses fortify to do bounds checking or some other important thing and in CI it's failing because it's defaulting to -o0
2026-09-25 13:16:17 +00:00
Johanna LarssonandTangled e86d117418 style: format everything
Guess we haven't run cargo fmt over the whole thing ina  while!
2026-09-25 13:16:17 +00:00
Johanna LarssonandTangled 5714eb12f3 ci: Introduce a basic test+lint workflow
This removes the old workflows that had not been working for a while and introduces a new microvm based one that does some basic checks and runs the default test suite.
2026-09-25 13:16:17 +00:00
Johanna LarssonandTangled 4302611e45 build: use ring over aws-lc
All of the codebase uses ring explicitly or implicitly, but the HTTP client used for S3 requests was using aws-lc instead. This commit removes that extra dependency.

Anecdotally it shaves 10s off a dev build on my machine, but slower machines would benefit more from it.
2026-09-25 13:06:17 +00:00
Johanna LarssonandTangled 1210ef9c70 fix: verify comms enqueue by ID
Grabbing latest comms means you sometimes get the signup email instead of the one sent by the test.
2026-09-25 13:02:33 +00:00
Johanna LarssonandTangled 9768b47772 chore: skip fsync in more test suites
Many of these don't finish anyway on my computer, I gave up around 40 minutes. But for the ones that did, it's a big speed up! For the others I guess they need more love.

gauntlet-pr: 67.9s with it, 120.9s without

test-store: 508.8s with it, still running at 1313s (I gave up)

test-store-sim-nightly: ran for like 40 minutes each attempt without finishing. I just gave up.

test-store-asan: only linux? but no reason why we can't apply the fix here too
2026-09-25 09:53:13 +00:00
Johanna LarssonandTangled 4eb59e4f6c Creating a mega test binary
Overall `just test` runs about 10-20s faster on this branch than current main, for me, with around 170s instead of around 180-190s. But the cool thing is the compile time. Making a simple edit to any file involved and running `just test` on main takes about 60s to recompile the test binaries. On this branch it takes less than 15s.

This is done by replacing a ton of separate test binaries with a single megabinary.

Only test files that looked safe have been included, avoiding ones that do stuff like setting env.
2026-09-24 13:09:23 +00:00
Johanna LarssonandTangled 0c5eda6117 Drop rustls 0.21 copy
It's not being used anyway, so just wasted CPU cycles.
2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled 7978246c66 Remove redundant cargo test build and set SQLX_OFFLINE=true
The pg tests were missing SQLX_OFFLINE
2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled ffc8ef4e01 Disable fsync for postgres too
Summary [ 166.110s] 1453 tests run: 1453 passed (1 slow), 15 skipped

Above is before this commit, below is after.

     Summary [ 140.410s] 1453 tests run: 1453 passed, 15 skipped

The mechanism here is the same as for the metastore tests. By skipping fsync we can run the tests much faster, and fsync doesn't matter in tests. Unless you're testing postgres itself I guess
2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled 7c0ca21de5 Remove sleeps from tests
Replace sleeps with the existing polling function instead. Exposes that the stress test isn't much of a stress test, it probably needs more data or something, but if it's heavy it should maybe not be part of `just test`
2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled 5214dd1c23 Remove forced serialization where not needed
Tests already run in isolation, so this is only relevant when messing with env vars and stuff, I think!
2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled 8a72d2c0e7 Stop talking to docker in tests that don't need docker
`just test` doesn't use docker, but the cleanup was still pruning containers over and over. This switches to only cleaning up containers created by the tests.
2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled 939b5a8cc4 Stop pg tests from duplicating tranquil-store tests 2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled e483fa139f Remove tests that require postgres from just test
These suites got added but actually need the postgres setup, and so can't succeed and are just annoying everyone.
2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled e87952616d Avoid compiling and running tests twice
test-unit was building a second copy of the code with different features, and then the main test command ran the same tests anyway, so we just built and ran the tests twice

Locally shaves a minute off of a full build+test, on this branch (so both runs include the fsync change etc)

We're at [ 173.444s] overall for `just test` now
2026-09-23 17:24:44 +00:00
Johanna LarssonandTangled 43dfd2f2f3 Stop compiling tranqil-store for just-test
Takes off ~140s CPU time for me, but no wall time improvement. Still, less work!
2026-09-23 17:24:44 +00:00