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
#884 (ghx adoption) and #961 (REST fallback helpers + release_publish.py REST refactor) reduced the GraphQL burn rate, but they did not eliminate it. The remaining in-repo hotspot is the SCM stub / live SCM smoke path:
scripts/scm.py still shells out to gh issue list / gh issue view
tasks/scm.yml still documents the stub as a thin wrapper over ghx|gh issue list/view/close/edit
tests/integration/test_scm_smoke.py still exercises that live path against deftai/directive
When the shared GitHub GraphQL bucket is depleted, that smoke test fails and agent task check runs hit the same rate-limit wall even after #961 lands.
This issue is the narrow "remaining bucket drain" follow-up to #884 / #961, and the concrete near-term slice of the broader scm:* abstraction tracked in #881.
Problem
Directive still has at least one live path that depends on GraphQL-backed gh surfaces:
scripts/scm.py Story 1 stub (issue list, issue view, issue close, issue edit) is a direct subprocess wrapper around ghx|gh issue ...
the smoke test tests/integration/test_scm_smoke.py::test_scm_issue_view_returns_nonempty_json shells out through that wrapper to prove the round-trip
Today, after #961 landed, the shared GraphQL bucket still re-exhausted. The clearest repo-local symptom was:
Profiling / live inspection showed scripts/scm.py still wraps raw gh issue list/view rather than a REST helper.
While filing docs: surface refinement/triage workflow to end users (Phase 0 / cache / ingest) #979 today (a routine gh issue create) the call failed with GraphQL: API rate limit already exceeded; the REST fall-through (gh api -X POST repos/.../issues --input <json>) succeeded immediately. Concrete confirmation that even simple maintainer workflows are now GraphQL-coupled in ways the user does not see until the bucket is empty.
Proposed scope
Remove GraphQL-backed gh issue list / gh issue view dependence from the SCM stub where possible.
Preferred: explicit gh api REST endpoints
Acceptable: route through scripts/gh_rest.py where the helper surface already exists, and extend that module only if the extension fits the issue/PR charter cleanly
Make tests/integration/test_scm_smoke.py bucket-aware.
If the smoke still requires GraphQL after the SCM refactor, skip cleanly when graphql.remaining == 0
Preferably, make the smoke exercise a REST-backed path instead so GraphQL depletion no longer fails unrelated PRs
Document the remaining GraphQL-only surfaces explicitly so future agents know which operations are budgeted and which are accidental drain
Complementary mitigation
Per-identity credential separation for swarm workers has been carved out into
its own issue: #983. That track is complementary to and does not block the
SCM/REST migration in this issue.
Implementing per-identity credential plumbing in this PR -- the credential-separation work above is a complementary track, not a blocker for the REST migration
Summary
#884 (ghx adoption) and #961 (REST fallback helpers +
release_publish.pyREST refactor) reduced the GraphQL burn rate, but they did not eliminate it. The remaining in-repo hotspot is the SCM stub / live SCM smoke path:scripts/scm.pystill shells out togh issue list/gh issue viewtasks/scm.ymlstill documents the stub as a thin wrapper overghx|gh issue list/view/close/edittests/integration/test_scm_smoke.pystill exercises that live path againstdeftai/directiveWhen the shared GitHub GraphQL bucket is depleted, that smoke test fails and agent
task checkruns hit the same rate-limit wall even after #961 lands.This issue is the narrow "remaining bucket drain" follow-up to #884 / #961, and the concrete near-term slice of the broader
scm:*abstraction tracked in #881.Problem
Directive still has at least one live path that depends on GraphQL-backed
ghsurfaces:scripts/scm.pyStory 1 stub (issue list,issue view,issue close,issue edit) is a direct subprocess wrapper aroundghx|gh issue ...tests/integration/test_scm_smoke.py::test_scm_issue_view_returns_nonempty_jsonshells out through that wrapper to prove the round-tripToday, after #961 landed, the shared GraphQL bucket still re-exhausted. The clearest repo-local symptom was:
task checkon the feat(scripts): gh_rest.py — REST fallback helpers for gh mutations and reads when GraphQL is exhausted #961 P1-fix branch failed only becausetests/integration/test_scm_smoke.py::test_scm_issue_view_returns_nonempty_jsonhit live GraphQL withgraphql=0/5000So:
ghusageImportant distinction
Not every GraphQL consumer is removable:
markPullRequestReadyForReview(gh pr ready) is GraphQL-only on GitHub's sideThose are unavoidable and should be minimized / budgeted.
The SCM stub path is different: it is an avoidable GraphQL drain and should move to explicit REST or be skipped when the bucket is empty.
Evidence from this session
gh api rate_limitrepeatedly showedgraphql=0/5000whilecoreremained healthy.task release:publish -- 0.26.1failed before feat(scripts): gh_rest.py — REST fallback helpers for gh mutations and reads when GraphQL is exhausted #961 becauserelease_publish.pycalledgh release view/gh release edit(GraphQL). feat(scripts): gh_rest.py — REST fallback helpers for gh mutations and reads when GraphQL is exhausted #961 fixed that.task checkfor the P1-polish branch still failed only attests/integration/test_scm_smoke.py, proving another GraphQL-backed path remains.scripts/scm.pystill wraps rawgh issue list/viewrather than a REST helper.gh issue create) the call failed withGraphQL: API rate limit already exceeded; the REST fall-through (gh api -X POST repos/.../issues --input <json>) succeeded immediately. Concrete confirmation that even simple maintainer workflows are now GraphQL-coupled in ways the user does not see until the bucket is empty.Proposed scope
gh issue list/gh issue viewdependence from the SCM stub where possible.gh apiREST endpointsscripts/gh_rest.pywhere the helper surface already exists, and extend that module only if the extension fits the issue/PR charter cleanlytests/integration/test_scm_smoke.pybucket-aware.graphql.remaining == 0Complementary mitigation
Per-identity credential separation for swarm workers has been carved out into
its own issue: #983. That track is complementary to and does not block the
SCM/REST migration in this issue.
Non-goals
scm:*redesign across all platforms (that is feat(processes): establish scm:* task namespace — agent-safe, platform-abstract, JSON-native SCM operations #881)Why this should exist separately from #881
#881 is the broad strategic abstraction issue.
This issue is the tactical reliability slice:
task checkflowRelated
scm:*task namespace / abstractionrelease_publish.pyREST refactor