Private PJNZ archive: classifier + Azure infra (issue 16) - #386
Open
r-ash wants to merge 1 commit into
Open
Conversation
Adds the shape/domain-tag classifier and manifest support ticket 16 asks for, plus the Azure Blob infra it now runs against instead of a git-LFS submodule (GitHub LFS bandwidth quota risk on this org's plan made that mechanism a bad fit -- see ticket 16's comments). - classify.shape_tags: zip-content peek, goals/aim_only from .HV presence - classify.domain_tags: leapfrog::process_pjnz() import + all-zero check for has_pmtct/has_cotrim, via new r_scripts/classify_pjnz.R - manifest.py: small JSON manifest for tags that aren't derivable at all (provenance/purpose), per ticket 09 - new `leapfrog-validate classify` CLI command - leapfrog-validate/infra/: Bicep for the private container + a GitHub-OIDC-federated CI reader identity, no static secret Age-stratification dropped from shape tags after finding it's a process_pjnz() runtime choice, not a PJNZ-intrinsic property -- see ticket 16's comments for the full amendment trail. Co-Authored-By: Claude Sonnet 5 <[email protected]>
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
Completes ticket 16 (
.scratch/leapfrog-validation/issues/16-private-pjnz-corpus-hosting-tagging.md) of the leapfrog-validation wayfinder map: the PJNZ classifier plus the Azure infra it now runs against.leapfrog_validate/classify.py—shape_tags(cheap zip-content peek:goals/aim_onlyfrom.HVmember presence) anddomain_tags(imports vialeapfrog::process_pjnz(), checks whether the PMTCT/cotrimoxazole input arrays are all-zero)leapfrog_validate/manifest.py— small JSON manifest for tags that aren't derivable from a PJNZ's contents at all (provenance/purpose), per ticket 09leapfrog_validate/r_scripts/classify_pjnz.R— new Rscript backingdomain_tagsleapfrog-validate classify <ref> <pjnz> [--manifest]CLI commandleapfrog-validate/infra/— Bicep for a private Azure Blob container + a GitHub-OIDC-federated CI reader identity (no static secret), replacing the git-LFS-submodule mechanism ticket 09 originally chose (GitHub LFS bandwidth quota risk on this org's actual plan — see ticket 16's Comments for the full amendment trail)Notable finding recorded on the ticket: age-stratification turned out not to be a PJNZ-intrinsic property —
process_pjnz()takesuse_coarse_age_groupsas a caller-supplied argument, not something read from the file — so it's dropped from shape tags rather than faked. Also discovered a pre-existingleapfrog::process_pjnz()limitation on Goals-enabled PJNZ (process_pjnz_haerrors onSouthAfrica.PJNZ), unrelated to this ticket;domain_tagssurfaces it asClassifyErrorand a test locks down that it fails loudly rather than guessing.A code review pass (medium effort) found and fixed several real bugs before this was pushed: a silent
has_cotrim=NA-gets-dropped bug (cotrim wasn't NA-scrubbed the way PMTCT is upstream), a manifest entry that could silently explode a bare string into per-character tags, a misleading fork-PR safety claim in the infra README (GitHub's OIDC subject claim doesn't actually distinguish fork PRs — corrected to point at the real boundary),allowSharedKeyAccessleft open on the storage account alongside the OIDC/RBAC setup, anddeploy.shhardcoding the repo instead of using the actual deployed values. All covered by new regression tests.Test plan
ruff check .cleandomain_tagsagainst all 3 real AIM-only fixtures (france_default, bothbwa_aim-*) and confirmed the Goals-fixture failure modeleapfrog-validate/infra/'s Bicep not yet compile-checked against a live Azure subscription from this sandbox (noaz/bicepCLI here) — was reviewed manually and the role/resource types verified against Microsoft's docs; the Azure resources it describes are already deployed and the real corpus already uploaded (per ticket 16's comments)🤖 Generated with Claude Code