Repository navigation
Remote smoke tests: run obr_shock and microsim score_reform through jobs - #237
Open
vahid-ahmadi wants to merge 2 commits into
Open
vahid-ahmadi wants to merge 2 commits into
vahid-ahmadi wants to merge 2 commits into
Conversation
test_obr_shock_cgg and test_score_reform_microsim_scoreresult call the
hosted tools directly. On a cold server both pass Modal's 150s web-request
ceiling, Modal answers HTTP 303, and the MCP client refuses it ("Redirect
to .../mcp not followed"): the cause of the redirect failures in deploy run
42863423889 and validation run 42977456119. Both tools are allow-listed
jobs, so the tests now start them with start_job and poll get_job_result.
The helper lives in tests/remote_jobs.py with network-free unit tests,
because the remote suite is skipped outside the live deployment.
test_score_reform_default_window_works_through_a_job is a different
failure and is not changed here: its job is still running at the 600s
deadline (see the PR).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The remote _call asserts inside streamablehttp_client/ClientSession, whose anyio task groups wrap the AssertionError in an ExceptionGroup, so run_via_job would have retried a failed job as a dropped connection. mcp_caller checks the reply after the contexts close; tested through real task groups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vahid-ahmadi
marked this pull request as ready for review
November 11, 2026 10:24
This branch was successfully deployed
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.
Cause
Two separate failures. Only the first is the 303.
1. Redirect failures: same cause as #236, fixed here
Deploy smoke test 42863423889 and Validate live deployment 42977456119:
Both tests call a slow tool directly. On a cold container the call runs past Modal's 150 s web-request ceiling, and Modal answers HTTP 303. The MCP client (mcp 1.30) does not follow a 303 on a POST. Following it would not help either: it becomes a GET, and Modal's result URL rejects that (
jobs.py).test_obr_shock_cgghas failed this way on most validation runs since early October.test_score_reform_microsim_scoreresultpassed every day until 30 Oct and has failed on most runs since 31 Oct (it passed once, on 4 Nov), which suggests it now sits just over the ceiling.Fix. Both tools are already on
jobs.JOB_TOOLS, so no server change or deploy is needed. The two tests now usestart_joband thenget_job_resultpolls of 30 s, throughintegration/tests/remote_jobs.py::run_via_job, with a 300 s deadline each.2.
test_score_reform_default_window_works_through_a_job: not the 303, written up, not changedThis test already uses the job API, and the job starts fine. It fails because the job is still
runningafter 20 polls:Evidence that this is a runtime regression on the server, not a client problem:
153cf419). It was the first deploy since 12 Oct and shipped theed47a936..153cf419integration changes:policyengine[models]>=4,<5→==6.11.1policyengine-us1.764.6 → 2.2.1policyengine-uk==2.151.0andpolicyengine-core==3.33.3core.py, a required SPM geography for US households (01260bff) and the US population dataset name (5b207e0e), both from 22–28 OctI have not confirmed this. Modal's per-call timings would, and nothing in CI records them.
The checks that would settle it all hit the hosted server, so they are listed for Vahid rather than run:
get_job_resultonfc-01M74QJB6ZM861ZRT14DDP8NA8(11 Nov) shows whether that job finished or errored.run_tool_jobbefore and after 30 Oct.Raising the 600 s deadline without that evidence would only hide the regression, so this PR leaves it alone. Until it is resolved, the deploy smoke test and daily validation stay red on this one test.
Tests
integration/tests/test_remote_jobs.py: 8 unit tests. Six exerciserun_via_jobagainst a scripted server, with no network. They cover start then poll to done, never calling the tool directly, retrying a transport error, giving up after repeated errors, a job error being fatal, and the deadline. Two more runmcp_caller, the real call function, through fakes that hold live anyio task groups. The suite's existing_callasserts inside those contexts, where anExceptionGroupwould wrap theAssertionErrorand a failed job would be retried as a dropped connection, somcp_callerjudges the reply after the contexts close (a3e10bc4). On main the file fails on import; here all 8 pass.test_remote_mcp.pystays skipped in PR CI (it needsPOLICYENGINE_MACRO_REMOTE_TESTS=1). The two converted tests are not yet verified live. I did not dispatch a validation run, to avoid an extra Modal run. The first scheduled Validate live deployment after merge (07:00 UTC) will exercise them.modal deploystep runs first, so the deploy itself is unaffected.🤖 Generated with Claude Code