mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 21:27:02 +01:00
The run that added the hook-environment cache could not benefit from it: its key is a hash of .pre-commit-config.yaml, which that same commit changed, so it logged "Cache not found" and then saved. Six hook environments were still built from scratch -- including pylint's, which pulls a dozen extra packages -- and that is most of the 126s hook step. Without a dispatch there is no way to re-run the job on an unchanged tree to see the cached number, so the saving could only be asserted, not measured. Now it can be measured. Confirmed in the same log that the previous commit landed: "pytest with coverage enforcement....Skipped". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJrqKERAo5QUeEHWS5Asgp
38 lines
1.7 KiB
JSON
38 lines
1.7 KiB
JSON
{
|
|
"intent": "Allow the Pre-commit checks workflow to be re-run manually, so a caching change can be verified on an unchanged tree instead of being asserted.",
|
|
"scope": [
|
|
".github/workflows/pre-commit.yml (triggers only)",
|
|
"Non-goal: changing what the job runs"
|
|
],
|
|
"changes": ["Added workflow_dispatch to the Pre-commit checks triggers."],
|
|
"verification": [
|
|
{
|
|
"command": "gh run view 32645759168 --log | grep for cache keys",
|
|
"result": "pass",
|
|
"evidence": "'Cache not found for input keys: pre-commit-Linux-py3.12-...' then 'Cache saved with key: ...' -- the env cache missed because that commit changed .pre-commit-config.yaml, which is the key. It is populated now."
|
|
},
|
|
{
|
|
"command": "gh run view 32645759168 --log | grep -c 'Installing environment'",
|
|
"result": "pass",
|
|
"evidence": "6 hook environments built from scratch, including pylint's with a dozen extra packages -- the bulk of the 126s hook step"
|
|
},
|
|
{
|
|
"command": "gh run view 32645759168 --log | grep 'pytest with coverage enforcement'",
|
|
"result": "pass",
|
|
"evidence": "'....Skipped' -- the duplicate-suite skip from the previous commit took effect"
|
|
},
|
|
{
|
|
"command": "python3 -c \"import yaml; yaml.safe_load(...)\"",
|
|
"result": "pass",
|
|
"evidence": "workflow parses as valid YAML"
|
|
}
|
|
],
|
|
"risks": [
|
|
"A dispatch trigger lets anyone with write access run the job on demand; it runs the same read-only checks as a push, so there is no additional privilege."
|
|
],
|
|
"rollback": [
|
|
"Remove the workflow_dispatch line.",
|
|
"After rollback, confirm the workflow no longer offers a Run workflow button."
|
|
]
|
|
}
|