Skip to content

chore: Remove hatch scripts and replace with built-in hatch utilities#84

Open
jason-famedly wants to merge 3 commits intomainfrom
jason/add-tooling
Open

chore: Remove hatch scripts and replace with built-in hatch utilities#84
jason-famedly wants to merge 3 commits intomainfrom
jason/add-tooling

Conversation

@jason-famedly
Copy link
Copy Markdown
Member

@jason-famedly jason-famedly commented Apr 7, 2026

Replace hatch run cov, hatch format and hatch lint with proper hatch fmt and hatch test ... options. Based on work done for the synapse-invite-checker

For the moment, using hatch fmt to run static analysis will run head first into a wall of issues. To run the formatting only, just run hatch fmt -f

🔴 NOTE: One of the consequences of this was changing the coverage data being collected. Previously, this included the testing infrastructure and it's utilities. This has now been removed from the calculation, which was a net-decrease in coverage percent

🔴 NOTE: This pins jwcrypto to <=1.5.6. See below for reasoning

@jason-famedly jason-famedly requested a review from a team as a code owner April 7, 2026 18:12
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.28%. Comparing base (df35f8c) to head (5ef8087).

❗ There is a different number of reports uploaded between BASE (df35f8c) and HEAD (5ef8087). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (df35f8c) HEAD (5ef8087)
6 3
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
- Coverage   83.08%   73.28%   -9.81%     
==========================================
  Files          18        5      -13     
  Lines        1874      756    -1118     
  Branches      193      145      -48     
==========================================
- Hits         1557      554    -1003     
+ Misses        234      143      -91     
+ Partials       83       59      -24     
Files with missing lines Coverage Δ
synapse_token_authenticator/__init__.py 100.00% <100.00%> (ø)
synapse_token_authenticator/claims_validator.py 77.60% <100.00%> (ø)
synapse_token_authenticator/config.py 68.81% <100.00%> (ø)
synapse_token_authenticator/utils.py 90.90% <100.00%> (ø)

... and 13 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update df35f8c...5ef8087. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

]
dependencies = [
"jwcrypto",
"jwcrypto<=1.5.6",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unexpected drive-by fix. The release of v1.5.7 introduces a hardening change to the length of HMAC tokens that affects testing. It is unknown if it affects production as well(I suspect not). Until that is resolved, let's keep this pinned

The 1.5.7 release increased hardening on the JWT token, which requires a
stricter length on the token. This needs to be worked around in the
testing suite. It is unknown if this will affect production.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant