Skip to content

Commit 2a50ab6

Browse files
committed
merge and clarify vocabulary, clarify changes.md
2 parents f332137 + bd60323 commit 2a50ab6

329 files changed

Lines changed: 64131 additions & 23821 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(mise exec:*)",
5+
"Bash(UPDATE_SNAPSHOTS=1 mise exec -- deno test --no-lock --allow-all src/vocab.test.ts)"
6+
]
7+
}
8+
}

.github/actions/setup-deno/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ runs:
66
steps:
77
- uses: denoland/setup-deno@v2
88
with:
9-
deno-version: 2.7.1 # Keep in sync with mise.toml
9+
deno-version: 2.7.7 # Keep in sync with mise.toml

.github/workflows/build.yaml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,12 @@ jobs:
5555
echo "Skipping private package: $pkg"
5656
continue
5757
fi
58-
if [[ "$TAG" = "latest" ]]; then
59-
npm publish --logs-dir=. --provenance --access public "$pkg" \
60-
|| grep "Cannot publish over previously published version" *.log
61-
else
62-
npm publish \
63-
--logs-dir=. \
64-
--provenance \
65-
--access public \
66-
--tag "$TAG" \
67-
"$pkg" \
68-
|| grep "Cannot publish over previously published version" *.log
69-
fi
58+
npm publish \
59+
--logs-dir=. \
60+
--provenance \
61+
--access public \
62+
--tag "$TAG" \
63+
"$pkg" \
64+
|| grep "Cannot publish over previously published version" *.log
7065
rm -f *.log
7166
done
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
#
3+
# Strict-mode interoperability smoke tests (HTTPS + HTTP signature verification).
4+
# Uses a standalone Docker Compose file with Caddy TLS proxies to verify that
5+
# Fedify correctly signs and verifies requests over HTTPS.
6+
# See: https://github.com/fedify-dev/fedify/issues/481
7+
name: smoke-mastodon-strict
8+
9+
on:
10+
schedule:
11+
- cron: "0 6 * * *"
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
smoke:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 25
22+
23+
env:
24+
COMPOSE: >-
25+
docker compose
26+
-f test/smoke/mastodon/docker-compose.strict.yml
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: ./.github/actions/setup-mise
32+
33+
- name: Generate TLS certificates
34+
run: bash test/smoke/mastodon/generate-certs.sh test/smoke/mastodon/.certs
35+
36+
- name: Verify certificates
37+
run: |
38+
openssl verify -CAfile test/smoke/mastodon/.certs/ca.crt \
39+
test/smoke/mastodon/.certs/fedify-harness.crt
40+
openssl verify -CAfile test/smoke/mastodon/.certs/ca.crt \
41+
test/smoke/mastodon/.certs/mastodon.crt
42+
43+
- name: Generate Mastodon secrets
44+
run: |
45+
IMAGE=ghcr.io/mastodon/mastodon:v4.3.9
46+
docker pull "$IMAGE"
47+
48+
SECRET1=$(docker run --rm "$IMAGE" bundle exec rails secret)
49+
SECRET2=$(docker run --rm "$IMAGE" bundle exec rails secret)
50+
51+
{
52+
echo "SECRET_KEY_BASE=$SECRET1"
53+
echo "OTP_SECRET=$SECRET2"
54+
docker run --rm "$IMAGE" bundle exec rails mastodon:webpush:generate_vapid_key \
55+
| grep -E '^[A-Z_]+=.+'
56+
docker run --rm "$IMAGE" bundle exec rails db:encryption:init \
57+
| grep -E '^[A-Z_]+=.+'
58+
} >> test/smoke/mastodon/mastodon-strict.env
59+
60+
- name: Start database and redis
61+
run: |
62+
$COMPOSE up -d db redis
63+
$COMPOSE exec -T db \
64+
sh -c 'until pg_isready -U mastodon; do sleep 1; done'
65+
66+
- name: Run DB setup and migrations
67+
run: |
68+
$COMPOSE run --rm -T \
69+
mastodon-web-backend bundle exec rails db:setup
70+
timeout-minutes: 5
71+
72+
- name: Start Mastodon stack
73+
run: $COMPOSE up --wait
74+
timeout-minutes: 12
75+
76+
- name: Provision Mastodon
77+
run: bash test/smoke/mastodon/provision-strict.sh
78+
79+
- name: Verify connectivity
80+
run: |
81+
echo "=== Harness health (from mastodon-web-backend, via Caddy TLS) ==="
82+
$COMPOSE exec -T mastodon-web-backend \
83+
curl -sf https://fedify-harness/_test/health
84+
echo " OK"
85+
86+
echo "=== Harness health (from mastodon-sidekiq, via Caddy TLS) ==="
87+
$COMPOSE exec -T mastodon-sidekiq \
88+
curl -sf https://fedify-harness/_test/health
89+
echo " OK"
90+
91+
- name: Run smoke tests
92+
run: |
93+
set -a && source test/smoke/.env.test && set +a
94+
deno run --allow-net --allow-env --unstable-temporal \
95+
test/smoke/orchestrator.ts
96+
97+
- name: Collect logs on failure
98+
if: failure()
99+
run: |
100+
echo "=== Docker Compose logs ==="
101+
$COMPOSE logs --tail=500
102+
103+
- name: Teardown
104+
if: always()
105+
run: $COMPOSE down -v
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
#
3+
# Interoperability smoke tests.
4+
# Spins up a Mastodon instance via Docker Compose and verifies that Fedify
5+
# can correctly exchange ActivityPub messages with it.
6+
# See: https://github.com/fedify-dev/fedify/issues/481
7+
name: smoke-mastodon
8+
9+
on:
10+
push:
11+
branches:
12+
- main
13+
- next
14+
- "*.*-maintenance"
15+
workflow_dispatch:
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
smoke:
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 25
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: ./.github/actions/setup-mise
30+
31+
- name: Generate Mastodon secrets
32+
run: |
33+
IMAGE=ghcr.io/mastodon/mastodon:v4.3.9
34+
docker pull "$IMAGE"
35+
36+
SECRET1=$(docker run --rm "$IMAGE" bundle exec rails secret)
37+
SECRET2=$(docker run --rm "$IMAGE" bundle exec rails secret)
38+
39+
{
40+
echo "SECRET_KEY_BASE=$SECRET1"
41+
echo "OTP_SECRET=$SECRET2"
42+
docker run --rm "$IMAGE" bundle exec rails mastodon:webpush:generate_vapid_key \
43+
| grep -E '^[A-Z_]+=.+'
44+
docker run --rm "$IMAGE" bundle exec rails db:encryption:init \
45+
| grep -E '^[A-Z_]+=.+'
46+
} >> test/smoke/mastodon/mastodon.env
47+
48+
- name: Start database and redis
49+
run: |
50+
docker compose -f test/smoke/mastodon/docker-compose.yml up -d db redis
51+
docker compose -f test/smoke/mastodon/docker-compose.yml exec -T db \
52+
sh -c 'until pg_isready -U mastodon; do sleep 1; done'
53+
54+
- name: Run DB setup and migrations
55+
run: |
56+
docker compose -f test/smoke/mastodon/docker-compose.yml run --rm -T \
57+
mastodon-web bundle exec rails db:setup
58+
timeout-minutes: 5
59+
60+
- name: Start Mastodon stack
61+
run: docker compose -f test/smoke/mastodon/docker-compose.yml up --wait
62+
timeout-minutes: 12
63+
64+
- name: Provision Mastodon
65+
run: bash test/smoke/mastodon/provision.sh
66+
67+
- name: Verify connectivity
68+
run: |
69+
echo "=== Harness health (from mastodon-web) ==="
70+
docker compose -f test/smoke/mastodon/docker-compose.yml exec -T mastodon-web \
71+
curl -sf http://fedify-harness:3001/_test/health
72+
echo " OK"
73+
74+
echo "=== Harness health (from mastodon-sidekiq) ==="
75+
docker compose -f test/smoke/mastodon/docker-compose.yml exec -T mastodon-sidekiq \
76+
curl -sf http://fedify-harness:3001/_test/health
77+
echo " OK"
78+
79+
- name: Run smoke tests
80+
run: |
81+
set -a && source test/smoke/.env.test && set +a
82+
deno run --allow-net --allow-env --unstable-temporal \
83+
test/smoke/orchestrator.ts
84+
85+
- name: Collect logs on failure
86+
if: failure()
87+
run: |
88+
echo "=== Docker Compose logs ==="
89+
docker compose -f test/smoke/mastodon/docker-compose.yml logs --tail=500
90+
91+
- name: Teardown
92+
if: always()
93+
run: docker compose -f test/smoke/mastodon/docker-compose.yml down -v

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@
33
.pnpm-store/
44
.vocab-codegen.lock/
55
dist/
6+
dist-tests/
67
node_modules/
78
package-lock.json
89
repomix-output.xml
10+
test/smoke/.env.test
11+
test/smoke/mastodon/.certs/
12+
test/smoke/mastodon/mastodon.env
13+
test/smoke/mastodon/mastodon-strict.env
14+
smoke.log
915
t.ts
1016
t2.ts
1117
plan.md

.hongdown.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ proper_nouns = [
3030
"@fedify/nestjs",
3131
"@fedify/postgres",
3232
"@fedify/redis",
33+
"@fedify/solidstart",
3334
"@fedify/sqlite",
3435
"@fedify/sveltekit",
3536
"@fedify/webfinger",
@@ -74,6 +75,7 @@ proper_nouns = [
7475
"RabbitMQ",
7576
"Redis",
7677
"Scoop",
78+
"SolidStart",
7779
"SvelteKit",
7880
"Typo Blue",
7981
"URI Template",

0 commit comments

Comments
 (0)