Skip to content

Repair the production deploy and stop Stampy posting unprompted - #337

Merged
bryceerobertson merged 1 commit into
masterfrom
deploy-repair-and-shy-mode
Sep 7, 2026
Merged

bryceerobertson merged 1 commit into
masterfrom
deploy-repair-and-shy-mode

Conversation

@bryceerobertson

Copy link
Copy Markdown
Member
  • Why: the live bot still runs code from before January 2026. The removal of the two question autoposts in Remove bot asking for stagnant questions #335 never shipped: the production deploy run on 27 January 2026 failed (https://github.com/StampyAI/stampy/actions/runs/21383699001) and was not retried. Stampy is still posting "Recently I've been wondering…" in #general and "Would any of you like to pick these up?" in #ai-safety-questions, plus unprompted band-name jokes.
  • Deploy helper: appleboy/ssh-action v0.1.2 → v1.2.5. v0.1.2 built a Docker image from Docker Hub on every run, the likeliest reason the January run failed; v1.2.5 is a plain composite action with the same inputs. Explicit command_timeout: 40m for the environment build, and a workflow_dispatch trigger so the deploy can be re-run from the Actions tab.
  • Safer order: the new conda environment is built before the running bot is stopped. If git pull or the build fails, the run goes red and the old bot keeps running. Environments get timestamped names; older timestamped ones are removed after a successful start, and the original stampy environment is left in place as a manual fallback.
  • Process handling: the runstampy loop is stopped before stam.py (so it cannot respawn the old bot), and the deploy shell is skipped by PID rather than by the previous 60-second age rule, which no longer holds once the build runs first. SSL_CERT_FILE points at the new environment's certifi bundle instead of a hard-coded path, and the offline notice is capped at two minutes.
  • Only speak when spoken to: BE_SHY is set for production, which makes the Silly and Random modules answer only when addressed, and Factoids now honours the same flag (it used to reply unprompted 30% of the time when a message matched a stored factoid). Addressed commands, stamps and the editors' review-request handling (@reviewer, @feedback) are unchanged.
  • Expected effect / how we'll know: after the deploy, Stampy posts "I just (re)started …" in #stampy-dev-priv with the new commit. There should then be no autopost in #ai-safety-questions on Friday 11 September, none in #general, and no more band-name replies.
  • Not tested on the server: nobody on this side has SSH access, so the first run of this workflow is the test. If the stored SSH credentials no longer work, the run fails at the connection step and nothing on the server changes.

🤖 Written by Claude Code

- Deploy helper appleboy/ssh-action v0.1.2 -> v1.2.5 (no Docker image build), 40-minute command timeout, manual workflow_dispatch trigger.
- Build the new conda environment before stopping the running bot; a failed pull or build now leaves the old bot running and fails the run.
- Timestamped environment names; earlier ones are removed after a successful start; the original "stampy" environment is kept as a fallback.
- Stop the runstampy loop before stam.py and skip the deploy shell by PID instead of the 60-second age rule.
- BE_SHY on in production, and Factoids respects it: Stampy only replies when addressed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@bryceerobertson
bryceerobertson merged commit 62ebc10 into master Sep 7, 2026
2 checks passed
@bryceerobertson
bryceerobertson deleted the deploy-repair-and-shy-mode branch September 7, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant