Skip to content

chore: promote staging to staging-promote/9ea65a5c-24606711930 (2026-04-18 14:49 UTC)#2650

Open
ironclaw-ci[bot] wants to merge 1 commit intostaging-promote/9ea65a5c-24606711930from
staging-promote/695e6fa1-24607103256
Open

chore: promote staging to staging-promote/9ea65a5c-24606711930 (2026-04-18 14:49 UTC)#2650
ironclaw-ci[bot] wants to merge 1 commit intostaging-promote/9ea65a5c-24606711930from
staging-promote/695e6fa1-24607103256

Conversation

@ironclaw-ci
Copy link
Copy Markdown
Contributor

@ironclaw-ci ironclaw-ci bot commented Apr 18, 2026

Auto-promotion from staging CI

Batch range: a53eac5c2dec6b6cd5c08189086093fde64aa9cb..695e6fa13e289a78ab41515e6ce698a5503c7202
Promotion branch: staging-promote/695e6fa1-24607103256
Base: staging-promote/9ea65a5c-24606711930
Triggered by: Staging CI batch at 2026-04-18 14:49 UTC

Commits in this batch (117):

Current commits in this promotion (1)

Current base: staging-promote/9ea65a5c-24606711930
Current head: staging-promote/695e6fa1-24607103256
Current range: origin/staging-promote/9ea65a5c-24606711930..origin/staging-promote/695e6fa1-24607103256

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

…h/ — ironclaw#2599 stage 4a (#2645)

Fourth increment of the ironclaw#2599 platform/feature split. Opens
the `features/` subtree with the OAuth feature slice — the first
vertical slice to move out of server.rs into its own module under
the ironclaw#2599 target layout.

Slice contents:

- `features/oauth/mod.rs` owns the three public gateway routes
  that receive OAuth-style callbacks:
  * `oauth_callback_handler` — generic OAuth callback for
    installable extensions (CSRF lookup, token exchange, storage,
    optional auto-activation).
  * `relay_events_handler` — HMAC-signed webhook from channel-relay.
  * `slack_relay_oauth_callback_handler` — Slack-specific relay
    completion flow.
- Slice-private helpers `oauth_error_page` and
  `redact_oauth_state_for_logs` move with the slice (they have no
  other callers).

Wiring:

- `platform/router.rs` imports the three handlers from
  `features::oauth` instead of `server`; no route-table change.
- `channels/web/mod.rs` registers `pub(crate) mod features;`.
- `server.rs` loses the three handlers and their helpers, plus the
  imports they owned (`Sha256`, `Digest`, `HeaderMap`,
  `DEFAULT_RELAY_NAME`, `extension_name_candidates`,
  `SecretConsumeResult`). The test module re-imports the ones it
  still uses for the integration-level OAuth callback tests.

Pure move. No behavior change. Each handler body is byte-identical
to its pre-move counterpart. Every test in `server.rs` that exercises
the OAuth callbacks (`test_oauth_callback_missing_params`, etc.)
continues to pass against the re-imported handlers.

Stats: server.rs 6973 → 6248 lines (−725); new `features/oauth/mod.rs`
is 775 lines; new `features/mod.rs` 14 lines. The +30 delta is
comment headers documenting the slice boundary.

Verified: `cargo fmt --all`;
`cargo clippy --all --benches --tests --examples --all-features`
clean; `python3 scripts/check_no_panics.py` clean;
`cargo test --lib` 5069 passed (one more than stage 3 — the new
`css_handler_returns_base_in_multi_tenant_mode` test from staging
lands green), same 2 pre-existing failures carried over (fixture
and test-infra issues unrelated to gateway layout).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added 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 18, 2026
@claude
Copy link
Copy Markdown

claude bot commented Apr 18, 2026

Code review

Found 4 issues:

  1. [HIGH:75] Off-by-one in Slack team_id length validation. Comment states "max 20 chars" but code allows 21 characters. The check should be <= 20, not <= 21.

https://github.com/anthropics/ironclaw/blob/695e6fa13e289a78ab41515e6ce698a5503c7202/src/channels/web/features/oauth/mod.rs#L611-L616

let team_id = params.get("team_id").cloned().unwrap_or_default();
if !team_id.is_empty() {
    let valid_team_id = team_id.len() <= 21  // Should be <= 20
  1. [MEDIUM:75] Back-edge dependency on server.rs violates platform-vs-features layering. Per src/channels/web/CLAUDE.md (lines 33-38), feature modules must depend only on platform/ submodules, but line 35 imports clear_auth_mode from server.rs. This should either be moved to platform/ as a platform-level service or refactored locally in the oauth feature.

https://github.com/anthropics/ironclaw/blob/695e6fa13e289a78ab41515e6ce698a5503c7202/src/channels/web/features/oauth/mod.rs#L33-L37

use crate::channels::web::server::clear_auth_mode;
  1. [LOW:50] Stringly-typed query parameter handling uses Query<HashMap<String, String>> (lines 82, 596). Per .claude/rules/types.md, domain values crossing module boundaries should use newtypes/enums. While consistent with pre-existing code, this is a type-driven improvement for future refactors.

https://github.com/anthropics/ironclaw/blob/695e6fa13e289a78ab41515e6ce698a5503c7202/src/channels/web/features/oauth/mod.rs#L82-L84

Query(params): Query<std::collections::HashMap<String, String>>,
  1. [LOW:50] Helper function documentation. Lines 47-107 define oauth_error_page and redact_oauth_state_for_logs as private (correct), but the module-level doc comment could be strengthened with #[doc(hidden)] or explicit markers if adopted across feature slices.

https://github.com/anthropics/ironclaw/blob/695e6fa13e289a78ab41515e6ce698a5503c7202/src/channels/web/features/oauth/mod.rs#L20-L22

//! The helpers below (`oauth_error_page`, `redact_oauth_state_for_logs`)
//! are slice-local and must not be called from outside this module.

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/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.

1 participant