Skip to content

Breaking refactor: clean up legacy code, unify generation, explicit FFI flags#256

Closed
userFRM wants to merge 17 commits into
mainfrom
release/v7.0
Closed

Breaking refactor: clean up legacy code, unify generation, explicit FFI flags#256
userFRM wants to merge 17 commits into
mainfrom
release/v7.0

Conversation

@userFRM
Copy link
Copy Markdown
Owner

@userFRM userFRM commented Apr 12, 2026

Summary

52 files changed, +2,177 / -3,323 lines (net -1,146 deleted)

Cleanup refactor eliminating dead code, duplicate hand-written methods, sentinel FFI patterns, and the dual generation model.

Changes

Test plan

  • cargo fmt --all -- --check clean
  • cargo clippy --workspace --all-targets -- -D warnings clean
  • cargo test --workspace (248 tests pass)
  • python3 scripts/check_docs_consistency.py pass
  • cargo build --release -p thetadatadx-ffi pass
  • Go SDK build + test pass
  • Python SDK compile pass
  • C++ cmake build pass
  • SDK drift check (git diff --exit-code) pass

🤖 Generated with Claude Code

userFRM and others added 17 commits April 11, 2026 23:14
Captures the kill list (14 items), target architecture, 7-phase
execution plan, and verification gates for the v7.0.0 release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…(L1)

These were hand-written #[pymethods] functions replaced by
include!("generated_historical_methods.rs"). Delete for real.

Part of v7.0.0 scorched earth refactor (Phase 0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Unimplemented aspirational plan. Deleted to avoid confusing agents
reading it as implemented truth. README table row removed.

Part of v7.0.0 scorched earth refactor (Phase 0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Go struct moved to generated_endpoint_options.go, C++ struct moved to
generated_endpoint_options.hpp.inc. Updated both regex targets.

Part of v7.0.0 scorched earth refactor (Phase 0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
v7 is a clean break. Old REST/WS migration story removed from nav,
getting-started index, and the file itself.

Part of v7.0.0 scorched earth refactor (Phase 0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Follow-up to L14 deletion — checker expected the file and nav entry.

Part of v7.0.0 scorched earth refactor (Phase 0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… (L8)

Remove 261 lines of commented-out hand-written option/index/calendar/interest-rate
method implementations from thetadx.cpp. These were superseded by the code-generated
`generated_historical.cpp.inc` include and served no purpose as dead code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
stock_snapshot_trade returns TdxTradeTickArray. SnapshotTradeTick
was an unused type that has been toggling in and out. Final answer:
delete from tick.rs, tick_schema.toml, decode.rs, all SDK headers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…(L7)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…(L9)

TdxEndpointRequestOptions no longer uses -1/NaN as "unset" markers
for int/float fields. Each field now has a companion has_* bool.
String fields (venue, min_time, etc.) still use null for "unset".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…itten blocks (L6)

The 4 streaming_endpoint! invocations (stock/option trade/quote stream)
are now generated from endpoint_surface.toml. direct.rs retains only
session management, gRPC setup, and collect_stream helpers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
BREAKING: Version bumped to 7.0.0 across the workspace.
- SnapshotTradeTick deleted from all layers
- FFI options use explicit has_* flags (no more NaN/-1 sentinels)
- generate_sdk_surfaces binary removed (build.rs handles it)
- Streaming endpoints generated from TOML
- 1,134 lines of commented-out Python code deleted
- public-api-redesign.md and migration guide deleted
- All hand-written SDK method duplicates removed (Python/Go/C++)
- docs consistency checker fully operational
- Python SDK streaming codegen fixed (stream builders are not futures)
- CI updated: SDK drift check via git diff replaces deleted binary
- Endpoint count updated: 61 → 65 (4 streaming endpoints)
- OpenAPI spec updated with streaming endpoint operationIds
- All dependencies updated (cargo update)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
These are local agent artifacts, not source code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The generate_sdk_surfaces --check comparison failed on Windows because
git checkout converts LF to CRLF. Fix: normalize \r\n to \n before
comparing, plus add .gitattributes forcing eol=lf on generated files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@userFRM
Copy link
Copy Markdown
Owner Author

userFRM commented Apr 12, 2026

Replaced by a clean single-commit PR from refactor/breaking-cleanup.

@userFRM userFRM closed this Apr 12, 2026
@userFRM userFRM deleted the release/v7.0 branch April 13, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment