Skip to content

chore(release): pending release v0.44.3#653

Merged
marcusrbrown merged 8 commits into
releasefrom
next
May 20, 2026
Merged

chore(release): pending release v0.44.3#653
marcusrbrown merged 8 commits into
releasefrom
next

Conversation

@fro-bot
Copy link
Copy Markdown
Contributor

@fro-bot fro-bot Bot commented May 20, 2026

Pending Release: v0.44.3

This PR tracks changes pending release. Released on the next auto-release cycle (Sunday/Wednesday) or via manual dispatch.

Merge this PR to trigger a release. Releases also run automatically on Sunday/Wednesday at 20:00 UTC, or via manual workflow dispatch.

Commits Since Last Release


Auto-generated by the release pipeline. Updated: 2026-05-20 16:26 UTC

The gateway already reads the privileged-intents env var from
`$DISCORD_PRIVILEGED_INTENTS_FILE` (PR #651), but compose.yaml
didn't pass it through. Add the matching `_FILE` env line and a
long-syntax bind mount with `create_host_path: false` so missing
secret files fail at `docker compose up` time instead of silently
becoming directories. README now lists the `touch` step alongside
the other optional Discord secrets.
@fro-bot fro-bot Bot requested review from fro-bot and marcusrbrown as code owners May 20, 2026 07:12
The Renovate Dependency Dashboard kept logging a 'Hidden Unicode
characters' warning even after the prior fix that replaced flagged bytes
in dist/*.js with \uXXXX escapes. The detector runs before ignorePaths
filters, so any committed file under dist/ that contains characters from
Renovate's hidden-Unicode regex triggers the warning regardless of how
we tell Renovate to skip the path.

The next tsdown version flipped the default for emitting source maps,
which makes the bundler write dist/*.js.map files containing raw vendor
bytes (smart-quote artifacts in minimatch, the nbsp entry in the
fast-xml-parser HTML entity table). The escape plugin missed those
because it only processed .js files.

Two changes lock the door:

- Set sourcemap: false explicitly in tsdown.config.ts so the build
  output stays slim and reproducible across tsdown versions. The action
  runtime does not consume source maps, and committing them tripled the
  size of dist/ on the tsdown 0.22.0 branch.

- Widen the escape plugin to process every text file in dist/, with a
  small allowlist of binary extensions excluded to avoid round-trip
  corruption. Future Renovate-flagged content in any committed dist/
  file will be neutralized at build time.

dist/ rebuilds byte-identical with the current tsdown version, so this
ships as a config-only change with no bundle churn.
Three reliability improvements that landed from PR #649's review cycle:

- readiness flag now re-arms on Discord reconnect cycles. Previously the
  flag was written once via clientReady and persisted for the lifetime of
  the process, so a permanent disconnect (rate-limit ban, gateway
  revocation, network partition past discord.js's retry budget) left the
  healthcheck green forever. Now clientReady uses on (not once) so
  reconnects re-write the flag, and shardDisconnect clears it so the
  healthcheck goes red during outages.

- readOptionalSecret rejects values containing embedded newlines. AWS
  credentials copy-pasted from a wrapped terminal can land with mid-value
  newlines that pass trimEnd but break S3 request signing later with an
  opaque AWS error. The check applies symmetrically to file-read and
  env-var paths and throws with a clear, actionable message pointing to
  the file path or env var name.

- main.ts now exposes makeGatewayProgram as an injectable factory so the
  startup ordering between setupReadinessFlag and client.login is
  observable from a unit test. A reversal of that order would silently
  reintroduce the stale-flag bug; the new test fails fast if anyone moves
  the wiring.
readOptionalSecret previously read whatever file path the operator
pointed _FILE env vars at with no validation, which exposed three
production failure modes:

- Symlink to /etc/passwd or another sensitive file leaks its contents
  into config silently
- FIFO/named pipe makes readFileSync hang forever, blocking startup
- Character devices (/dev/zero, /dev/urandom) and oversized regular
  files exhaust memory

Add a hardened readSecretFile helper that lstats the path first (so
symlinks are detected, not followed) and rejects anything that isn't
a regular file under 4 KB. The size cap is generous for Discord
tokens, AWS keys, and OAuth refresh tokens, all of which are well
under that ceiling.

The ENOENT path still falls through to the env-var fallback so an
absent optional _FILE doesn't shadow a present env var.
Co-authored-by: fro-bot[bot] <109017866+fro-bot[bot]@users.noreply.github.com>
* build(dev): update dependency tsdown to v0.22.0

* build(dev): update dependency tsdown to v0.20.1

---------

Co-authored-by: fro-bot[bot] <109017866+fro-bot[bot]@users.noreply.github.com>
fro-bot Bot added 2 commits May 20, 2026 16:21
Co-authored-by: fro-bot[bot] <109017866+fro-bot[bot]@users.noreply.github.com>
@marcusrbrown marcusrbrown merged commit ddcc36a into release May 20, 2026
1 check passed
@marcusrbrown marcusrbrown deleted the next branch May 20, 2026 17:54
@fro-bot fro-bot mentioned this pull request May 20, 2026
46 tasks
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