Conversation
Diff for stage: DefaultStageWarning 3 Destructive Changes No Changes for stack: GitHubOidcStack ✅ Diff for stack: Service-prod - 3 to add, 3 to update, 3 to destroy ❌Details
Resources
[-] AWS::ApiGateway::Deployment AuthApiDeploymentB62B2E46bda7a3ee526845c6f831f98a8023195f destroy
[-] AWS::ApiGateway::Deployment TokenApiDeploymentB896C219ee4433fd7a430b8eb183e22b78e32990 destroy
[-] AWS::ApiGateway::Deployment ProfileApiDeployment84A54415750bd55753532dd2ebecd42716cf4155 destroy
[+] AWS::ApiGateway::Deployment AuthApiDeploymentB62B2E46ac99c3a69dd45f19958cb37bb317091a
[+] AWS::ApiGateway::Deployment TokenApiDeploymentB896C21940d30031daf269dad58a2f6f3cd50e46
[+] AWS::ApiGateway::Deployment ProfileApiDeployment84A54415225de1b126ba8d19e1f58d99b83b22e1
[~] AWS::Lambda::Function AuthApiHandlerED50ACFA
├─ [~] Code
│ └─ [~] .S3Key:
│ ├─ [-] 51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa.zip
│ └─ [+] 0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f.zip
└─ [~] Metadata
└─ [~] .aws:asset:path:
├─ [-] asset.51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa
└─ [+] asset.0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f
[~] AWS::Lambda::Function TokenApiHandler2E66DB25
├─ [~] Code
│ └─ [~] .S3Key:
│ ├─ [-] 51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa.zip
│ └─ [+] 0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f.zip
└─ [~] Metadata
└─ [~] .aws:asset:path:
├─ [-] asset.51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa
└─ [+] asset.0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f
[~] AWS::Lambda::Function ProfileApiHandler9B65A298
├─ [~] Code
│ └─ [~] .S3Key:
│ ├─ [-] 51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa.zip
│ └─ [+] 0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f.zip
└─ [~] Metadata
└─ [~] .aws:asset:path:
├─ [-] asset.51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa
└─ [+] asset.0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f
[~] AWS::Lambda::Function ApiHandler5E7490E8
├─ [~] Code
│ └─ [~] .S3Key:
│ ├─ [-] 51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa.zip
│ └─ [+] 0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f.zip
└─ [~] Metadata
└─ [~] .aws:asset:path:
├─ [-] asset.51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa
└─ [+] asset.0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f
[~] AWS::ApiGateway::Stage AuthApiDeploymentStageprodB0E4172A
└─ [~] DeploymentId
└─ [~] .Ref:
├─ [-] AuthApiDeploymentB62B2E46bda7a3ee526845c6f831f98a8023195f
└─ [+] AuthApiDeploymentB62B2E46ac99c3a69dd45f19958cb37bb317091a
[~] AWS::ApiGateway::Stage TokenApiDeploymentStageprod11035AE4
└─ [~] DeploymentId
└─ [~] .Ref:
├─ [-] TokenApiDeploymentB896C219ee4433fd7a430b8eb183e22b78e32990
└─ [+] TokenApiDeploymentB896C21940d30031daf269dad58a2f6f3cd50e46
[~] AWS::ApiGateway::Stage ProfileApiDeploymentStageprodF609D968
└─ [~] DeploymentId
└─ [~] .Ref:
├─ [-] ProfileApiDeployment84A54415750bd55753532dd2ebecd42716cf4155
└─ [+] ProfileApiDeployment84A54415225de1b126ba8d19e1f58d99b83b22e1
[~] AWS::Lambda::Function ChannelApiHandler02759D57
├─ [~] Code
│ └─ [~] .S3Key:
│ ├─ [-] 51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa.zip
│ └─ [+] 0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f.zip
└─ [~] Metadata
└─ [~] .aws:asset:path:
├─ [-] asset.51c4ffab6683e2fc0476f48392bf2435c9e2addfbc5604e0c492f637828589fa
└─ [+] asset.0591ee89c558a8ed5fa8f88e4083c55df9860b74fe3dd7ce90ee792698d3a55f
No Changes for stack: Frontend-prod ✅ Generated for commit ba5e26e at 2026-09-18T05:53:17.413Z |
Turns on disallow_untyped_defs/check_untyped_defs and makes them pass. - annotate ~1300 functions across src/ and tests/ - type route handlers as APIGatewayProxyEvent rather than Any; tests now pass real event objects, which is what powertools passes at runtime - add types-boto3 service stubs (dynamodb, kms, apigatewaymanagementapi) and cast at DynamoDB extraction boundaries, where item values are genuinely dynamic - scope ignore_missing_imports to mohawk instead of applying it globally, so a missing stub package surfaces as an error rather than a silent Any - add warn_unused_ignores; suppressions are down to 4 from 65 Cleanup this exposed: - shared json_body/header test helpers replace 145 hand-rolled body decodes - BaseRoute.hawk_uid/unauthorized replace a byte-identical block in 14 routes - SyncStorageException gains a default_message class attribute, deleting 27 identical __init__ overrides; this also closes a hole where **kwargs: Any let mypy accept bogus keyword arguments that then failed at runtime - delete dead fixtures, and 6 tests that asserted CPython abc semantics Two behavior changes, both making sibling routes agree: - empty-body PUT to a collection returns 400 instead of 500 - bso/read.py matches request headers case-insensitively, like every other route
Coverage reportClick to see where and how coverage changed
The report is truncated to 25 files out of 50. To see the full report, please visit the workflow summary page. This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
Turns on
disallow_untyped_defs/check_untyped_defsand makes them pass: mypy goes from 1376 errors to 0 across 150 files.What's here
src/andtests/.APIGatewayProxyEventinstead ofAny. Tests now construct real event objects, which is what powertools passes at runtime — so this makes the tests more faithful, not just more typed. A typo likeevent.bodyyis now a mypy error; underAnyit was silent.types-boto3service stubs (dynamodb, kms, apigatewaymanagementapi). Worth knowing for review: without themtable: "Table"resolved toAnyand checked nothing (reveal_typeconfirmed it). Installing them surfaced 85 previously-invisible errors, fixed with casts at the DynamoDB extraction boundary — item values genuinely are a 13-member union, so the cast keeps values dynamic while the Table API stays checked.ignore_missing_importsscoped tomohawkrather than global. That global setting is exactly what made the annotation above vacuous. Measured cost of dropping it: 7 errors, allmohawk, which ships no stubs.warn_unused_ignoresadded — it caught 3 already-rotted suppressions on its first run.Suppressions: 65 → 4. Remaining
Any: 9, all genuine (*args/**kwargsvariadics, a WebSocket event dict, twoResponse[Any]helper signatures).Cleanup this exposed
json_body()/header()test helpers replace 145 hand-rolled response-body decodes and delete 56# type: ignore[arg-type].BaseRoute.hawk_uid()/unauthorized()replace a byte-identical 8-line block in 14 routes.SyncStorageException.default_messagedeletes 27 identical__init__overrides. This also closes a real hole:**kwargs: Anyon those subclasses erased the base's precise signature, so mypy acceptedValidationException("x", bogus=1)— which raisesTypeErrorat runtime.abcsemantics rather than this codebase.base_route.pystill reports 100% coverage without them, which is the evidence they weren't testing it.Behavior changes — 2, flagged for review
Both make sibling routes agree:
PUTto a collection returns 400 instead of 500.json.loads(None)raisedTypeError, which that handler'sexcept (json.JSONDecodeError, KeyError)didn't catch, so it fell through toexcept Exception. The BSO route already returned 400 for the same input.bso/read.pymatches request headers case-insensitively, like the other 10 routes — it was the only one readingevent.get("headers")instead of the powertools property.Verification
mypyclean (150 files) ·black/isort/flake8clean · 958 tests pass at 100% coverage.Test count is 958 rather than 964 because of the 6 deleted
abc-semantics tests; nothing else was removed or skipped.