issue-agent: timeouts, checkpoint logging, run-link comment #161
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!161
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/issue-agent-observability"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
Issue-agent run 25090457215 stalled silently for 38 minutes inside
Prepare issue-agent hostbefore being cancelled. The step is one mega-script that runs ~6 unbounded sub-ops (git fetch/pull/clone of spire-lens-mcp,uv run python -m py_compile, dotnet build of the MCP, STS2 process stop, mod-deploy copies,restart-sts2.ps1) with zero output between them, so the GH log showed nothing past the last synchronous Write-Host. A future hang in any of the same family of sub-ops would behave identically.Also: when a run hangs before verification, the issue page stays silent because the only comment-posting site is
summarize-issue-agent.ps1at the end of the verification job. The lock-holder workflow used to post a "started" comment but #152 (glimmung migration) deleted it, and Glimmung itself doesn't post.Changes
.github/scripts/prepare-issue-agent-job.ps1Invoke-LoggedStephelper wraps each unbounded sub-op with::group::/::endgroup::+ BEGIN/END timestamped log lines so a hang always names itself in the GH log. Wrapped:git fetch/git checkout/git pull/git clone(4 separate wraps forspire-lens-mcp),uv run py_compile,build.ps1, the STS2 process-stop block, the mod-deploy copy block, andrestart-sts2.ps1.Out-File -Encoding utf8→utf8NoBOMon the 6GITHUB_ENVwrites that #159 missed. Behaviorally a no-op under pwsh (utf8 is BOM-free there by default) but matches #159's stated intent..github/scripts/prepare-issue-agent-scenario.ps1Invoke-LoggedStephelper. Wrapped each of the 6 sub-ops in the scenario setup pipeline (3 STS2 restart/stops + 3 MCP python invocations) so we know which one is in flight if one hangs..github/workflows/issue-agent.yamltimeout-minuteson every step (43 named steps, 43 timeouts). LLM steps kept their existing values; non-LLM steps got conservative caps sized to their unbounded operations:Turns the next silent stall into a failed step with logs.
::group::/::endgroup::markers around every dotnet build/test invocation in inline pwsh blocks (Build and test baseline main ×2 jobs, Build implementation checkout, Deploy implementation to STS2). Collapsible sections in the GH UI; safe becauseWrite-Hostdoesn't reset$LASTEXITCODE.Comment with run linkstep inclaim-issuepostsIssue-agent run started: <run url> (host: <label>)on the issue before any LLM/build work runs. Best-effort; emits::warning::rather than failing if the gh api call returns non-zero.Risk
timeout-minutesvalues may be too tight for cold-cache first-time runs on a brand-new runner. Sized to known warm-case duration plus comfortable margin; if a legitimately-slow op trips a timeout, raise the cap rather than removing it.Invoke-LoggedStepuses try/finally with no catch so exceptions propagate exactly as before;::endgroup::always closes so the GH UI doesn't get an unbalanced group.Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/issue-agent.yaml'))") — verified locally.issue-agentlabel on a relic-stat issue (e.g. #142 Akabeko) and confirm: a "run started" comment appears on the issue within a minute, the GH UI shows collapsible groups insideBuild and test baseline main, and any silent stall now surfaces asBEGIN: <name>/ never-END in the prep-host log.🤖 Generated with Claude Code