Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
6376629
cleanup (still failing the test but it's somethin)
ethteck Sep 15, 2025
6bb7303
more progz
ethteck Sep 19, 2025
8d7bb0a
more
ethteck Sep 19, 2025
85c54c9
progz
ethteck Sep 19, 2025
9e51c82
cromper is grood
ethteck Sep 21, 2025
8d1b72f
more changin
ethteck Sep 21, 2025
9b9da97
line
ethteck Sep 21, 2025
ffcd1f1
Merge branch 'main' into cromper-2
ethteck Sep 21, 2025
ac2301e
more stuff
ethteck Sep 21, 2025
ee2cd63
biome
ethteck Sep 21, 2025
2836a52
attempt to fix crud
ethteck Sep 21, 2025
d62c16a
fixes
ethteck Sep 21, 2025
f88be26
changes
ethteck Sep 22, 2025
c1627fd
Merge branch 'main' into cromper-2
ethteck Sep 22, 2025
1bd9364
PR comments
ethteck Sep 22, 2025
f811bc0
smores
ethteck Sep 22, 2025
6264904
changes
ethteck Sep 22, 2025
1ab376c
some biome stuff
ethteck Sep 22, 2025
1caf1f6
aah
ethteck Sep 22, 2025
aca7efa
agh
ethteck Sep 22, 2025
4a2766c
right
ethteck Sep 22, 2025
7f367ca
fixes
ethteck Sep 22, 2025
1311b3e
.
ethteck Sep 22, 2025
66a299e
nuke frontend changes (#1679)
mkst Sep 25, 2025
21586ba
Merge branch 'main' of github.com:decompme/decomp.me into cromper-2
mkst Sep 25, 2025
5ba705d
Some progress.. (#1680)
mkst Sep 25, 2025
4681ec0
singular endpoints, fix tests
ethteck Sep 26, 2025
22fe408
fixules
ethteck Sep 26, 2025
55c3cae
import fixes
ethteck Sep 26, 2025
f26866e
ruff check
ethteck Sep 26, 2025
8ecd379
a little cleanup
ethteck Sep 26, 2025
8c40b56
remove more routes from django
ethteck Sep 26, 2025
cfb0421
couple of tweaks (#1682)
mkst Sep 29, 2025
0d2430d
Cromper mkst (#1690)
mkst Oct 21, 2025
51e3823
Merge branch 'main' into cromper-2
ethteck Nov 3, 2025
133d54e
merge main & lints
ethteck Nov 3, 2025
8cbfef6
fix Dockerfile casing
ethteck Nov 3, 2025
0a204cc
whoopz
ethteck Nov 3, 2025
0883c19
whoopz2
ethteck Nov 3, 2025
e7920d2
try to fix
ethteck Nov 4, 2025
053bdb7
Merge branch 'main' into cromper-2
ethteck Dec 3, 2025
3a3689e
more
ethteck Dec 3, 2025
1882035
cromper grood
ethteck Dec 3, 2025
3b2f7fc
format backend
ethteck Dec 3, 2025
7066dea
integration test project
ethteck Dec 13, 2025
3a6a61a
stuff
ethteck Dec 13, 2025
7685d74
goods and services
ethteck Dec 13, 2025
4d0ba9a
progress
ethteck Dec 13, 2025
f3ddeef
Down to 2 tests that pass on their own but not when running with othe…
ethteck Dec 14, 2025
d0af449
some PR comments
ethteck Dec 14, 2025
6bea649
stop doing manual cromper initialization
ethteck Dec 15, 2025
992dc90
Integration tests passing
ethteck Dec 16, 2025
71b937f
Organization and stuff
ethteck Dec 16, 2025
81d20de
Merge branch 'main' into cromper-2
ethteck Dec 18, 2025
fe5f593
add timeouts to all ci tasks
mkst Dec 18, 2025
05c0341
Finish Cromper service rebase
ethteck Jul 17, 2026
3120850
Fix backend production image permissions
ethteck Jul 17, 2026
72e0501
Fix nsjail root mount in containers
ethteck Jul 17, 2026
67ef9a0
Restore backend healthcheck dependency
ethteck Jul 17, 2026
0ea26ba
Merge remote-tracking branch 'origin/main' into cromper-3
ethteck Aug 2, 2026
5789b03
merge updates
ethteck Aug 25, 2026
c46c1e8
redo compiler flags serialization
ethteck Aug 25, 2026
c528041
more stuff
ethteck Aug 25, 2026
80d98cd
smores
ethteck Aug 25, 2026
9afb848
PR comments
ethteck Sep 1, 2026
7a37bb0
uv update
ethteck Sep 1, 2026
5bde9d5
remove redundant function, move test
ethteck Sep 1, 2026
81edb95
remove language from scratch model
ethteck Sep 1, 2026
d24bd69
Merge branch 'main' into cromper-3
ethteck Sep 6, 2026
c8f4083
cromper groods and services
ethteck Sep 6, 2026
ce99144
protection from evil
ethteck Sep 6, 2026
5e9617e
Merge branch 'main' into cromper-3
ethteck Sep 7, 2026
3a21945
stuff
ethteck Sep 7, 2026
ebab5c6
gr00d
ethteck Sep 7, 2026
6f1a4f9
IT
ethteck Sep 7, 2026
8014701
oopth
ethteck Sep 7, 2026
41b2dda
yoop
ethteck Sep 7, 2026
15bdff2
uv
ethteck Sep 7, 2026
1fe321c
meowp
ethteck Sep 7, 2026
8234b52
dumb
ethteck Sep 7, 2026
2408464
moo
ethteck Sep 7, 2026
d0bc269
don't be dumb
ethteck Sep 7, 2026
07f748f
meow
ethteck Sep 7, 2026
c8d4ee3
aah
ethteck Sep 7, 2026
71881d6
meowp
ethteck Sep 7, 2026
d93e3aa
stuff
ethteck Sep 7, 2026
dc47003
hmm
ethteck Sep 8, 2026
b8ab5fc
ok
ethteck Sep 8, 2026
40b9f51
comments
ethteck Sep 8, 2026
561d8bc
changeS
ethteck Sep 8, 2026
bc61ee0
fix
ethteck Sep 8, 2026
4487ce1
good
ethteck Sep 8, 2026
5ade3ea
Improve JSON body parsing in get_json_body method
ethteck Sep 8, 2026
4780c07
Update base paths to use service root directory
ethteck Sep 8, 2026
9ecdd42
remove dumb stuff
ethteck Sep 8, 2026
84f5818
blah
ethteck Sep 8, 2026
4cf2666
Align lint configurations
ethteck Sep 8, 2026
fff12a8
Separate backend lint and typing cleanup
ethteck Sep 8, 2026
557dae1
Move unrelated backend lint cleanup out of Cromper PR
ethteck Sep 8, 2026
ebae3d9
Keep cleanup branch compatible with mypy
ethteck Sep 8, 2026
ee4827c
Match backend mypy check with main
ethteck Sep 8, 2026
ffd50c0
Drop unnecessary migration mypy suppressions
ethteck Sep 8, 2026
8da8497
Pin backend stubs for mypy compatibility
ethteck Sep 8, 2026
a6268db
Refresh backend typing dependencies
ethteck Sep 8, 2026
7d2b3ba
Refresh backend typing dependencies
ethteck Sep 8, 2026
e44337e
Fix binary type boundaries for updated stubs
ethteck Sep 8, 2026
c8d837e
Use locked backend environments in CI
ethteck Sep 8, 2026
bb8d949
update
ethteck Sep 9, 2026
092edb8
updates
ethteck Sep 9, 2026
1d4fb93
my b
ethteck Sep 9, 2026
94b9272
ok
ethteck Sep 9, 2026
0a0ef02
remove thing
ethteck Sep 9, 2026
67472ed
Merge branch 'cromper-3-cleanups' into cromper-3
ethteck Sep 9, 2026
c65fc3a
add name back
ethteck Sep 9, 2026
46add57
Merge remote-tracking branch 'origin/main' into cromper-3
ethteck Sep 9, 2026
2724251
updates
ethteck Sep 9, 2026
59bbaaf
stuffs
ethteck Sep 9, 2026
5c15950
crompsters
ethteck Sep 9, 2026
5ee310e
yoop
ethteck Sep 9, 2026
0506034
PRomments
ethteck Sep 10, 2026
eacab19
more
ethteck Sep 10, 2026
92099fe
more
ethteck Sep 10, 2026
edf94b6
smores
ethteck Sep 10, 2026
2789c67
smores
ethteck Sep 10, 2026
a11fc07
testz
ethteck Sep 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
DEBUG=on
DUMMY_COMPILER=on
SECRET_KEY=django-insecure-nm#!8%zhc0wwi#m_*l9l)=m*6gs4&o_^-e5b5vj*k05&yaqc1
DATABASE_URL=sqlite:///dev.db
API_BASE=http://127.0.0.1:8000/api
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/chores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
if: github.repository == 'decompme/decomp.me'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.14"

Expand Down
210 changes: 107 additions & 103 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,191 +1,190 @@
name: PR
on:
push:
branches:
- main
pull_request:

name: "CI"

jobs:
backend_test_docker_dev:
name: backend tests (docker dev container)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Build decompme_backend image
- uses: actions/checkout@v7
- name: Build backend development image
run: docker build backend --target dev -t decompme_backend
- name: Run backend tests
run: |-
docker build backend --target dev -t decompme_backend
- name: Run tests
run: |-
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
# NOTE: CI does not run as 'ubuntu' user
export USER_1000=$(getent passwd 1000 | cut -d: -f1)
for dir in backend/.venv sandbox local_files compilers libraries; do
mkdir -p "$dir"
sudo chown "${USER_1000}:${USER_1000}" "$dir"
done
mkdir -p backend/.venv
sudo chown "${USER_1000}:${USER_1000}" backend/.venv
docker run \
-v $(pwd):/decomp.me \
-v $(pwd)/local_files:/local_files \
-v $(pwd)/compilers:/compilers \
-v $(pwd)/libraries:/libraries \
--security-opt apparmor=unconfined \
--security-opt seccomp=unconfined \
--cap-drop all \
--cap-add setuid \
--cap-add setgid \
--cap-add setfcap \
--tmpfs /sandbox/tmp:exec,uid=1000,gid=1000,size=64M,mode=0700 \
--entrypoint /bin/bash \
-e COMPILER_BASE_PATH=/compilers \
-e LIBRARY_BASE_PATH=/libraries \
-e LOCAL_FILE_DIR=/local_files \
-e USE_SANDBOX_JAIL=on \
-e SANDBOX_DISABLE_PROC=true \
-e TIMEOUT_SCALE_FACTOR=10 \
-e DUMMY_COMPILER=1 \
-e DATABASE_URL=sqlite:///:memory: \
-e SECRET_KEY=secret-key-secret-key-secret-key-secret-key-secret-key-secret-key \
decompme_backend \
-c 'cd /decomp.me/backend && \
uv sync --locked && \
uv run compilers/download.py --compilers-dir ${COMPILER_BASE_PATH} && \
uv run libraries/download.py --libraries-dir ${LIBRARY_BASE_PATH} && \
uv run python manage.py test'
-c 'cd /decomp.me/backend && uv sync --locked && uv run python manage.py test'

backend_test_docker_prod:
name: backend tests (docker prod container)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Build decompme_backend image
run: |-
docker build backend --target prod -t decompme_backend
- name: Fetch compilers and libraries
- uses: actions/checkout@v7
- name: Build backend production image
run: docker build backend --target prod -t decompme_backend
- name: Run backend tests
run: |-
python3 -m pip install requests
python3 backend/compilers/download.py
python3 backend/libraries/download.py
export USER_1000=$(getent passwd 1000 | cut -d: -f1)
sudo chown -R ${USER_1000}:${USER_1000} backend/compilers
sudo chown -R ${USER_1000}:${USER_1000} backend/libraries
- name: Run tests
docker run \
--entrypoint /bin/bash \
-e DATABASE_URL=sqlite:///:memory: \
-e SECRET_KEY=secret-key-secret-key-secret-key-secret-key-secret-key-secret-key \
decompme_backend \
-c 'uv run python manage.py test'

cromper_test:
name: cromper tests (docker dev container)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- name: Build cromper development image
run: docker build cromper --target dev -t decompme_cromper
- name: Run cromper tests
run: |-
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
export USER_1000=$(getent passwd 1000 | cut -d: -f1)
mkdir -p local_files && sudo chown ${USER_1000}:${USER_1000} local_files
docker run \
-v $(pwd)/local_files:/local_files \
-v $(pwd)/backend/compilers:/compilers \
-v $(pwd)/backend/libraries:/libraries \
for dir in cromper/.venv cromper/compilers cromper/libraries; do
mkdir -p "$dir"
sudo chown -R "$USER_1000:$USER_1000" "$dir"
done
docker run --rm \
-v $(pwd)/cromper:/cromper \
--security-opt apparmor=unconfined \
--security-opt seccomp=unconfined \
--cap-drop all \
--cap-add setuid \
--cap-add setgid \
--cap-add setfcap \
--tmpfs /sandbox/tmp:exec,uid=1000,gid=1000,size=64M,mode=0700 \
--tmpfs /tmp/sandbox:exec,uid=1000,gid=1000,size=256M,mode=0700 \
Comment thread
ethteck marked this conversation as resolved.
--entrypoint /bin/bash \
-e LOCAL_FILE_DIR=/local_files \
-e COMPILER_BASE_PATH=/compilers \
-e LIBRARY_BASE_PATH=/libraries \
-e USE_SANDBOX_JAIL=on \
-e COMPILER_BASE_PATH=/cromper/compilers \
-e LIBRARY_BASE_PATH=/cromper/libraries \
-e USE_SANDBOX_JAIL=true \
-e SANDBOX_DISABLE_PROC=true \
-e TIMEOUT_SCALE_FACTOR=10 \
-e DUMMY_COMPILER=1 \
-e DATABASE_URL=sqlite:///:memory: \
-e SECRET_KEY=secret-key-secret-key-secret-key-secret-key-secret-key-secret-key \
decompme_backend \
-c 'uv run python manage.py test'
decompme_cromper \
-c 'cd /cromper && \
uv sync --locked --all-extras && \
uv run --locked compilers/download.py --compilers-dir $COMPILER_BASE_PATH && \
uv run --locked libraries/download.py --libraries-dir $LIBRARY_BASE_PATH && \
uv run --locked pytest'

docker_compose_test:
name: test docker compose
runs-on: ubuntu-latest
timeout-minutes: 10

timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7

- name: Allow nsjail user namespaces
run: |
sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: Fetch compilers and libraries
run: |
python3 -m pip install requests
python3 backend/compilers/download.py
python3 backend/libraries/download.py
python3 cromper/compilers/download.py
python3 cromper/libraries/download.py
export USER_1000=$(getent passwd 1000 | cut -d: -f1)
sudo chown -R ${USER_1000}:${USER_1000} backend/compilers
sudo chown -R ${USER_1000}:${USER_1000} backend/libraries
sudo chown -R "${USER_1000}:${USER_1000}" cromper/compilers cromper/libraries

- name: Setup dummy production env
- name: Setup dummy production environment
run: |
echo 'POSTGRES_USER=decompme' >> docker.prod.env
echo 'POSTGRES_PASSWORD=decompme' >> docker.prod.env
echo 'SECRET_KEY=secret-key-secret-key-secret-key-secret-key-secret-key-secret-key' >> docker.prod.env
echo 'DATABASE_URL=psql://decompme:decompme@postgres:5432/decompme' >> docker.prod.env
echo 'CONN_MAX_AGE=60' >> docker.prod.env
echo 'CONN_HEALTH_CHECKS="true"' >> docker.prod.env
echo 'SANDBOX_DISABLE_PROC="true"' >> docker.prod.env
echo 'ALLOWED_HOSTS="backend,backend-green,backend-blue,localhost,127.0.0.1"' >> docker.prod.env
echo 'CROMPER_URL=http://cromper:8888' >> docker.prod.env
echo 'CROMPER_PORT=8888' >> docker.prod.env
echo 'USE_SANDBOX_JAIL="on"' >> docker.prod.env
echo 'SANDBOX_DISABLE_PROC="true"' >> docker.prod.env
echo 'CI=true' >> docker.prod.env
echo 'ACTIVE_SLOT=blue' >> .deploy.env
echo 'BLUE_TAG=latest' >> .deploy.env
echo 'GREEN_TAG=latest' >> .deploy.env
echo 'NGINX_TAG=latest' >> .deploy.env
echo 'CROMPER_TAG=latest' >> .deploy.env

- name: Comment out SSL server configuration from nginx
run: |
sed -i '/{{HTTPS_SERVER_BLOCK_START}}/,/{{HTTPS_SERVER_BLOCK_END}}/s/^/#/' nginx/production/default.conf

- name: Prepare production runtime config
run: |
cp ./nginx/production/runtime/geo.conf.example ./nginx/production/runtime/geo.conf
cp ./nginx/production/runtime/geo.conf.example ./nginx/production/runtime/geo.conf
cp ./nginx/production/runtime/upstream.conf.example ./nginx/production/runtime/upstream.conf

- name: Build production images
run: |
docker compose -f docker-compose.prod.yaml build nginx backend-blue frontend-blue
docker compose -f docker-compose.prod.yaml build cromper nginx backend-blue frontend-blue

- name: Ensure production services
run: |
timeout 60s python3 deploy.py ensure || true
timeout 120s python3 deploy.py ensure

- name: View docker compose logs (blue)
if: always()
run: |
timeout 15s docker compose -f docker-compose.prod.yaml logs -f || true

- name: Check docker compose status (blue)
run: |
docker compose -f docker-compose.prod.yaml ps
run: docker compose -f docker-compose.prod.yaml ps

- name: Deploy green slot
run: |
python3 deploy.py deploy --no-pull latest green
run: python3 deploy.py deploy --no-pull latest green

- name: View docker compose logs (green)
if: always()
run: |
timeout 15s docker compose -f docker-compose.prod.yaml logs -f || true

- name: Check docker compose status (green)
run: docker compose -f docker-compose.prod.yaml ps

- name: Run integration tests
run: |
docker compose -f docker-compose.prod.yaml ps
docker compose -f docker-compose.prod.yaml run --rm --no-deps \
-v "$PWD/integration_tests:/integration_tests" \
-v "$PWD/backend/pyproject.toml:/backend/pyproject.toml:ro" \
-v "$PWD/cromper:/cromper" \
--entrypoint /bin/bash \
backend-blue \
-lc 'export UV_PROJECT_ENVIRONMENT=/tmp/integration-venv && cd /integration_tests && uv sync --locked --all-extras && uv run pytest -v'

- name: Shut everything down
if: always()
run: |
docker compose -f docker-compose.prod.yaml down
run: docker compose -f docker-compose.prod.yaml down

- name: Print out image sizes
- name: Print image sizes
if: always()
run: |
docker image ls
run: docker image ls

frontend_lint:
name: biome
name: frontend lint and tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup Node.js 24
uses: actions/setup-node@v6
uses: actions/setup-node@v7
with:
node-version: 24
cache: yarn
Expand All @@ -203,39 +202,44 @@ jobs:
cd frontend
yarn test

mypy:
name: mypy
backend_lint:
name: backend lint and type check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
uses: astral-sh/setup-uv@v10.0.1
with:
version: "latest"
- name: Setup Python 3.14
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.14"
- run: |-
cd backend
uv sync --locked
uv sync --locked --all-extras
uv run mypy
uv run ruff check
uv run ruff format --check

ruff:
name: ruff
cromper_lint:
name: cromper lint and type check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
uses: astral-sh/setup-uv@v10.0.1
with:
version: "latest"
- name: Setup Python 3.14
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: "3.14"
- run: |-
cd backend
uv sync --locked
uv run ruff check .
uv run ruff format --check .
cd cromper
uv sync --locked --all-extras
uv run --locked mypy .
uv run --locked ruff check
uv run --locked ruff format --check
5 changes: 4 additions & 1 deletion .github/workflows/ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
- name: backend
context: backend
target: prod
- name: cromper
context: cromper
target: prod
- name: frontend
context: frontend
target: prod
Expand All @@ -29,7 +32,7 @@ jobs:

steps:
- name: Check out repo
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Log in to GHCR
uses: docker/login-action@v4
Expand Down
9 changes: 3 additions & 6 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ __pycache__/
Dockerfile*
docker.*.env

# compilers
compilers/*/**
!compilers/download.py

# libraries
libraries/*/**
!libraries/download.py
# TEMPORARY: because i'm switching between main/cromper branches
compilers/**
libraries/**
3 changes: 3 additions & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TEMPORARY: because i'm switching between main/cromper branches
compilers/**
libraries/**
Loading