feat: Cargo workspace restructure with unified binary opt-in#1146
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
7d73041 to
db24433
Compare
… path, smoke test - F1: Add `cargo clippy --workspace --features unified` step to CI - F3: Update build-gateway.yml release notes to reflect unified binary - F4: Fix release notes path gateway/README.md → crates/openab-gateway/ - F5: Add BUILD_MODE=unified variant to docker-smoke-test matrix
…ns, gateway status - Restore ctl_shard, ctl_registry, ctl_handle definitions + spawn/cleanup (擺渡 F1+F2) - Add Dockerfile.gateway for standalone gateway backward compat (擺渡 F3+F5) - Restore extract_mentions + propagate_mentions_to_chunks for Discord multi-chunk (覺渡 F3) - Restore reactions.mapping field + shortcode resolution (覺渡 F5) - Restore GwAttachment.status field + rejection-handling logic (覺渡 F6) - archive_thread: confirmed no callers exist, safe to leave removed (覺渡 F4)
- Add crates/openab-gateway/src/main.rs as standalone binary target (Option 1) - Update Dockerfile.gateway to build openab-gateway binary (not unified) - Update build-gateway.yml to use Dockerfile.gateway - Restore transient session-load retry logic in pool.rs (普渡 F3) - Restore Feishu CardKit v2 streaming + feishu_card module (普渡 F5) - Restore LINE audio support (普渡 F6) - Sync all gateway adapters with main to prevent further regressions - Add clarifying comment for shutdown path cfg gating (普渡 F1)
Prevents compile errors when building with custom feature subsets (e.g. --features feishu only).
This comment has been minimized.
This comment has been minimized.
|
LGTM ✅ — Clean workspace restructure with zero breaking change to defaults. Phase 1 is correctly scoped as compile-time-only. What This PR DoesConverts the monolithic single-crate project into a Cargo workspace ( How It Works
Findings
What's Good (🟢)
Baseline Check
|
- ctl.rs uses serde/serde_json/async_trait directly - Fix crate::adapter → openab_core::adapter import - Replace archive_thread call (removed from trait) with error response
…ix slack call - Handler struct in openab-core doesn't have ctl_shard/ctl_registry fields - run_slack_adapter takes HashSet<String> not Arc<dyn AllowListSource> - Remove unused allow_list module from root binary
|
LGTM ✅ — Well-structured workspace migration with zero breaking changes to default builds. What This PR DoesImplements ADR #1116: migrates the flat How It Works
Findings
Baseline Check
What's Good (🟢)
|
Without this, cargo uses the stale empty stub lib.rs from the dependency-cache layer, causing all openab_core imports to fail.
… stage The adapter-builder stage builds agy-acp (separate crate) and doesn't have crates/openab-core — the sed replacement incorrectly added those paths to this stage too.
Rebased 8 feature commits cleanly onto upstream/main (15 new commits including Cargo workspace restructure openabdev#1146, slack allow-list refactor openabdev#1152, adapter fix openabdev#1153). Auto-merged into crates/openab-core/ new layout. All tests pass, clippy clean.
Summary
Implements the workspace restructure proposed in ADR #1116 — separate binaries with opt-in unified build.
cargo buildanddocker build .produce the exact same binary as before (Discord + Slack only). All existing Dockerfile.* images continue to work as-is. This PR is purely additive — it enables new build modes without changing any defaults.Why This Matters
--build-arg FEATURES=discord,telegram— one container, doneFEATURESbuild-argcargo clippy --workspace --features unifiedcatches everything in one passTL;DR: Phase 1 unifies the workspace and build system. Phase 2 will wire up the runtime so
BUILD_MODE=unifiedactually serves webhook traffic.Changes
Workspace Layout
crates/openab-gateway/— gateway adapters (Telegram, LINE, Feishu, Google Chat, WeCom, Teams)Cargo.toml— workspace + final binary with feature flag routingFeature Flags (root binary)
defaultunifiedtelegramlinefeishugooglechatwecomteamssecrets-awsagentcoreCargo Build Examples
Docker Build Examples
All
Dockerfile.*now accept an optionalFEATURESbuild-arg.Agent Images with FEATURES
Image Tagging Convention
Single registry repo:
ghcr.io/openabdev/openabTag format:
<version>-<variant>Tag Lifecycle
stable-*beta-*mainlatest-*beta-*<semver>-*pr<N>-*Design Decisions
openab, no repo sprawlstableor<semver>--build-arg FEATURES=...Related