Skip to content

fix: startup env handling and safe ephemeral replies - #154

Merged
toto04 merged 1 commit into
mainfrom
fix/pr-153-regressions
Sep 13, 2026
Merged

toto04 merged 1 commit into
mainfrom
fix/pr-153-regressions

Conversation

@lorenzocorallo

Copy link
Copy Markdown
Member

Summary

  • Allow production startup when .env is absent.
  • Restore cross-env as a runtime dependency.
  • Restrict ephemeral reply parameters to group chats and safely handle send failures.
  • Add coverage for group, private, and failed ephemeral replies.

Testing

  • Added Vitest coverage for ephemeral reply behavior.
  • Not run.

Keep cross-env available in production and treat the local env file as optional. Fall back to regular replies outside groups and absorb Telegram send failures.
@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e08eb478-2bc3-4169-8acb-60b424199a50

📥 Commits

Reviewing files that changed from the base of the PR and between c19842e and 0d9fbf1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • package.json
  • src/utils/messages.ts
  • tests/messages.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The start command now accepts a missing .env file, and cross-env is a runtime dependency. The ephemeral helper adds Telegram ephemeral parameters only for group and supergroup chats. Tests cover private chats, supergroups, and reply failures.

Changes

Startup configuration

Layer / File(s) Summary
Startup command and runtime dependency placement
package.json
The start script uses --env-file-if-exists=.env. cross-env moves from devDependencies to dependencies.

Ephemeral replies

Layer / File(s) Summary
Chat-specific ephemeral reply behavior
src/utils/messages.ts, tests/messages.test.ts
ephemeral adds ephemeral_message_parameters for group and supergroup chats, preserves options for private chats, and resolves to null when reply rejects. Tests cover these cases.

Priority: ➖ Normal

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 0d9fb

The startup command is compatible with the supported runtime, and ephemeral replies retain regular private-chat behavior while safely handling send failures. The change is ready to merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two main changes: startup environment handling and safe ephemeral replies.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@toto04 toto04 changed the title Fix startup env handling and safe ephemeral replies fix: startup env handling and safe ephemeral replies Sep 13, 2026
@toto04
toto04 merged commit 9aa66b5 into main Sep 13, 2026
1 of 2 checks passed
@toto04
toto04 deleted the fix/pr-153-regressions branch September 13, 2026 22:10
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.

2 participants