Files
codex/codex-rs/app-server/BUILD.bazel
T
jif c983e8d171 Deliver detached message board notices to native agents (#63354)
## Why

The detached SQLite message board could store posts but could not notify
the agents named in `agents_to_notify`.

## What changed

Add an optional `--app-server ws://127.0.0.1:PORT` flag to
`codex-message-board-mcp`. When configured, the board uses
`thread/inject_items` to queue notices in native agent mailboxes without
starting a turn. The board and app-server must share the same Codex
registry.

Delivery is best-effort. Posts stay stored if a notice fails, and the
next notice can reconnect without replaying the failed one.

## Testing

Cover concurrent requests, notice size limits, and reconnect after a
timeout without replay. Exercise the detached executable against a
restarted app-server and verify that a native child receives the queued
notice once when it resumes.

GitOrigin-RevId: 8b890b30df94590686d91921d814887eda5d9c9b
2026-11-23 15:13:44 +00:00

36 lines
1.2 KiB
Python

load("//:defs.bzl", "codex_rust_crate")
load("//bazel/rules:runtime_package.bzl", "release_binary")
codex_rust_crate(
name = "app-server",
crate_name = "codex_app_server",
extra_binaries = [
"//codex-rs/bwrap:bwrap",
"//codex-rs/cli:codex",
"//codex-rs/code-mode-host:codex-code-mode-host",
"//codex-rs/message-board-mcp:codex-message-board-mcp",
"//codex-rs/rmcp-client:test_stdio_server",
],
integration_test_timeout = "long",
run_tests_with_wine_exec = True,
test_shard_counts = {
# Note app-server-all-test has a large number of integration tests, so
# even a single shard can be quite slow. When there is a legitimate
# test failure in a shard, it will still get run 3x in total, which
# can cause us to exhaust our CI timeout if the shard happens to run
# long. Using a higher shard count for app-server-all-test should help
# mitigate this risk.
"app-server-all-test": 16,
"app-server-unit-tests": 8,
},
test_tags = ["no-sandbox"],
test_threads = select({
"@platforms//os:macos": 1,
"//conditions:default": 0,
}),
)
release_binary(
binary = ":codex-app-server",
)