STT Filenames/Section/Program Type Conflation#5850
Merged
Conversation
… with the program type section split and sending STTs emails that they needed to submit files when they didnt need to - Added fallback/normalization logic to other areas where that pattern in used
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5850 +/- ##
===========================================
+ Coverage 93.98% 94.00% +0.01%
===========================================
Files 538 538
Lines 24618 24650 +32
Branches 620 620
===========================================
+ Hits 23137 23171 +34
+ Misses 1368 1366 -2
Partials 113 113
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
jtimpe
approved these changes
May 14, 2026
raftmsohani
approved these changes
May 15, 2026
mattcoleanderson
approved these changes
May 15, 2026
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.
Summary of Changes
This PR fixes the remaining places where TANF-family program type and section were being treated as a single combined string after the backend model moved to separate
program_typeandsectionfields.The main production symptom was the upcoming submission reminder email. STTs could submit their required files, but the reminder task compared submitted values like
TAN Active Case Dataagainst required filename keys likeActive Case Data, concluded the files were missing, and sentAction Requested: Please submit your TANF data filesanyway.Changes included here:
(program_type, section)pairs instead of combined strings.TRIBALfiles.TANandSSPfiles.TANfiles.DataFile.filenameto prefer section-only filename keys, while preserving fallback support for legacy prefixed keys.STT.num_sectionsto count unique normalized sections instead of relying onlen(filenames) // 2for SSP states.Pull request closes #_
How to Test
Backend targeted tests:
task backend-pytest PYTEST_ARGS="tdpservice/email/test/test_upcoming_deadline_email.py tdpservice/data_files/test/test_models.py tdpservice/stts/test/test_models.py -q" task backend-lintExpected results:
(program_type, section)submissions exist.DataFile.filenameresolves section-only filename keys and still tolerates legacy prefixed keys.STT.num_sectionscounts sections correctly for section-only and legacy prefixed filename configs.Deliverables
More details on how deliverables herein are assessed included here.
Deliverable 1: Accepted Features
Checklist of ACs:
lfrohlichand/oradpenningtonconfirmed that ACs are met.Deliverable 2: Tested Code
CodeCov Reportcomment in PR.Deliverable 3: Properly Styled Code
task backend-lintpasses.Deliverable 4: Accessible
iamjollyandttran-hubusing Accessibility Insights reveal any errors introduced in this PR? N/A, backend-only change.Deliverable 5: Deployed
Deliverable 6: Documented
Deliverable 7: Secure
Deliverable 8: User Research
N/A, backend defect fix.