guru/nightly #1

Open
gamesguru wants to merge 225 commits from guru/nightly into main
Owner

Testing out forgejo-runner on my shitbox.

Testing out `forgejo-runner` on my shitbox.
make .envrc work for me
tidy/remove bloat, consolidate
tidy up, fix build error
"Your browser is deprecated. Please upgrade."
edits in join.rs to support better transactions

lint fixes

add a test to ensure the database nested transaction panic works as expected

add news fragment
During first-run mode, registration requires m.login.registration_token
which Complement cannot supply. The entrypoint now starts conduwuit,
parses the auto-generated token from the welcome banner, registers a
first admin user to exit first-run mode, then lets Complement tests
proceed using m.login.dummy auth.
Two fixes:

1. Error::Uiaa now maps to StatusCode::UNAUTHORIZED (401) in
   status_code() instead of falling through to the wildcard
   INTERNAL_SERVER_ERROR (500). Fixes issue #1409.

2. When yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse
   is set, first-run mode no longer forces m.login.registration_token.
   Admins that explicitly opted into open registration should get
   m.login.dummy on first-run just like subsequent registrations.
   Fixes Complement TestRegistration failures.

Also adds docker/complement Makefile target for local Complement testing.
The Dockerfile copies target/debug/conduwuit, but the Makefile was
building with the default dev-quick profile into target/dev-quick/.
Docker then silently reused the cached old binary.

Use PROFILE=dev to match CI and ensure the binary goes to target/debug/,
and add --no-cache to docker build to force a fresh image.
The Dockerfile was hardcoded to target/debug/conduwuit but the Makefile
builds to target/dev-quick/ by default, causing Docker to silently
reuse the old cached binary.

target/latest is a symlink that always points to the last-built profile
directory. Using it means the Dockerfile works correctly regardless of
whether the user built with dev, dev-quick, or release.
Docker COPY doesn't follow host symlinks, so target/latest/conduwuit
failed. The Makefile now copies the resolved binary to
target/conduwuit-complement before docker build, and the Dockerfile
copies from that stable non-symlinked path.
Use PROFILE=dev (matching CI) to ensure binary is in target/debug/
where the Dockerfile expects it. The dev-quick profile doesn't produce
a conduwuit binary in its output directory.
Shell env vars don't override .env file values in sub-make calls.
Make command-line arguments have the highest precedence and correctly
override whatever PROFILE is set in .env.
CARGO_FLAGS default includes --profile, so overriding it requires
including --profile explicitly. Revert Dockerfile to target/debug/
since both dev and dev-quick produce the binary there.
Docker COPY cannot follow directory symlinks in the build context.
Resolve target/latest to the actual profile dir using readlink,
cp the binary to target/conduwuit-complement (a plain file),
and COPY from that in the Dockerfile.
iterate_tokens() always returns the first-run token during first-run
mode, so the previous fix still caused the RegistrationToken flow to
be offered. Now the iterate_tokens() check is also skipped when
open_registration is explicitly enabled, allowing the code to fall
through to the m.login.dummy flow path.
- .dockerignore: whitelist target/dev-quick/conduwuit and target/latest/conduwuit
- Dockerfile: copy from target/dev-quick/conduwuit (concrete path, no symlink)
- Makefile: pass through PROFILE and include --profile in CARGO_FLAGS override
This error occurred fairly early in the Complement logs:

```log
=== NAME  TestDeviceManagement/DELETE_/device/{deviceId}
    apidoc_device_management_test.go:134: MatchResponse got status 400 want 401 - http://127.0.0.1:32820/_matrix/client/v3/devices/7hTYOfr7hy => {"errcode":"M_NOT_JSON","error":"M_NOT_JSON: Not json."}
=== RUN   TestDeviceManagement/DELETE_/device/{deviceId}_requires_UI_auth_user_to_match_device_owner
```
add some info/warn logs for debugging
update config key descriptions in config/mod.rs

add speculative fixes for the following 404 ORB errors in SchildiChat web:

    {"errcode":"M_NOT_FOUND","error":"M_NOT_FOUND: Fetching media failed: Answer from matrix.sp-codes.de: [404 / M_UNRECOGNIZED] Unrecognized request mxc=mxc://matrix.sp-codes.de/SpHUPhCGRnsYTFlyRYCDZhDD authenticated=true"}

    {"errcode":"M_NOT_FOUND","error":"M_NOT_FOUND: Fetching media failed: Answer from hampai.ch: [401 / M_UNAUTHORIZED] no auth provided (required) mxc=mxc://hampai.ch/b291e6908914b64277b7ed0e1de87df5d52cac241958243044855644160 authenticated=true"}

enforce freeze_legacy_media on all legacy remote fetch paths

fix: fallback to unauthenticated media on more errors and safely return NotFound for empty media
```log
2026-03-03T02:36:25.790498Z  INFO conduwuit_api::client::sync::v3::joined: user joined since last sync: last_sync_end_shortstatehash=Some(3316807), membership=Some(RoomMemberEventContent { avatar_url: Some("mxc://mdev.nutra.tk/Pb87ocP5NsGs7xvS9ZbIDhI30aU7EZLO"), displayname: Some("ggdev 🏴🚩"), is_direct: None, membership: "leave", third_party_invite: None, blurhash: None, reason: None, join_authorized_via_users_server: None, redact_events: None })
```
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	bin/complement
#	complement/complement.config.toml
#	src/core/error/mod.rs
#	src/service/media/remote.rs
#	src/service/sending/sender.rs
#	src/service/users/mod.rs
fix: revert .0 suffix from stateless version bump

Revert "fix: revert .0 suffix from stateless version bump"

This reverts commit 646be79a6d67477f04b0d7b6fc9d17c9b3d65f35.

fix: change to 0.5.6-beta.stateless.0 per user request
ci: fixup justfile for forge; reduce WAL flush back to debug log
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
9c521648d3
ci: tweak makefile ld inputs
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
31875d8879
ci: tidy makefile and log startup connection error
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
36e98b4fb4
ci: set profile to release. fix dns issue with duplicate hickory?
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
ee948decf9
fix cork/flush thing
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
8bd8b49f5f
wip: more cork stuff to try with database WAL
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
f47afc4058
fix: regression in auth rule visibility
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
8c7c0c4cc3
restore hickory_dns() call
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
14070d4fd0
try simplified config
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
e259ff9474
Merge remote-tracking branch 'github/main' into guru/nightly
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
e1914d4f5f
fix: restore dns stuff from github/main (hopefully works better)
Some checks are pending
Complement Tests / complement-tests (pull_request) Waiting to run
12f85b76e0
These will likely have to be updated when !1485 goes through.

Fixes: !1529
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
fix: back to just 1 dns request at a time; 3 is bad
Some checks failed
Complement Tests / complement-tests (pull_request) Has been cancelled
3a672f2b48
Some checks failed
Complement Tests / complement-tests (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • src/api/client/membership/invite.rs
  • src/api/client/membership/members.rs
  • src/service/client/mod.rs
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin guru/nightly:guru/nightly
git switch guru/nightly

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff guru/nightly
git switch guru/nightly
git rebase main
git switch main
git merge --ff-only guru/nightly
git switch guru/nightly
git rebase main
git switch main
git merge --no-ff guru/nightly
git switch main
git merge --squash guru/nightly
git switch main
git merge --ff-only guru/nightly
git switch main
git merge guru/nightly
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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
gamesguru/continuwuity!1
No description provided.