chore(release): pending release v0.44.3#653
Merged
Merged
Conversation
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.
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>
Co-authored-by: fro-bot[bot] <109017866+fro-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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