On polymarket-fetch bot boot, the bot sends a best-effort Telegram message announcing it started, embedding the short commit hash so the operator can confirm which build is live. A new build.rs captures that hash at compile time. Shipped 2026-06-04.

For Agents

  • Message: NA CSUMI CSUMI CSUMI, bot STARTED, REF: <short-sha> (the REF: segment is omitted entirely when no hash is available).
  • Bot-only — the scheduled-run path is untouched.
  • notifier::startup_message sends it; notifier::build_startup_message is the pure message-builder (testable, no I/O).
  • Hash is baked at build time by crates/polymarket-fetch/build.rs.

The startup ping

When the bot subcommand boots it fires a best-effort Telegram message:

NA CSUMI CSUMI CSUMI, bot STARTED, REF: <short-sha>

If no commit hash was captured at build time, the REF: segment is dropped and the message is just NA CSUMI CSUMI CSUMI, bot STARTED. build_startup_message is pure (takes the optional hash, returns the string) so the omit-when-empty logic is unit-testable.

build.rs SHA capture

A new crates/polymarket-fetch/build.rs resolves the short commit hash at build time, trying each source in order until one yields a value:

  1. env BUILD_GIT_HASH
  2. env GIT_HASH
  3. env GITHUB_SHA
  4. git rev-parse --short HEAD
  5. else emptyREF omitted

Deploy gotcha

Docker images built without .git and without a build-arg report NO sha

The fallback git rev-parse --short HEAD only works if .git is present in the build context. A typical slim Docker build copies source without .git, so unless you pass one of BUILD_GIT_HASH / GIT_HASH / GITHUB_SHA as an env/build-arg, the deployed bot will boot with an empty hash → no REF: in the startup ping.

Fix for deploy: pass GIT_HASH or GITHUB_SHA at image build so REF is populated. The CI release workflow already has GITHUB_SHA available — thread it through as a build-arg. See polymarket-fetch-deploy.