Skip to content

Extract remaining ClickStack API models and finalize the library split - #396

Merged
sdairs merged 1 commit into
issue-378-clickstack-enumsfrom
issue-376-clickstack-models-finalize
Aug 13, 2026
Merged

Extract remaining ClickStack API models and finalize the library split#396
sdairs merged 1 commit into
issue-378-clickstack-enumsfrom
issue-376-clickstack-models-finalize

Conversation

@sdairs

@sdairs sdairs commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #376

Summary

  • Extract all remaining ClickStack resource structs, aliases, discriminated unions, and manual defaults into a private domain module.
  • Reduce models.rs to a 251-line private-module facade while preserving all crate-root and models::* paths.
  • Preserve ClickStack Serde behavior, response tolerance, union dispatch, conversions, cfg markers, and analyzer inventory byte-for-byte.
  • Document the final per-domain client/model/conversion layout and module-aware analyzer behavior.

Tests

  • cargo fmt --all --check
  • cargo test -p clickhouse-cloud-api -p clickhouse-openapi-analyzer
  • cargo clippy -p clickhouse-cloud-api -p clickhouse-openapi-analyzer --all-targets -- -D warnings
  • cargo check --workspace --all-features
  • python3 -m unittest discover -s scripts/tests -p 'test_*.py'\n- python3 scripts/check-openapi-drift.py --dry-run (12 unrelated live upstream findings; no ClickStack findings)

@sdairs
sdairs requested review from iskakaushik and rndD as code owners August 7, 2026 17:31
@sdairs
sdairs temporarily deployed to cloud-integration August 7, 2026 17:31 — with GitHub Actions Inactive
@sdairs sdairs changed the title Extract ClickStack API models and finalize library split Extract remaining ClickStack API models and finalize the library split Aug 7, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 7, 2026

Copy link
Copy Markdown

Macroscope skipped reviewing this pull request. Per-review cost limit exceeded (workspace setting).

This review would cost an estimated $10.49, which exceeds your per-review limit of $10.00.

The top 3 files driving up this estimate:

File Diff Size Estimate
crates/clickhouse-cloud-api/src/models/clickstack.rs 192.97KB $9.65
AGENTS.md 13.59KB $0.68
crates/clickhouse-cloud-api/README.md 3.30KB $0.16

Tip

To get this pull request reviewed, you can:

  1. Comment @macroscope-app on this PR to request a manual review (monthly spend limits still apply).
  2. Exclude the file(s) above from review by adding a pattern to your .macroscope/ignore.md — note that creating this file replaces Macroscope's built-in default ignores rather than extending them.
  3. Raise your cost limit in your workspace billing settings.

Turn off this reminder going forward

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the clickhouse-cloud-api model split by moving the remaining ClickStack model surface out of the src/models.rs monolith into a dedicated private domain module, while preserving the existing public import paths and updating contributor documentation to reflect the final per-domain layout and analyzer traversal behavior.

Changes:

  • Added a clickstack domain module under src/models/ and re-exported it from the models.rs facade to keep crate_root::* and models::* paths stable.
  • Extended the facade regression test to include ClickStackDashboardResponse in both crate-root and models::* paths.
  • Updated crates/clickhouse-cloud-api/README.md and AGENTS.md to document the per-domain file layout and the analyzer’s recursive module-tree traversal (and clarified the no-#[serde(default)] tolerance policy).

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.

File Description
crates/clickhouse-cloud-api/tests/model_facade_test.rs Adds a regression assertion that the extracted ClickStack dashboard response type remains available via both crate-root and models::* paths.
crates/clickhouse-cloud-api/src/models.rs Introduces the clickstack module and re-export, continuing the facade-only models.rs structure with shared macro support.
crates/clickhouse-cloud-api/README.md Updates library structure + optionality/tolerance documentation to match the final split (src/models/*.rs, src/client/*.rs, src/convert/*.rs).
AGENTS.md Updates contributor guidance to the finalized per-domain layout and analyzer traversal expectations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@sdairs
sdairs force-pushed the issue-376-clickstack-models-finalize branch from 174ebdc to d505f20 Compare August 13, 2026 18:29

@iskakaushik iskakaushik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sdairs
sdairs merged commit faf940a into main Aug 13, 2026
4 checks passed
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.

Extract remaining ClickStack API models and finalize the library split

3 participants