Skip to content

chore: promote staging to staging-promote/14333e4a-24631327376 (2026-04-19 15:01 UTC)#2682

Merged
henrypark133 merged 3 commits intomainfrom
staging-promote/5fe3be8d-24631759358
Apr 21, 2026
Merged

chore: promote staging to staging-promote/14333e4a-24631327376 (2026-04-19 15:01 UTC)#2682
henrypark133 merged 3 commits intomainfrom
staging-promote/5fe3be8d-24631759358

Conversation

@ironclaw-ci
Copy link
Copy Markdown
Contributor

@ironclaw-ci ironclaw-ci Bot commented Apr 19, 2026

Auto-promotion from staging CI

Batch range: 7fb41555a9e55677d1aaea29ca567a5b369c2b05..5fe3be8dcefdc24b3f67aa366617779ff07441a2
Promotion branch: staging-promote/5fe3be8d-24631759358
Base: staging-promote/14333e4a-24631327376
Triggered by: Staging CI batch at 2026-04-19 15:01 UTC

Commits in this batch (12):

Current commits in this promotion (0)

Current base: main
Current head: staging-promote/5fe3be8d-24631759358
Current range: origin/main..origin/staging-promote/5fe3be8d-24631759358

  • (no non-merge commits in range)

Auto-updated by staging promotion metadata workflow

Waiting for gates:

  • Tests: pending
  • E2E: pending
  • Claude Code review: pending (will post comments on this PR)

Auto-created by staging-ci workflow

reidliu41 and others added 3 commits April 19, 2026 23:36
- Gate webhook, WASM, Signal, HTTP, gateway, tunnel, and orchestrator startup behind --cli-only
  - Restore the expected --cli-only contract so no non-CLI listeners bind or expose services
  - Prevent unintended network exposure from fallback listeners and managed tunnels
  - Stop registering job_prompt when no orchestrator is running to consume prompts
  - Fix sandbox readiness reporting under --cli-only so it reports disabled, not unavailable
  - Centralize the guard through non_cli_channels_enabled() for consistent startup behavior
  - Add regression coverage for unguarded network startup paths in async_main
  - Document --cli-only listener suppression in NETWORK_SECURITY.md
#1947) (#2008)

`&tool.description[..57]` panics when byte 57 is inside a multi-byte
character (CJK = 3 bytes, emoji = 4 bytes). Replace with
`floor_char_boundary()` which walks back to the nearest valid boundary.

Also fixes the same pattern in `config/channels.rs` where
`&scope[..32]` could panic on non-ASCII OAuth scopes.

Adds 4 regression tests: ASCII, CJK, emoji, and mixed-boundary
truncation.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-authored-by: willamhou <willamhou@ceresman.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
…2680)

Biggest single-slice migration in the epic: ten chat handlers + every
chat-private helper + all chat helper-tests leave `server.rs` for a
new `src/channels/web/features/chat/` module.

Routes carried over end-to-end (no behavior change):

- POST /api/chat/send, /api/chat/approval, /api/chat/gate/resolve
- POST /api/chat/auth-token, /api/chat/auth-cancel  (legacy v1 shims)
- GET  /api/chat/ws, /api/chat/events
- GET  /api/chat/history, /api/chat/threads
- POST /api/chat/thread/new

Chat-private helpers that moved along with the handlers:

- `is_local_origin` (CSRF-gate for the WS upgrade)
- `pending_gate_extension_name` → routes through the canonical
  `AuthManager::resolve_auth_flow_extension_name` (the identity
  invariant called out in `src/channels/web/CLAUDE.md` + check #8 in
  `scripts/pre-commit-safety.sh`); the wrapper is preserved
  byte-identical so the "one resolver" rule holds after the move.
- In-progress reconciliation chain: `reconcile_in_progress_with_turns`,
  `in_progress_matches_turn`, `in_progress_from_metadata`,
  `is_stale_in_progress`, `completed_turn_is_newer_than_in_progress`,
  `in_progress_from_thread`, `summary_live_state`.
