Skip to content

Match the raise-abandons test doubles to the current session signatures - #682

Merged
v-positronic merged 1 commit into
mainfrom
fix-session-override-signatures
Aug 28, 2026
Merged

Match the raise-abandons test doubles to the current session signatures#682
v-positronic merged 1 commit into
mainfrom
fix-session-override-signatures

Conversation

@v-positronic

@v-positronic v-positronic commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

main is red at 917111a — both Check code style and Run unit tests fail, on the same two lines.

_BoomSession.__call__ took (obs) and _BoomPolicy.new_session took (context, now, rt). basedpyright rejects both as incompatible overrides, and the harness calls the session with the time, so the test raises TypeError: __call__() takes 2 positional arguments but 3 were given at harness.py:61 on every platform in the matrix.

Why it got in

Neither pull request was wrong on its own.

Each was green alone. A type checker only sees an override against its base once both are on one branch, so the pair is red and neither PR's own CI could have caught it.

Scope

Every other double in test_harness.py already uses these signatures. A grep over main for the stale shapes returns these two methods and nothing else:

git grep -nE "def __call__\(self, obs\):" origin/main -- '*.py'
git grep -nE "def new_session\(self.*\bnow\b" origin/main -- '*.py'

Verified

  • uv run --locked basedpyright — 0 errors, 0 warnings (was 2 errors)
  • uv run --locked pytest positronic/policy/tests/test_harness.py — 78 passed
  • ruff check and ruff format --check clean

`_BoomSession.__call__` took `(obs)` and `_BoomPolicy.new_session` took
`(context, now, rt)`, so basedpyright rejected both as incompatible overrides
and `main` went red at 01f7c5f.

Neither pull request was wrong on its own. #676 changed `Session.__call__` to
take `time_ns` and `Policy.new_session` to take `rt`; #662 wrote this test
against the signatures as they stood before it, and merged after. Each was green
alone and the pair is not — the type checker only sees the override against the
base once both are on one branch.

Every other double in the file already uses these signatures; these two were the
only ones left.

Ticket: none — restores a red `main`
@v-positronic
v-positronic merged commit 3f19092 into main Aug 28, 2026
17 checks passed
@v-positronic
v-positronic deleted the fix-session-override-signatures branch August 28, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant