add sgg-staging-fuzz script #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "add-sgg-staging-fuzz-script"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Moves the Simpler Grants Gov staging API exerciser out of a loose file at
/Users/bryan/code/HHS/test_script.pyand into version-controlled dotfiles.Changes
scripts/sgg-staging-fuzz.py— the exerciser. HitsGET /common-grants/opportunities,GET /common-grants/opportunities/<id>, andPOST /common-grants/opportunities/searchon staging with a sampled cross-product of filters, sorts, and pagination. Captures all non-2xx responses tostaging_failures.csvin the current working directory.scripts/sgg-staging-fuzz-setup.sh— one-time bootstrap that creates~/.local/share/sgg-staging-test/.venvand installsrequests. The script shebang points at that venv, so Python dependencies live outside any HHS project and survive project reshuffles.scripts/README.md— usage, secret convention, setup instructions.dot-config/zsh/functions.zsh—sgg-staging-fuzzshell function wrapper; passes through args and uses caller's CWD for output..gitignore— ignore__pycache__/and*.pyc.API key handling
The script reads
~/.secrets/simpler-grants-staging-api-key(raw value, one line,chmod 600) when theAPI_KEYenv var is unset. Env var takes precedence. Matches the existing~/.secrets/convention already used foropencode-api-key.Verified
py_compilecleanGET /common-grants/opportunitiesreturned 200 with real data; first batch of pagination combos all succeededNote
Also bumps
core.repositoryformatversionon the local dotfiles repo to 1 to makeextensions.worktreeConfig=trueinternally consistent (was previously version 0 with the extension enabled, which is an inconsistent state). Not a committed change — just local repo-config hygiene.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.