- `turn_info_from_in_memory_turn`, `thread_state_label`,
  `turn_state_label`, `IN_PROGRESS_STALE_AFTER_MINUTES`.
- `HistoryQuery`, `ChatEventsQuery` request DTOs and
  `extract_last_event_id` helper.
- `engine_pending_gate_info` / `history_pending_gate_info` gate-info
  hydrators.

Tests: 15 helper-level tests (5 reconcile, 2 in-memory-turn-info, 2
summary-live-state, 1 thread-state-label, 5 is-local-origin) move with
the helpers into `features/chat/mod.rs::tests`. 8 caller-level tests
(chat_history × 3, chat_approval, chat_auth_token × 2, chat_auth_cancel,
chat_gate_resolve) stay in `server.rs::tests` for now because they rely
on shared `GatewayState` builders (`test_gateway_state`,
`test_gateway_state_with_store_and_session_manager`,
`test_gateway_state_with_dependencies`) that construct state for
multiple slices — promoting those builders to
`src/channels/web/test_helpers.rs` is a follow-up. Also dropped 3
`test_build_turns_from_db_messages_*` tests in `server.rs` that were
redundant with the 14 already in `util.rs::tests`.

Cleanup of dead code: `src/channels/web/handlers/chat.rs` deleted
entirely. The file held live `chat_events_handler` +
`extract_last_event_id` + `ChatEventsQuery` (absorbed into
`features/chat/`), plus three zombie duplicate handler definitions
(`chat_ws_handler`, `chat_threads_handler`, `chat_new_thread_handler`)
that predated the `server.rs` canonicals but were never deleted — one
of them (`chat_ws_handler`) used a weaker `is_local_origin` heuristic
that skipped IPv6-literal parsing, so accidentally wiring through it
would have been a silent security degradation. The router.rs imports
and `handlers/mod.rs` declaration are updated accordingly.

Router updates: nine `server::` imports swapped for `features::chat::`,
plus the `handlers::chat::chat_events_handler` import removed (now
`features::chat::chat_events_handler`). The migration docstring above
the feature-handler imports lists chat as extracted alongside logs /
oauth / pairing / status.

Quality gate: fmt clean, clippy clean on `--all --tests --examples
--all-features`, 424 `channels::web` tests pass, boundary checker
reports no back-edges with the existing empty allowlist.

Net shape: `server.rs` shrinks from ~5,770 → ~3,620 lines (-2,150
lines). `handlers/chat.rs` goes from 432 → 0.

Explicit non-scope (noted in the migration plan):

- Four handlers (`chat_send`, `chat_ws`, `chat_threads`, `chat_new_thread`)
  gate side effects and currently have no caller-level test. Adding
  them is genuine new coverage, not regression preservation — a
  follow-up PR. The helper-level tests that DO cover things
  (`is_local_origin`, `reconcile_*`, `turn_info_from_in_memory_turn`,
  `summary_live_state`, `thread_state_label`) move with their helpers.
- The pre-existing `engine_v2` / `engine_v2_enabled` duplicate in
  `GatewayStatusResponse` (flagged on PRs #2665 and earlier) still
  needs a coordinated frontend fix and isn't touched here.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added scope: channel/cli TUI / CLI channel scope: channel/web Web gateway channel scope: docs Documentation size: XL 500+ changed lines risk: medium Business logic, config, or moderate-risk modules contributor: core 20+ merged PRs labels Apr 19, 2026
@claude
Copy link
Copy Markdown

claude Bot commented Apr 19, 2026

Code review

No issues found.

Base automatically changed from staging-promote/14333e4a-24631327376 to main April 21, 2026 03:18
@henrypark133 henrypark133 merged commit 5fe3be8 into main Apr 21, 2026
58 of 66 checks passed
@henrypark133 henrypark133 deleted the staging-promote/5fe3be8d-24631759358 branch April 21, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: medium Business logic, config, or moderate-risk modules scope: channel/cli TUI / CLI channel scope: channel/web Web gateway channel scope: docs Documentation size: XL 500+ changed lines staging-promotion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants