Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .claude/agents/server-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Integrity of the server test suite itself. Use to check that a test
tools: Read, Glob, Grep, Bash, Edit, Write
---

You own `server/tests/`. 3857 tests; `pytest -q -n auto`, bare, is exactly what CI runs.
You own `server/tests/`. 3877 tests; `pytest -q -n auto`, bare, is exactly what CI runs.
Not `python -m pytest` for the gate:
the `-m` form puts the current directory on `sys.path`, so a test that leans on it passes
here and fails at collection on CI (`CLAUDE.md`, «Commands»; #310, #314).
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/gates/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ that happens and names both trees (#312).
after ruff — the owner asked for it through that day's audit (#210) — and still worth
running before a push: seconds here, minutes there. It is the thing that reproduces the
«🗓 Четверти» crash.
3. `pytest -q -n auto`, bare, from `server/` with its venv active — 3857 tests today, six of
3. `pytest -q -n auto`, bare, from `server/` with its venv active — 3877 tests today, six of
them skipped unless a host is running (`-m host`, CI's «Host» job), plus eleven
PostgreSQL-only lock checks skipped on SQLite, and
**the exact command CI runs**. Not `python -m pytest`: the `-m` form puts the current
Expand Down
70 changes: 23 additions & 47 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,35 @@ version: 2
#
# The Android versions in libs.versions.toml are not invented: they are carried
# over from projects that build on them, and the catalog's header names the
# source of each. That is why updates are grouped and capped — five open pull
# requests carrying Compose alphas one at a time is a lottery, not an update.
# source of each. One weekly version cohort targets dev, so four updaters do
# not recreate separate branch queues after a consolidation. Production still
# receives a separately checked promotion. Security updates keep GitHub's
# separate default-branch queue.
#
# The labels are the project's own families, `type:` and `area:`, and each one
# has to exist already: Dependabot skips a label the repository does not have,
# without a word. It asked for `dependencies`, `android`, `server`, `vercel`
# and `ci` for months, none of which existed, and every bump arrived bare
# (#162).
updates:
- package-ecosystem: gradle
directory: /android
multi-ecosystem-groups:
dependencies:
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 5
target-branch: dev
milestone: 7
labels:
- type:chore
pull-request-branch-name:
prefix: work

updates:
- package-ecosystem: gradle
directory: /android
multi-ecosystem-group: dependencies
patterns: ["*"]
labels:
- area:android
groups:
androidx:
patterns:
- androidx.*
testing:
patterns:
- junit:*
- org.robolectric:*
network:
patterns:
- com.squareup.retrofit2:*
- com.squareup.okhttp3:*
- org.jetbrains.kotlinx:kotlinx-serialization*
ignore:
# AGP, Kotlin and KSP move together and only by hand: AGP 9 compiles
# Kotlin itself, and the KSP version is tied to the compiler's. The three
Expand All @@ -60,28 +58,10 @@ updates:

- package-ecosystem: pip
directory: /server
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 5
multi-ecosystem-group: dependencies
patterns: ["*"]
labels:
- type:chore
- area:server
groups:
testing:
patterns:
- pytest*
- ruff
runtime:
patterns:
- fastapi
- uvicorn*
- pydantic*
- sqlalchemy*
- alembic
- httpx
- asyncpg
- aiosqlite

# The lock Vercel installs: requirements.txt, compiled by `uv pip compile`
# from requirements.in (#192). `uv` rather than `pip`, because the uv updater
Expand All @@ -97,18 +77,14 @@ updates:
# else touches the lock alone.
- package-ecosystem: uv
directory: /
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 3
multi-ecosystem-group: dependencies
patterns: ["*"]
labels:
- type:chore
- area:server

- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
multi-ecosystem-group: dependencies
patterns: ["*"]
labels:
- type:chore
- area:ci
16 changes: 16 additions & 0 deletions .github/workflows/apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ on:
description: "versionCode to stamp (blank = this run's number)"
type: string
required: false
expected_commit:
description: "Refuse before signing if this ref no longer resolves to the expected full SHA"
type: string
required: false
push:
tags: ["v*"]

Expand Down Expand Up @@ -64,6 +68,18 @@ jobs:
steps:
- uses: actions/checkout@v7

- name: Validate requested source
id: source
env:
EXPECTED_COMMIT: ${{ inputs.expected_commit }}
run: |
if [ -n "$EXPECTED_COMMIT" ]; then
if [[ ! "$EXPECTED_COMMIT" =~ ^[0-9a-f]{40}$ ]] || [ "$GITHUB_SHA" != "$EXPECTED_COMMIT" ]; then
echo "::error::The ref no longer matches the requested source commit."
exit 1
fi
fi

- uses: actions/setup-java@v6
with:
distribution: temurin
Expand Down
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ compiled from `requirements-host.in` against `requirements.txt` by the command i
header, for every platform, so the two cannot disagree (`test_host_image.py`); the root
`Dockerfile` and CI's «Host» job install both, and Vercel neither sees nor imports it.

- Serialize pyvoy receive delivery and keep ASGI Future completions valid across cancellation; observe abandoned sends and stop only idle WatchClass on disconnect (`test_host.py`, #728).

## Commands

Python 3.11+ (`.python-version` says 3.12, CI runs 3.12), JDK 21, Android SDK with
Expand All @@ -68,7 +70,7 @@ Server, from `server/`:
`conftest.py` refuses to start when it would (#312)
- **`ruff check app tests scripts migrations`** — exactly what CI lints; `ruff check .` from
`server/` covers the same tree
- **`pytest -q -n auto`** — 3857 tests, six of them skipped unless a
- **`pytest -q -n auto`** — 3877 tests, six of them skipped unless a
host is running (`-m host`, CI's «Host» job), plus eleven PostgreSQL-only lock
checks skipped on SQLite, and **the exact command
CI runs**. Not `python -m pytest`, which is what this line used to say: the `-m`
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cp .env.example .env # BOT_TOKEN and OWNER_IDS are your own
| --- | --- |
| `ruff check app tests scripts migrations` | lints the server — exactly what CI runs |
| `python -m mypy` | one question of all 242 modules: does anything reach for an attribute its type does not have? |
| `pytest -q -n auto` | the server tests, 3857 of them — the exact command CI runs. Not `python -m pytest`: the `-m` form puts the current directory on `sys.path`, so a test that imports another passes locally and fails on CI |
| `pytest -q -n auto` | the server tests, 3877 of them — the exact command CI runs. Not `python -m pytest`: the `-m` form puts the current directory on `sys.path`, so a test that imports another passes locally and fails on CI |
| `python -m pytest -q tests/test_schedule.py -k parity` | one file, one test |
| `python scripts/check_test_counts.py server --junit work/pytest.xml` | compare the completed full server report with `docs/counts.json` |
| `python -m uvicorn app.main:app --reload` | run the server |
Expand Down
Loading