🤖 Generated by the Daily AI Assistant
Summary
The create-issues-from-todos composite action (which pins alstr/todo-to-issue-action@v5.1.13) crashes the TODOs workflow whenever a removed # TODO: comment matches multiple existing GitHub issues (an "ambiguous match"). The crash is a KeyError in the upstream action's diagnostic print, not in the issue-closure logic itself — closure is already (correctly) skipped, but the action then dies trying to print the ambiguous candidates with a GitLab-only field name.
This is a shared-library / portfolio-wide failure mode: every devantler-tech repo whose TODOs workflow calls reusable-workflows/.github/workflows/scan-for-todo-comments.yaml → create-issues-from-todos → todo-to-issue-action@v5.1.13 is exposed.
Evidence (observed live)
platform-template TODOs run 26907228942 (push of the auth-proxy TODO-dedup merge platform-template#16, commit 73a12fb) failed with:
Processing issue 1 of 6: 'Remove auth-proxy when Cilium supports native forward auth (...cilium#23797)' @ k8s/.../auth-proxy/config-map.yaml:1
Skipping issue closure due to ambiguous match against multiple existing issues, shown below
Traceback (most recent call last):
File "/app/main.py", line 169, in <module>
process_diff(StringIO(last_diff), client, insert_issue_urls)
File "/app/main.py", line 138, in process_diff
status_code = client.close_issue(raw_issue)
File "/app/GitHubClient.py", line 371, in close_issue
print(f' {x["web_url"]}')
KeyError: 'web_url'
Root cause
GitHubClient.close_issue (upstream alstr/todo-to-issue-action, pinned v5.1.13 / c45b007) takes the ambiguous-match branch when a removed TODO maps to >1 open issue, then prints each candidate with x["web_url"]. GitHub's REST issue object exposes html_url, not web_url (web_url is a GitLab field) → KeyError → non-zero exit → red workflow.
The trigger is duplicate issues with the same title — exactly the state the upstream scanner produces when one TODO is repeated across N files (it opens one issue per occurrence; see the dedup in platform-template#16). When such a TODO is later removed, the close path goes ambiguous and crashes.
Scope / severity
- Self-healing per repo: the failure is bound to the specific diff that removes the TODO(s); the next push runs
TODOs with a clean diff and goes green. It does not persistently red a main.
- But it recurs across the portfolio any time a multi-occurrence TODO with duplicate issues is cleaned up, and it produces a noisy, misleading red on
main for that commit.
- A version bump does not fix it: upstream
v5.1.14 (latest) leaves GitHubClient.py unchanged vs v5.1.13 (confirmed via the v5.1.13...v5.1.14 compare — the file is not in the changeset), so the bug persists in the newest release.
Proposed direction (pick one; sized S–M)
- Report upstream
alstr/todo-to-issue-action (web_url → html_url in the ambiguous-match diagnostic) and re-pin once fixed. Cleanest root-cause path, but gated on upstream cadence.
- Dedup discipline (mitigation, already proven): keep each repeated TODO once at the source so the close path is never ambiguous (the pattern applied in platform-template#16). Roll the same single-occurrence convention into the template(s) and the
platform repo (which still carries the identical 5-file auth-proxy TODO).
- Harden our wrapper to tolerate a non-zero exit on the close-only path (e.g. only fail the job on creation errors), if
scan-for-todo-comments can be made to distinguish them — needs investigation.
Acceptance criteria
- A removed multi-occurrence TODO no longer crashes the
TODOs workflow on any consumer repo.
- The chosen mitigation is documented in this action's README / the reusable workflow.
Summary
The
create-issues-from-todoscomposite action (which pinsalstr/todo-to-issue-action@v5.1.13) crashes the TODOs workflow whenever a removed# TODO:comment matches multiple existing GitHub issues (an "ambiguous match"). The crash is aKeyErrorin the upstream action's diagnostic print, not in the issue-closure logic itself — closure is already (correctly) skipped, but the action then dies trying to print the ambiguous candidates with a GitLab-only field name.This is a shared-library / portfolio-wide failure mode: every devantler-tech repo whose
TODOsworkflow callsreusable-workflows/.github/workflows/scan-for-todo-comments.yaml→create-issues-from-todos→todo-to-issue-action@v5.1.13is exposed.Evidence (observed live)
platform-template
TODOsrun 26907228942 (push of the auth-proxy TODO-dedup merge platform-template#16, commit73a12fb) failed with:Root cause
GitHubClient.close_issue(upstreamalstr/todo-to-issue-action, pinnedv5.1.13/c45b007) takes the ambiguous-match branch when a removed TODO maps to >1 open issue, then prints each candidate withx["web_url"]. GitHub's REST issue object exposeshtml_url, notweb_url(web_urlis a GitLab field) →KeyError→ non-zero exit → red workflow.The trigger is duplicate issues with the same title — exactly the state the upstream scanner produces when one TODO is repeated across N files (it opens one issue per occurrence; see the dedup in platform-template#16). When such a TODO is later removed, the close path goes ambiguous and crashes.
Scope / severity
TODOswith a clean diff and goes green. It does not persistently red amain.mainfor that commit.v5.1.14(latest) leavesGitHubClient.pyunchanged vsv5.1.13(confirmed via thev5.1.13...v5.1.14compare — the file is not in the changeset), so the bug persists in the newest release.Proposed direction (pick one; sized S–M)
alstr/todo-to-issue-action(web_url→html_urlin the ambiguous-match diagnostic) and re-pin once fixed. Cleanest root-cause path, but gated on upstream cadence.platformrepo (which still carries the identical 5-file auth-proxy TODO).scan-for-todo-commentscan be made to distinguish them — needs investigation.Acceptance criteria
TODOsworkflow on any consumer repo.