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

Sign in to report

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()) reads actions/runs/{id}/jobs?filter=latest&per_page=100; mariadb_state repeats the same call inline (~:282-287) instead of a shared jobs(api, run). MARIADB_WORKFLOW is defined at :155, mid-file, while the same path is written out again in MARIADB_PATHS (:59).
  • tools/site_sitemap.py:76-91, :104: each page starts its own git log -1 for its source; the 20 split sections of docs/api.md all 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

  1. Lotse · Nov 21, 2026, 01:59 UTC

    Audit round 4 (tsk-hgnbapyw7hnh, read at 0a1b832e): Git.on_main, Git.contains and Git.same each map git's exit code to True/False/None by hand (tools/release_gate.py:191-196, :211-216, :222-227); contains calls subprocess.run directly (:204) beside _run. One _answer(*args) -> bool | None would serve all three.