You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
drift_check sticky issue ignores --gh-token, can match the wrong issue, and passes body via argv #107
The scheduled drift-check keeps a sticky issue that summarizes ecosystem drift. Three problems make that path unreliable.
Evidence
The supplied token is ignored.scripts/drift_check/cli.py:420-433 requires --gh-token (or DRIFT_CHECK_TOKEN) in sticky mode, but calls issue.upsert_sticky_issue(...) without passing it. report/issue.py:46-53 (_default_gh_runner) runs gh with the ambient environment, so the write uses GH_TOKEN, GITHUB_TOKEN or the local login instead of the supplied token.
The lookup can match the wrong issue.report/issue.py:103-114 finds the existing issue with a GitHub full-text search for an HTML-comment marker, then takes items[0] without checking that its body actually contains the marker.
The body is passed via argv.--body (issue.py:174,186) can exceed the Windows 32K command-line limit or GitHub's 65,536-character body limit on a large report.
Suggested approach
Pass the token to the runner: env={**os.environ, "GH_TOKEN": token}.
Request body in --json and filter on the exact marker. Prefer a dedicated label as the primary key.
Use --body-file - and truncate oversized bodies, with a pointer to the workflow artifact.
Extend tests/test_issue_upsert.py, which already has a fake runner, to cover each case.
Activity