Skip to content

Question about expected runtime behavior of bub-feishu scripts in sandboxed environments #10

@not94

Description

@not94

When bub-feishu is used from Codex, commands are commonly executed inside a sandboxed environment rather than a normal interactive shell. In that setup, shell-provided environment variables may not always be inherited as expected.

This seems to expose two related issues in the packaged Feishu scripts:

Configuration loading is not fully aligned with the main channel runtime. In sandboxed execution, feishu_send.py / feishu_edit.py may fail to read BUB_FEISHU_APP_ID and BUB_FEISHU_APP_SECRET even when the workspace is configured correctly. A possible solution would be to let the packaged scripts load configuration from a workspace .env file as well, for example via python-dotenv, so their behavior is more consistent with the rest of bub-feishu.

The packaged scripts also depend on runtime packages such as httpx. In practice this works when they are executed via uv run, but direct execution with plain python can fail if those dependencies are not installed in the host interpreter.

For the first issue, using .env loading seems like a reasonable improvement. For the second issue, I do not have a clearly better solution yet, so I would mainly like the maintainer’s opinion: should these packaged scripts be considered uv run-only, and should that execution model be documented more explicitly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions