Repository navigation
Move the serving and claim guarantees out of dev/tests - #6433
Merged
Merged
Conversation
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.
leaf-agent
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nine tests in
dev/testsprotect whatleaf 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. Indev/tests, only the nightly run would have caught a break in them; intests/, a pull request that edits them runs them, and the nightly runs them on both Ubuntu and macOS.model/test_claims.py: a Codex desktopserver startwith 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 directleaf wait, and shares one adapter across pages.journeys/test_server_lifetime.py: an abandonedserver _servehandshake leaves the reused server running.To weigh: the tier is set by
BUDGETS(3 s per test on CI's runner formodel/andprocess/). 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 itspreviewcase:PreviewService.startingis a direct call toclaim_and_start(page), the same call itsstartcase makes. The feedback test keeps itspreviewcase, and the takeover tests still use a user preview as the page's existing owner, whichtests/AGENTS.mdallows 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.pypass locally, and CI'stestjob ran the moved journeys.