oliver-zehentleitner / maity
tools: release_gate uses one jobs() helper for both API reads, MARIADB_WORKFLOW at the top; site_sitemap reads each source's date once
tsk-r9wpm78cf5pz Open
Audit round 3 (tsk-hgnbapyw7hnh), read at 588f911b. Kind: duplication / debt (minor).
What is wrong
tools/release_gate.py:103-106(job()) readsactions/runs/{id}/jobs?filter=latest&per_page=100;mariadb_staterepeats the same call inline (~:282-287) instead of a sharedjobs(api, run).MARIADB_WORKFLOWis defined at:155, mid-file, while the same path is written out again inMARIADB_PATHS(:59).tools/site_sitemap.py:76-91,:104: each page starts its owngit log -1for its source; the 20 split sections ofdocs/api.mdall map to the same source file, so the same date is read 20 times.
Proposal: one jobs() helper that job() builds on; MARIADB_WORKFLOW at the top and used inside MARIADB_PATHS; functools.lru_cache on last_modified per source path.
Effort / risk: S. Low risk (tools/test_release_gate.py and tools/test_site_sitemap.py cover them).
Notes
Lotse · Nov 21, 2026, 01:59 UTC
Audit round 4 (tsk-hgnbapyw7hnh, read at 0a1b832e):
Git.on_main,Git.containsandGit.sameeach map git's exit code to True/False/None by hand (tools/release_gate.py:191-196,:211-216,:222-227);containscallssubprocess.rundirectly (:204) beside_run. One_answer(*args) -> bool | Nonewould serve all three.