Repository navigation
build: make WebAuthn optional and validate feature combinations - #339
Conversation
必须处理项评审基于 1. [P1] 新增运行时测试依赖了常规 CI 未提供的服务器配置位置:tools/feature-matrix/check_runtime.py:29–30。
证据:三平台 CI、ASan+UBSan。 处理建议: 让 CTest 显式传入适用的配置路径,或在构建/测试准备阶段按 验收: 从干净的常规 preset 构建执行该测试,三平台与 sanitizer 全部通过,三个裁剪矩阵仍通过。 验证方式:远程 head 源码与 CI 原始失败日志核对;本轮未在本机重新编译 C++。 2. [P2] OFF → ON 重配置会遗留 SDK 消费者的 libcbor 禁用缓存位置:CMakeLists.txt:165–171、消费者构建目录:175–188。 WebAuthn=OFF 时给消费者缓存写入 处理建议: OFF/ON 两种状态都显式传入对应的 TRUE/FALSE,或在消费端配置前显式清除该缓存。 验收: 同一构建目录先运行 WebAuthn=OFF 的 SDK smoke,再正确切换 Conan/CMake 到 ON,并再次运行 smoke,应无需手动删除消费端缓存即可通过。此项根据 CMake 缓存和目录复用逻辑确认,本轮未执行完整切换构建。 |
建议处理项评审基于 1. 隔离探针子进程的监听端口环境变量位置:tools/feature-matrix/check_runtime.py:31–36、进程启动:54–55。 探针在 JSON 中设置随机端口,但 建议传入复制后的子进程环境,并将 其余检查:未确认其他源码裁剪、Conan 依赖或 SDK 导出缺陷;golden/OpenAPI 只裁剪预期集合、保留实际注册集合的检查方式合理。本轮为源码与远程 CI 证据评审,不代表重新执行完整矩阵。 |
78f31a0 to
ff58a36
Compare
Gate dependencies, implementation, tests and SDK exports consistently. Use explicit runtime config/resources and isolate probe listener ports. Reset SDK libcbor discovery on OFF/ON reconfiguration. Keep upstream-provider fixtures and expected route subsets aligned with WITH_SOCIAL, preserving full-feature baselines and actual routes. Read back committed fixture scopes before starting consent decisions, using a single write and bounded reads without weakening assertions. Cover collection, route helpers, probe isolation and CMake cache reuse.
ff58a36 to
ea648b2
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
S06-B: disabling WebAuthn previously still required libcbor and compiled the crypto/CBOR tests. Gate the Conan requirement, implementation, test collection and exported SDK dependency together, so OFF builds and external consumers work with libcbor discovery explicitly disabled.
Preserve the full-feature route baselines. Trimmed preservation tests compare the unfiltered actual registrations with the enabled subset of the frozen expected baseline; shared provider discovery/authorize routes remain available. Social OFF also excludes the repository fixture whose types already have WITH_SOCIAL guards.
Add a reproducible matrix runner and three trimmed Linux CI jobs. The runner audits the complete locked graph, source collection, feature flags and exports; requires the full applicable CTest registry/JUnit to pass without CTest skips and confirms live PostgreSQL/Redis readiness. It separately builds/runs fresh build-tree and installed SDK consumers and verifies their actual package/archive locations.
Type of change
Validation
The four-combination local results below are historical validation of the original B-side implementation on
d616a7b4; they are not a fresh full-matrix rerun after this follow-up.Local toolchain: GCC 13.3, C++17, Release with explicit resource override
-O1 -DNDEBUG, FULLA_WERROR=ON for targets using the existing warning helper. Offline Conan uses only the recorded local platform exceptioncmake/4.4.4#platform; all other graph revisions match the unchanged lock. New CI uses the strict lock without that exception. No local Windows/macOS/sanitizer result is claimed.API/architecture/migration/naming/macro/double-move/manage parity, OpenAPI validation/governance, actionlint, Python syntax/optimized-mode rejection, EN/zh mirror/link/LLM checks passed. Both final documentation locales built; unchanged frontend-i18n pages still report broken-anchor warnings. The client-generator inputs and generated clients are unchanged; version linkage passed, regeneration was unnecessary. Full CTest has zero CTest skips; existing conditional branches within test bodies remain and are not claimed as covered.
Checklist
The default public headers, API baseline, route fingerprint/golden, OpenAPI YAML/runtime JSON, dependency lock, schema/ORM and migrations are unchanged. The API-synchronization and release/version-bump checklists are not applicable. No identity-OFF decoupling, dependency upgrade, deployment or #300 investigation is included.
Review follow-up (2026-11-17)
Current head
ff58a365is based on master5dcc7a9a; the original patch was rebased cleanly with unchanged stable patch-id. Both required review findings and the listener-isolation suggestion are addressed:/api/admin/upstream-providersand/api/auth/oidc. Actual registrations, full-feature fingerprint/golden and shared provider/consent routes are unchanged.Current local validation: all 11 tool regressions executed without skips, including actual CMake OFF-to-ON cache/source-collection tests and C++17/WERROR probes using the real route header in both modes. Precise old behavior failures were retained. Actual project single/multi-config CTest paths were checked. Independent plan and implementation reviews passed after closing the integration findings.
A fresh Release/C++17/WERROR production server build (
-O1 -DNDEBUGresource override) and real all-features memory probe passed during the first follow-up, before the final test-collection/expected-subset changes; production sources and runtime inputs are identical. A conflicting parent listener port was explicitly set. This is not real PG/Redis or clean-shutdown acceptance. The original four-combination local table above remains historical.Preliminary head
dfa6e770passed three-platform CI, SDK smoke and ASan+UBSan; its Social OFF builds exposed the #347 integration fixed above. Intermediate78f31a0cthen passed both single-feature-OFF matrix legs and sanitizers, but the both-OFF main binary failed two empty-scope assertions in one existing consent contract case. Source inspection confirmed its setup API can return 200 before commit. The test fixture now sends the update once and observes the exact committed scope set through direct GETs within one three-second steady deadline before opening the decision transaction; transport/status/shape errors fail immediately. Original empty-scope, no-expansion, rollback, conflict and concurrency assertions are retained. No production transaction/cache behavior or shared retry helper changed. This timing explanation is consistent with the failure, not a dynamic capture of its commit instant.The changed real test TU passed C++17/Wall/Wextra/Werror syntax checking, including a Windows-style min macro probe under GCC; this is not an MSVC or full-test result. Final 11/11 tool regressions ran without skips. Independent implementation re-review passed with no remaining P0/P1.
Previous-head results are historical. Current runs: CI, optional matrix, sanitizers.
Local architecture/macro/manage checks and five preflight gates passed. Actual Python (352 files) and TS (16 files) regeneration passed on SDK inputs/outputs verified byte-identical across both review branches. Local pinned Go restoration stopped at the disk-space guard, with no result. The path-filtered clients-sdk workflow is not automatically triggered by this diff, so it was explicitly dispatched on the final branch to complete Go/Python/TS drift and unit checks; main Static Checks/SDK Smoke are separate checks. No gate/baseline was weakened. The explicitly dispatched Client SDKs passed all three Python/Go/TS drift/build/unit jobs on this exact head. Full main CI/matrix acceptance is still pending. Keep this PR draft; no merge or deployment.