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
Issue the job token for the job's own timeout-minutes; keep a workflow's own enterprise token #70
The upstream-runner job token lives for a job's timeout plus 5 minutes, capped at 24 hours (job_token_service.job_token_lifetime). It reads timeout_minutes from the job, but WorkflowJob has no such column. workflow_service parses timeout-minutes into the job dict and never stores it.
So every job's token uses the default: 360 + 5 minutes.
Job
Token lifetime
Effect
timeout-minutes: 30
365 min
Longer than the job may run
timeout-minutes over 360
365 min
Expires before the job may end. From plan version 8, the job's completion report then gets 401
GitHub's job token is valid until the job ends.
A second, smaller item in the same area: _with_gh_enterprise_token mirrors GH_TOKEN/GITHUB_TOKEN into each enterprise variable separately. A step that sets only GITHUB_ENTERPRISE_TOKEN still gets GH_ENTERPRISE_TOKEN mirrored from GH_TOKEN. gh reads GH_ENTERPRISE_TOKEN first, so it uses the mirrored token, not the one the workflow chose.
Proposed change
Add workflow_jobs.timeout_minutes (nullable integer, NULL = default), with a migration on the current Alembic head.
Set it at job creation from the parsed timeout-minutes. Copy it to matrix instances in workflow_scheduler.
Mirror into the enterprise variables only when the workflow set neither of them.
Tests:
Jobs created from workflow YAML, with timeout-minutes: 30 and with none. Check the stored value, job_token_lifetime, and the issued token's exp - iat.
A step with GITHUB_ENTERPRISE_TOKEN and GH_TOKEN: no GH_ENTERPRISE_TOKEN is added.
The problem description and proposed change here are clear, but the code they target is not on the main branch yet. The job-token lifetime logic that reads a job's timeout, and the step environment helper that mirrors the enterprise token variables, are both introduced by the open PR #34. On main, the parsed timeout-minutes is only placed in the job dict in workflow_service.py and is never stored.
This work therefore has to wait until #34 merges. #34 introduces the code under review rather than fixing this issue, so it is a prerequisite and not an in-flight fix. Once it lands, this issue can be re-triaged and implemented as described.
Notes for the implementer:
The new workflow_jobs.timeout_minutes migration must be based on the Alembic head at that time, which may differ from the current head if other migrations land first.
Matrix instances created in workflow_scheduler need the value copied too.
Unblocking: the prerequisite PR #34 merged on 2026-11-19. Re-verified against current main: timeout-minutes is parsed into the job dict (workflow_service.py) but there is no workflow_jobs.timeout_minutes column and the job-token lifetime does not consult it — the issue is still fully open.
Implementer notes from the original triage: base the new Alembic migration on the head at the time (it has moved since); copy the value for matrix instances created in the scheduler; the step environment helper should keep mirroring the enterprise-token variables.
Activity
fullsend-ai-triage commentedon Nov 19, 2026
🤖 Finished Triage · ✅ Success · Started 6:01 PM UTC · Completed 6:03 PM UTC
Commit:
1deccc8· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.17
fullsend-ai-triage commentedon Nov 19, 2026
The problem description and proposed change here are clear, but the code they target is not on the main branch yet. The job-token lifetime logic that reads a job's timeout, and the step environment helper that mirrors the enterprise token variables, are both introduced by the open PR #34. On main, the parsed
timeout-minutesis only placed in the job dict inworkflow_service.pyand is never stored.This work therefore has to wait until #34 merges. #34 introduces the code under review rather than fixing this issue, so it is a prerequisite and not an in-flight fix. Once it lands, this issue can be re-triaged and implemented as described.
Notes for the implementer:
workflow_jobs.timeout_minutesmigration must be based on the Alembic head at that time, which may differ from the current head if other migrations land first.workflow_schedulerneed the value copied too.Blocked by:
jctanner commentedon Dec 3, 2026
Unblocking: the prerequisite PR #34 merged on 2026-11-19. Re-verified against current main:
timeout-minutesis parsed into the job dict (workflow_service.py) but there is noworkflow_jobs.timeout_minutescolumn and the job-token lifetime does not consult it — the issue is still fully open.Implementer notes from the original triage: base the new Alembic migration on the head at the time (it has moved since); copy the value for matrix instances created in the scheduler; the step environment helper should keep mirroring the enterprise-token variables.
jctanner commentedon Dec 3, 2026
/fs-code
fullsend-ai-coder commentedon Dec 3, 2026
🤖 Finished Code · ✅ Success · Started 2:23 PM UTC · Completed 2:47 PM UTC
Commit:
0454bac· View workflow run →Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $2.35
fix(#70): make timeout-minutes normalization total
Merge pull request #135 from fullsend-ai/agent/70-job-token-timeout-m…