Repository navigation
feat(typing): add strict .pyi stubs, stateful Hypothesis rules, and mutation gates - #177
Draft
skupriienko wants to merge 1 commit into
Draft
skupriienko wants to merge 1 commit into
skupriienko wants to merge 1 commit into
Conversation
This was referenced Nov 15, 2026
skupriienko
marked this pull request as draft
November 15, 2026 16:01
This branch has not been 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.
Stack (v1.9.2 Hardening Rollout)
master<-wave-1-tooling-hygieneCRIT-03,CRIT-04,CRIT-05,HIGH-06wave-1-tooling-hygiene<-wave-2-transport-redactionCRIT-01,CRIT-02,HIGH-01(lock),HIGH-02,HIGH-03,HIGH-04(path),OPT-09wave-2-transport-redaction<-wave-3-boot-slots-poolingOPT-01..OPT-07,OPT-10,OPT-11,HIGH-01(warn_unclosed)wave-3-boot-slots-pooling<-wave-4-builders-semverHIGH-04(bool/stream),HIGH-05,HIGH-07,OPT-08wave-4-builders-semver<-wave-5-typing-stateful-testsMOD-02,MOD-04Merge in order: #173 -> #174 -> #175 -> #176 -> #177.
Note
Stacked PR workflow note:
ClusterFuzzLite PR fuzzingruns immediately on all PRs. Workflows scoped tobranches: [master](CI,PR Validation,Continuous Security Verification,CodeQL) trigger automatically as parent PRs merge intomasterand GitHub retargets this PR's base branch tomaster.Summary
Wave 5 of 5 for
v1.9.2(stacked on #176 /wave-4-builders-semver). Ships deterministic PEP 561.pyitype stubs (client.pyi,endpoint.pyi) verified by a zero-subprocessAST stub checker (scripts/check_stubs.py --check), wires stub and wheel checks into CI (commit_checks.yaml,publish.yml,MANIFEST.in), expands statefulHypothesisRuleBasedStateMachinebuilder tests, and configuresmutmutwith targeted unit tests reaching 81.57% killed mutants (1270/1557).Actions
mailjet_rest/client.pyi,mailjet_rest/endpoint.pyi,scripts/check_stubs.py,MANIFEST.in,pyproject.toml,MOD-02):Clientfor all111ROUTES_REGISTRYendpoints alongside typedEndpointmethods (get,create,update,delete,stream,get_many,id).scripts/check_stubs.py --checkverification (nosubprocesscalls) and included.pyistubs in source/wheel distributions..github/workflows/commit_checks.yaml,.github/workflows/publish.yml,manage.sh,MOD-02):python scripts/check_stubs.py --checkintocommit_checks.yamlandmanage.sh, and verified.pyi+py.typedfiles inside built wheels inpublish.yml.tests/property/test_builder_state.py,tests/unit/test_stubs.py,tests/unit/test_wave5_mutation_coverage.py,tests/unit/test_wave2_security.py,MOD-04):HypothesisRuleBasedStateMachinerules coveringMessageBuilderandSendPayloadBuilderinvariants.tests/unit/test_stubs.py) and mutation-killing unit coverage (tests/unit/test_wave5_mutation_coverage.py) reaching 81.57% (1270/1557killed,285survived,2timeout,0no tests acrossbuilders.py,endpoint.py,utils/transport_security.py, andutils/version.py).Verification & Testing
pytest -n auto -W error --cov=mailjet_rest --cov-fail-under=80 tests/unit tests/property tests/regression: 276 passed, 94.94% coverage.mutmut run/mutmut results --all true: 1270/1557 killed (81.57%) (builders78.75%,endpoint83.72%,transport_security86.43%,version85.71%).ruff check .,ruff format --check .,python scripts/check_stubs.py --check,mypy --strict mailjet_rest(13files,0issues),pyright mailjet_rest(0errors),slotscheck -m mailjet_rest(13modules,30classes OK),bandit -c pyproject.toml -r mailjet_rest(0issues),zizmor .github/workflows/(0findings),pip-audit --skip-editable(0vulnerabilities),python tests/test_boot.py(0.544scProfile /0.8364swall),pytest -q tests/test_perf.py(6 passed),python -m build --no-isolation+twine check dist/*(PASSEDwith.pyi+py.typedverified in wheel).pytest -m network,samples/smoke_readme_runner.py) were skipped locally due to absentMJ_APIKEY_PUBLIC/MJ_APIKEY_PRIVATEcredentials.