Apply delete-then-recreate pattern for human token (matching admin token in PR #274).
Forge/Forgejo only returns sha1 at creation time; listing returns no sha1, causing
HUMAN_TOKEN to be silently empty on re-runs when token name already exists.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove ensure_blocked_label_id() from ci-helpers.sh; _ilc_ensure_label_id()
in issue-lifecycle.sh is the canonical, general implementation. Update the
stale comment that referenced the removed function.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove check_memory() from lib/formula-session.sh and update all *-run.sh scripts
to use memory_guard() from lib/env.sh.
Changes:
- lib/formula-session.sh: Removed check_memory() function and its documentation
- gardener/gardener-run.sh: Replaced check_memory(2000) with memory_guard(2000)
- planner/planner-run.sh: Replaced check_memory(2000) with memory_guard(2000)
- architect/architect-run.sh: Replaced check_memory(2000) with memory_guard(2000)
- predictor/predictor-run.sh: Replaced check_memory(2000) with memory_guard(2000)
- supervisor/supervisor-run.sh: Replaced check_memory(2000) with memory_guard(2000)
Benefits:
- Only one memory check function exists now
- All agents use the same function
- No dependency on free command - uses /proc/meminfo which is more portable
Capture exit code from claude invocations instead of suppressing with || true.
Log timeout (rc=124) and non-zero exits distinctly. Skip nudge when output is
empty (claude crashed or failed). Log empty output as a clear diagnostic message.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Delete any existing token with the same name before creating a fresh one,
so that sha1 is always returned by the create response. The list API does
not return sha1 (Forgejo redacts it for security), making the old fallback
unreliable.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Export actual_ops_slug from setup_ops_repo via _ACTUAL_OPS_SLUG global,
then update ops_repo in the TOML in-place using Python re.sub after TOML
creation or detection. Falls back to inserting after the repo line if the
key is missing. This prevents duplicate TOML keys on repeated init runs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>