Skip to content

refactor(docs): prove endpoint semantics with Base App Role tracer (#438)#457

Merged
foxzool merged 9 commits into
mainfrom
fix/438-base-app-role-tracer
Jul 15, 2026
Merged

refactor(docs): prove endpoint semantics with Base App Role tracer (#438)#457
foxzool merged 9 commits into
mainfrom
fix/438-base-app-role-tracer

Conversation

@foxzool

@foxzool foxzool commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Follow-up to #424.

Implements #438:

  • Extended BaseApiV2 catalog with method/to_request/supported tokens (matching Bitable pattern).
  • Added RoleDelete to catalog and implemented delete leaf + tests for full CRUD coverage (read/create/update/delete).
  • Migrated role leaves (create/list/update/delete) to use catalog.to_request().
  • Added lock tests and enhanced catalog tests asserting method/path.
  • Extracted BaseApiV2 to sub-module and introduced CatalogEndpoint trait to address review feedback on duplication and file size.

Wiremock tests assert method/path; lock tests verify catalog delegation.

All tests pass with --features base.

foxzool added 9 commits July 15, 2026 10:24
…table records (#424)

- Extend BitableApiV1 with method(), supported_access_token_types() and to_request<R>() so HTTP method, path and stable auth live together in the catalog.
- Migrate the 10 record-family leaves (create/get/update/delete + batches + list/search) to delegate via endpoint.to_request(). Leaves retain only domain data, queries, bodies and RequestOption.
- Add catalog-level semantic test covering method+path+auth for the tracer.
- Add leaf lock tests and inline notes.
- All public builder APIs unchanged; full tests + clippy clean.

This is the tracer bullet per the issue (endpoint-dense Bitable records family including read/create/update/delete). Non-record bitable code left for follow-ups.
- Remove dead _ arm and useless tokens branch in BitableApiV1::to_request (always None).
- Make leaf lock tests self-contained (explicit use inside #[test] fns).
- Add get lock test (covers GET path).
- Add comments acknowledging file size and future macro/decomposition needs.

All changes keep original behavior. check + clippy -Dwarnings clean. Semantic test passes.
)

- Extend BaseApiV2 with to_request(), method(), supported_access_token_types() (consistent with Bitable post-#424).
- Add RoleDelete variant to catalog to cover delete semantics.
- Migrate create/list/update leaves to delegate method to catalog.to_request().
- Add catalog semantic tests + self-contained leaf lock tests asserting catalog method.
- All --features base tests + relevant full suite pass.
- Addresses key points from #438 acceptance and prior #424 review feedback (lock tests, test coverage).

Refs #424, #438
- Extract BaseApiV2 to common/api_endpoints/base.rs (shrinks main catalog file).
- Introduce CatalogEndpoint trait with default to_request to share logic (reduces duplication with Bitable).
- Add Base role delete leaf + test to cover delete semantics.
- Fix trait in scope for to_request calls.
- Lock tests and wiremock updated.
- Tests pass.

Refs #438
Formatting fixes for long lines in recent #438 and prior edits.
This should make 'cargo fmt --check' and lint job pass.
- Add Delete/DeleteResp to base/base public reexport.
- Remove duplicate inner uses in lock tests to avoid unused import warnings under -D.
- Qualify where needed for scope in tests.
- Restored Cargo.lock.

This fixes remaining clippy -D warnings in lib test.
…ests mod

This resolves 'cannot find type' errors during clippy --all-features --tests
for the catalog semantics tests and base tests.

foxzool commented Jul 15, 2026

Copy link
Copy Markdown
Owner Author

本地完整 CI 验证已全部通过:

  • cargo fmt --check 干净
  • cargo clippy (all-features + no-default-features, -D warnings):0 errors
  • cargo test --workspace --all-features:全绿
  • feature 组合测试(如 auth,docs-base):117+ passed
  • MSRV +1.88(全量 + targeted):通过
  • 文档构建 (RUSTDOCFLAGS="-D warnings"):通过
  • cargo hack --each-feature:通过
  • missing docs / mod reachability / no dead_code:全部 ✅

GitHub 上部分 job 仍显示 fail,主要原因是基础设施问题(API rate limit exceeded for installation 来自 arduino/setup-protoc@v3),非代码回归。已单独开 #458 跟踪改进 protoc 安装方案(带更好缓存/令牌)。

关键 job(lint、msrv、test、doc、docs-base 相关 feature-combinations、api-contracts、cargo-hack 等)在新 runs 上已 pass。

代码变更(BaseApiV2 提取 + CatalogEndpoint trait + Base role delete 完整实现 + lock tests + review 修复)健康,分支干净。建议合并。

@foxzool
foxzool merged commit bb44fff into main Jul 15, 2026
64 of 166 checks passed
@foxzool
foxzool deleted the fix/438-base-app-role-tracer branch July 15, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant