Skip to content

test_client_version_revision.py pins the schema head to 0018, so the next revision fails it #358

Closed

Description

@lumenpearson

server/tests/test_client_version_revision.py::test_the_revision_follows_0017_and_is_the_one_the_code_expects
asserts EXPECTED_REVISION == "0018" beside 0018's place in the chain. The head is
pinned once already, by test_schema_version.py::test_the_constant_the_app_ships_is_the_real_migration_head,
which reads it from the migrations themselves. A second pin, written as a number, fails the
moment the next revision moves the head, although nothing about 0018 changed.

Failure scenario: add revision 0019 and move EXPECTED_REVISION to it, as the
monitoring pull request does. pytest -q -n auto then fails in that test with
assert '0019' == '0018'.

Fix, in the monitoring pull request (docs/specs/2026-10-06-monitoring-plan.md, Task 3):
the test keeps 0018's own place, revision 0018 down from 0017, and asks only that the
code's head is at 0018 or later. test_schema_version.py stays the one pin.

```markdown
  `0018` were all applied that way, `0018` to the Neon branch `preview` first, when its pull
  request was pushed, and to production before the merge; every revision now goes that way.
  `0019` were all applied that way, and from `0018` on each went to the Neon branch `preview`
  first, when its pull request was pushed, and to production before the merge; every revision
  now goes that way.
, applied before the merge of stage 3b-1 of sub-project 3; `0015` to `0017` were applied on 26 September 2026, before #140's merge.**
, applied before the merge of the monitoring pull request, as `0018` was before stage 3b-1's; `0015` to `0017` were applied on 26 September 2026, before #140's merge.**
  and with it nothing but the versions.
  Nothing after `0001` may use `create_all`.
  and with it nothing but the versions.
  `0019` creates `health_checks`, one row per check of the tick's self-check
  (`services/health.py`): what it said last, since when, and when the owner was last
  told. One new table and nothing else, the ordinary additive shape, on **before** the
  merge; its downgrade drops the table and with it nothing but what the checks remembered.
  Nothing after `0001` may use `create_all`.
before #140 merged, and `0018` before stage 3b-1 of sub-project 3 merged.
before #140 merged, `0018` before stage 3b-1 of sub-project 3 merged, and `0019` before the
monitoring pull request merged.
`device_tokens.client_version`, the app version a phone last sent to v2: additive.
`device_tokens.client_version`, the app version a phone last sent to v2: additive. `0019`
creates `health_checks`, what each check of the tick's self-check said last: additive.
`0005` through `0018` were all applied that way.
`0005` through `0019` were all applied that way.
is nullable with no default, additive, and on **before** the merge; its downgrade drops
the column, which loses nothing but the versions.
is nullable with no default, additive, and on **before** the merge; its downgrade drops
the column, which loses nothing but the versions.

`0019` creates `health_checks`: one row per check of the tick's self-check, holding what it
said last, since when, and when the owner was last told («Monitoring», below). One new table
and nothing else, additive, and on **before** the merge; its downgrade drops the table, which
loses nothing but what the checks remembered.
`0018` asks per column, as `0015` does.
`0018` asks per column, as `0015` does, and `0019` per table, as `0016` does.
with the `alembic` command — that is how `0005`–`0017` were applied, the last three
together on 26 September 2026, before #140 merged. The Neon project is
called `lessons`; its identifier is not kept in the repository — anybody with access sees it
with the `alembic` command — that is how `0005`–`0019` were applied: `0015`–`0017` together
on 26 September 2026, before #140 merged, and from `0018` on each to the Neon branch
`preview` when its pull request was pushed and to production before the merge. The Neon
project is called `lessons`; its identifier is not kept in the repository — anybody with
access sees it
      `app/db.py:EXPECTED_REVISION`, currently `0018`; no `create_all` after `0001`)
      `app/db.py:EXPECTED_REVISION`, currently `0019`; no `create_all` after `0001`)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions