Sync public mock environment fidelity#22
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf57ee206f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| SlackUser.workspace_id == workspace_id, | ||
| SlackUser.is_bot == False, | ||
| SlackUser.id != "USLACKBOT", | ||
| ) |
There was a problem hiding this comment.
Keep legacy bot tokens targeting bot presence
When AUTH_ENABLED is unset, this branch is the legacy path; by hard-coding the first non-bot user it ignores the Authorization header that resolve_current_user_id used here before. For POST /api/users.setPresence with Authorization: Bearer mock-bot-token or any non-user xoxb-style token, the old code updated B01MOCKBOT, but this now updates the first human user, so legacy Slack token behavior is no longer byte-identical. Reuse resolve_current_user_id in the auth-disabled branch.
Useful? React with 👍 / 👎.
Summary
benchflow.env0.servicesmetadata to every public benchmark task so the manifest can start only required mock services./dev/tasksweb viewer surfaces unpublished in the public repo while preserving CLI/manifest task execution.Validation
python3 -m unittest tests/test_env0_control.pyROOT=/Users/bingran_you/.codex/worktrees/e2b4/env-0-experiment/.local/audit-env0-vs-env-0-20260704/env0; PYTHONPATH=... uv run --extra dev python -m pytest "$ROOT"/tasks/*/verifier/test_*.py -q-> 379 passedcd packages/environments/mock-gmail && uv run --extra dev pytest tests -q-> 246 passedcd packages/environments/mock-gcal && uv run --extra dev pytest tests -q-> 140 passedcd packages/environments/mock-gdrive && uv run --extra dev pytest tests -q-> 321 passed, 2 skippedcd packages/environments/mock-gdoc && uv run --extra dev pytest tests -q-> 182 passed, 3 skippedcd packages/environments/mock-slack && uv run --extra dev pytest tests -q-> 335 passed, 4 skippedscripts/smoke_dev.shdocker/build-base.shPULL_BASE=0 scripts/smoke_docker_examples.shtasks/*/environment/Dockerfile-> all task docker checks ok