Repository navigation
Port the TRAPI resilience probe, plan, and intake tests to trapi_1.6 - #187
Merged
Merged
Conversation
Brings the resilience tooling from devel onto trapi_1.6, adapted for 1.6's
intake contract. 1.6 has no TOM-2.0 validate_query layer, so the only intake
rejection is at parse time (non-JSON / non-object / wrong content-type -> 422);
bodies 2.0 rejects with a 400 (retired 1.x spellings, missing/empty query
graph, type confusion, extra envelope, natural-language body) are accepted at
intake on 1.6 and left to the pipeline.
- resilience_probe.py: add a --trapi-version {2.0,1.6} flag (default 2.0). On
1.6 the ~7 validation-dependent probes switch to a permissive "accepted at
intake -- must not 500 or hang" expectation, with a version note in their
signal. All other categories (SSRF, enum, oversized/slowloris, topology,
overbroad, cache, constraints, identifier, encoding, surface, workflow) are
version-agnostic and unchanged.
- test_resilience_intake.py: rewritten to 1.6's contract -- parse-level 422s
kept; the 2.0 "schema-invalid -> 400" and "mixed-version rejects retired
field" tests become "schema-shaped body accepted at intake". Verified against
1.6 intake under a TestClient (run_query stubbed); 27 pass.
- RESILIENCE_TESTING_PLAN.md: a TRAPI-version note up top and inline caveats on
the validation-dependent items.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ne6qXVt5WT6yq9sTmyEnA
Codecov Report✅ All modified and coverable lines are covered by tests. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
maximusunc
pushed a commit
that referenced
this pull request
Oct 27, 2026
- The resilience probe, plan and intake tests (#186) keep trapi_1.6's port from #187, made from #186's final state and adapted to 1.6's intake. - #179 points the ARAX pathfinder's BiolinkHelper at the TRAPI 2.0 models' Biolink version (shepherd_utils.trapi, not on this branch); it keeps arax_biolink_version (v4.2.5) here, matching the in-process ARAX's 4.2.5. - The compose changes (ARS behind the `ars` profile, compose.test.yml's limits folded into compose.yml) come in as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TtsBikU9y9AFQ5uu9tcioz
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.
What this is
Ports the resilience tooling (merged to
develin #186) ontotrapi_1.6, adapted for 1.6's intake contract. Same Test-only probe, plan, and intake regression tests — tuned so the expectations and tests are correct for 1.6 rather than 2.0.The key difference: 1.6 has no TOM-2.0
validate_queryOn 1.6 the only intake rejection is at parse time (
parse_query_body→ 422 for non-JSON / non-object / wrong content-type). Bodies that 2.0 rejects with a 400 — retired 1.x spellings (which are simply valid on 1.6), a missing/empty query graph, type confusion, an extra envelope, a natural-language body — are accepted at intake here and left to the pipeline. Everything else is identical.What changed vs the devel version
scripts/resilience_probe.py— adds a--trapi-version {2.0,1.6}flag (default2.0). On--trapi-version 1.6the ~7 validation-dependent probes (retired-1x,empty-graph,no-message,type-confusion-*,nl-question,extra-envelope,mixed-trapi-version) switch to a permissive "accepted at intake — must not 500 or hang" expectation, with a version note in theirsignal. All other categories (SSRF, enum, oversized/slowloris, topology, overbroad, cache, constraints, identifier, encoding, surface, workflow) are version-agnostic and unchanged. One probe is the same on both branches — the flag keeps them unifiable.tests/unit/test_resilience_intake.py— rewritten to 1.6's contract: the parse-level 422 tests stay; the 2.0 "schema-invalid → 400" and "mixed-version rejects the retired field" tests become "schema-shaped body is accepted at intake." Verified against 1.6's intake under a TestClient (run_querystubbed); 27 pass.docs/RESILIENCE_TESTING_PLAN.md— a TRAPI-version note up top (run with--trapi-version 1.6) and inline caveats on the validation-dependent items.Findings
The findings themselves are version-agnostic and the probe shows them on 1.6 too (same callback SSRF, same unbounded
request.body(), same workflowTypeError, sameget_messageKeyError). They're already tracked againstdevelin #180–#184; this PR is the tooling only, so those issues cover 1.6 as well. Run--trapi-version 1.6against a 1.6 Test instance to confirm.Notes
python scripts/resilience_probe.py --base-url <test> --i-understand-this-is-test --trapi-version 1.6 [...]Generated by Claude Code