Skip to content

Move the serving and claim guarantees out of dev/tests - #6433

Merged
max-sixty merged 2 commits into
mainfrom
product-tests-out-of-dev
Nov 18, 2026
Merged

max-sixty merged 2 commits into
mainfrom
product-tests-out-of-dev

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Nine tests in dev/tests protect what leaf server start/run, page claims and Codex delivery do rather than what a developer tool does, so they move to the product suite, beside the tests of the same subject, where someone changing that code will find them. Each moves unchanged apart from its new module's import aliases. In dev/tests, only the nightly run would have caught a break in them; in tests/, a pull request that edits them runs them, and the nightly runs them on both Ubuntu and macOS.

  • model/test_claims.py: a Codex desktop server start with no validated native chat refuses and publishes no claim.
  • journeys/test_claims.py: a takeover that fails at delivery, preparation, private startup or service publication keeps the previous owner's claim, service and listener.
  • journeys/test_codex_adapter.py: serving connects Codex feedback before handing over the URL, keeps a direct leaf wait, and shares one adapter across pages.
  • journeys/test_server_lifetime.py: an abandoned server _serve handshake leaves the reused server running.

To weigh: the tier is set by BUDGETS (3 s per test on CI's runner for model/ and process/). On the runner the desktop refusal took about 2.1 s per case, so its three cases add about 6 s to each pull request. The others took 3.3 to 10 s, so they run nightly. The failed-delivery test drops its preview case: PreviewService.starting is a direct call to claim_and_start(page), the same call its start case makes. The feedback test keeps its preview case, and the takeover tests still use a user preview as the page's existing owner, which tests/AGENTS.md allows for a fixture.

Asked for by max-sixty, as a follow-up to #6412. Tests: the 28 moved cases, the remaining preview modules, and tests/model/test_suite_source.py pass locally, and CI's test job ran the moved journeys.

This was written by Claude Code on behalf of max-sixty

Nine tests in `dev/tests` protect what `leaf server start`/`run`, claims and
Codex delivery do, not what a developer tool does, so they move to the
product suite, where a change to that code finds them:

- `model/test_claims.py`: a Codex desktop `server start` without a validated
  native chat refuses and publishes no claim.
- `journeys/test_claims.py`: a takeover that fails at delivery, preparation,
  private startup or service publication keeps the previous owner's claim,
  service and listener.
- `journeys/test_codex_adapter.py`: serving connects Codex feedback before it
  hands over its URL, keeps a direct `leaf wait`, and shares one adapter
  across pages.
- `journeys/test_server_lifetime.py`: an abandoned `server _serve` handshake
  leaves the server it reused running.

Each test moves unchanged, apart from the module aliases its new home uses.
The `preview` case of the failed-delivery test is dropped: it called
`PreviewService.starting`, which is `claim_and_start(page)`, the same call as
its `start` case. The feedback test keeps its `preview` case, a third way of
serving the page, through `claim_and_start` in process, and the takeover tests
keep a user preview as the existing owner, as `tests/AGENTS.md` allows for a
fixture.

Tiers follow `BUDGETS` (3 s on CI's runner for `model/` and `process/`). On
the runner, in the developer-tool step of run 44384531688, the desktop refusal
took about 2.1 s a case and the others 3.3 to 10 s, so only the refusal joins
the pull-request tier.

`journeys/test_codex_adapter.py` pointed at the detached preview journey for
desktop persisted-chat ownership; it now points at the product tests of it.
The preview modules' docstrings drop a paragraph about a `main` mark that no
longer exists.
@max-sixty
max-sixty merged commit 039f511 into main Nov 18, 2026
5 checks passed
@max-sixty
max-sixty deleted the product-tests-out-of-dev branch November 18, 2026 23:08
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.

2 participants