Skip to content

Port doublets to stable Rust, migrate deps to crates.io, update CI/CD#48

Merged
konard merged 16 commits intomainfrom
issue-47-33c2f118f59c
Apr 14, 2026
Merged

Port doublets to stable Rust, migrate deps to crates.io, update CI/CD#48
konard merged 16 commits intomainfrom
issue-47-33c2f118f59c

Conversation

@konard
Copy link
Copy Markdown
Member

@konard konard commented Apr 13, 2026

Summary

This PR ports the doublets crate from nightly Rust to stable Rust, migrates all dependencies from git submodules to crates.io packages, unifies the type system on LinkReference, and modernizes the CI/CD pipeline.

Changes

  • Stable Rust migration: Removed all 12 nightly features (try_trait_v2, fn_traits, unboxed_closures, default_free_fn, type_alias_impl_trait, box_syntax, etc.) and replaced with stable equivalents
  • Dependency migration: Replaced all git submodules with crates.io packages:
    • platform-num 0.8.0 (new direct dependency for LinkReference trait)
    • platform-data 2.0.0 (was local path dep via dev-deps/data-rs submodule, now uses LinkReference instead of LinkType)
    • platform-trees 0.3.4 (was trees-rs submodule, now uses LinkReference instead of LinkType)
    • platform-mem 0.3.0 (was mem-rs submodule)
    • Removed dev-deps/ directory, all submodules, and .gitmodules
    • Removed unused num-traits direct dependency (re-exported via platform-num)
  • Unified type system: Replaced data::LinkType + trees::LinkType dual bounds with single LinkReference trait:
    • Removed TreesLinkType alias (no longer needed)
    • Removed crate::funty() helper function, replaced with T::from_byte() from LinkReference
    • Replaced .as_usize() (funty) with .as_() (num_traits AsPrimitive)
    • Replaced +=/-= operators with plain assignment (LinkReference uses PrimInt without NumAssign)
  • CI/CD pipeline: New release workflow based on rust-ai-driven-development-pipeline-template with lint, test, coverage, build, auto-release, and deploy-docs jobs
  • Documentation: Added rustdoc comments to all public API types, traits, and methods
  • Case study: Added docs/case-studies/issue-47/ with detailed analysis
  • Upstream issues filed: Filed and resolved issues for funty → Numbers unification:
    • Numbers#144, data-rs#16, trees-rs#30

Key technical decisions

  • Try trait usage replaced with explicit Flow::is_break() checks
  • fn_traits/unboxed_closures on Fuse replaced with .call() method
  • Range<T> iteration (requires nightly Step) replaced with while loops
  • Unified LinkReference trait from platform-num replaces both data::LinkType and trees::LinkType

Testing

  • All 306 tests pass on stable Rust (ubuntu, macos, windows)
  • cargo clippy --all-targets --all-features passes with -D warnings
  • cargo fmt --all -- --check passes
  • cargo doc --workspace --no-deps generates documentation without warnings

CI/CD status

All CI jobs pass:

  • ✅ Detect Changes
  • ✅ Version Modification Check
  • ✅ Lint and Format Check
  • ✅ Changelog Fragment Check
  • ✅ Code Coverage
  • ✅ Test (ubuntu-latest, macos-latest, windows-latest)
  • ✅ Build Package

Closes #47

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #47
@konard konard self-assigned this Apr 13, 2026
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 13, 2026

🚨 Solution Draft Failed

The automated solution draft encountered an error:

CLAUDE execution failed

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.6 (claude-opus-4-6)

📎 Failure log uploaded as Gist (6699KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 13, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-04-13T15:40:56.056Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 13, 2026

🚨 Solution Draft Failed

The automated solution draft encountered an error:

CLAUDE execution failed

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.6 (claude-opus-4-6)

📎 Failure log uploaded as Gist (4636KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

Please reuse unfinished work from logs provided below, if these are contain best practices, try to commit as soon as possible, to keep as much work as you can as fast as you can, so it will be less likely to get the execution process terminated with unfinished work.

https://gist.githubusercontent.com/konard/dba1632796b5c0d4ac4a1db94f59f122/raw/3f8139ee0b15da4757bcb52146132652f0249049/solution-draft-log-pr-1776076882065.txt
https://gist.githubusercontent.com/konard/02ccfec2e78d2ac5d6a4efd282703500/raw/10c0356a97d58968fc342840104c764a70afe364/solution-draft-log-pr-1776096543216.txt

We need to ensure all changes are correct, consistent, validated, tested, logged and fully meet each and all discussed requirements (check issue description and all comments in issue and in pull request). Ensure all CI/CD checks pass.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-04-14T07:53:41.115Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

konard and others added 6 commits April 14, 2026 08:17
Remove all 12 nightly feature gates and migrate to stable equivalents:
- Replace Try trait usage with explicit is_break() checks on Flow
- Replace fn_traits/unboxed_closures on Fuse with .call() method
- Replace type_alias_impl_trait with -> impl Trait return position
- Replace default_free_fn with Default::default() and PhantomData
- Migrate mem/trees deps from git submodules to crates.io packages
- Adapt to new platform-mem 0.3.0 RawMem API (grow_filled/shrink)
- Adapt to platform-trees 0.3.3 renamed traits (SzbTree -> RecursiveSizeBalancedTree)
- Resolve dual LinkType trait bounds (data vs trees crates)
- Replace Range<T> iteration with while loops (Step trait is nightly-only)
- Fix borrow checker issues by collecting iterators before mutation
- Update rust-toolchain.toml from nightly-2022-08-22 to stable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add resolver = "2" to workspace Cargo.toml
- Export FuntyPart from data-rs crate for disambiguation
- Remove unused imports (error::Error, LinksTree, RelativeCircularLinkedList)
- Rewrite handler tests for new Fuse .call() API (no more fn_traits)
- Remove box_syntax from dyn test, use Box::new with Global allocator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix all clippy warnings: semicolons, map_or, into_iter, dead code allows
- Update rustfmt.toml for stable Rust (remove nightly-only options)
- Add .gitignore for target/ and log files
- Add Rust CI/CD scripts from pipeline template (replacing JS scripts)
- Use LinksConstants::default() instead of Default::default()
- Allow pre-existing clippy lints that need future cleanup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace ci.yml and benchmark.yml with release.yml from template
- Use stable Rust toolchain (dtolnay/rust-toolchain@stable)
- Replace JavaScript CI scripts with Rust scripts (rust-script)
- Add detect-changes, version-check, changelog-pr, deploy-docs jobs
- Add auto-release and manual-release with crates.io publishing
- Add changelog fragment for stable Rust migration (issue #47)
- All checkout steps include submodules: true

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] Double check we don't depend on any non stable features of rust and use all the latest best practices and versions of rust in the code Port doublets to stable Rust, migrate deps to crates.io, update CI/CD Apr 14, 2026
konard and others added 6 commits April 14, 2026 08:30
Documents the nightly-to-stable migration, dependency modernization,
and CI/CD pipeline update with technical challenges and solutions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix should_panic reason to match actual assertion message
- Fix uninlined_format_args in test files (auto-fix applied)
- Remove unused _deleted variable in extensions test
- Add #[allow(dead_code)] for utility test functions
- Remove unused targets Vec in store_internals test
- Fix cast_sign_loss warning with explicit allow
- Fix or_fun_call by binding to local variable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The data-rs submodule's published crate doesn't export FuntyPart,
and we can't modify the submodule. Add a crate::funty::<T>(n) helper
that does the same u8->T conversion, removing the dependency on
FuntyPart being publicly exported from the data crate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These dependencies are now consumed from crates.io (platform-mem 0.3.0,
platform-trees 0.3.3) instead of git submodules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds documentation for Link, Doublet, Doublets/DoubletsExt traits,
Error, Fuse, Store types, and all public methods. Includes crate-level
and module-level documentation for rustdoc generation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review April 14, 2026 08:51
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $30.557200

📊 Context and tokens usage:

Claude Opus 4.6:

  1. Context window: 166.5K / 1M (17%) input tokens, 41.4K / 128K (32%) output tokens
  2. Context window: 167.0K / 1M (17%) input tokens, 47.2K / 128K (37%) output tokens
  3. Context window: 59.4K / 1M (6%) input tokens, 9.3K / 128K (7%) output tokens

Total: (521.3K + 44.8M cached) input tokens, 126.0K output tokens, $28.812422 cost

Claude Haiku 4.5: (2 sub-agent calls)

Sub-agent calls:

  1. 68.0K / 200K (34%) input tokens, 7 / 64K (0%) output tokens
  2. 41.9K / 200K (21%) input tokens, 4 / 64K (0%) output tokens

Total: (93.8K + 1.7M cached) input tokens, 14.5K output tokens, $0.364350 cost

Claude Sonnet 4.6:

Total: (72.2K + 2.8M cached) input tokens, 18.6K / 64K (29%) output tokens, $1.380428 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Main model: Claude Opus 4.6 (claude-opus-4-6)
  • Additional models:
    • Claude Haiku 4.5 (claude-haiku-4-5-20251001)
    • Claude Sonnet 4.6 (claude-sonnet-4-6)

📎 Log file uploaded as Gist (13986KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🔄 Auto-restart 1/3

Detected uncommitted changes from previous run. Starting new session to review and commit or discard them.

Uncommitted files:

?? ci-logs/

Auto-restart will stop after changes are committed or discarded, or after 2 more iterations. Please wait until working session will end and give your feedback.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🔄 Auto-restart 1/3 Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $1.317755

📊 Context and tokens usage:

Claude Opus 4.6:

  • Context window: 57.1K / 1M (6%) input tokens, 8.7K / 128K (7%) output tokens

Total: (47.2K + 1.5M cached) input tokens, 8.7K output tokens, $1.265334 cost

Claude Sonnet 4.6:

Total: (10.6K + 8.2K cached) input tokens, 684 / 64K (1%) output tokens, $0.052421 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Main model: Claude Opus 4.6 (claude-opus-4-6)
  • Additional models:
    • Claude Sonnet 4.6 (claude-sonnet-4-6)

📎 Log file uploaded as Gist (16005KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

Use latest https://crates.io/crates/platform-data, to fully remove dev-deps/data-rs and dev-deps folder.

Also think, can we really to get rid of funty like we did in Numbers, and use LinkReference instead of LinkType name in all packages?

How can we keep all LinkReference types and TreesLinkType in sync? Do we need tree-rs to depend on Numbers? Or most of the issue can be solved locally in doublets-rs? What about data-rs?

If we really do need funty, add issues in dependencies, so where needed they also include it for compatibility.

@konard konard marked this pull request as draft April 14, 2026 09:28
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-04-14T09:28:51.836Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

Replace the local path dependency on dev-deps/data-rs (platform-data
0.1.0-beta.3) with the published crates.io package platform-data 1.0.0.
Remove the data-rs git submodule, dev-deps directory, and .gitmodules file.
Also remove unused num-traits direct dependency (it comes transitively
via platform-data and platform-trees).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

Analysis: funty, LinkReference, and trait synchronization

1. Migration to platform-data 1.0.0 ✅ Done

Committed in 8add2ef: migrated from local dev-deps/data-rs (platform-data 0.1.0-beta.3) to crates.io platform-data 1.0.0. Removed the data-rs submodule, dev-deps/ directory, .gitmodules, and unused num-traits direct dependency. All 306 tests pass.

2. Can we get rid of funty?

Short answer: Not without changes to upstream dependencies.

platform-data 1.0.0 depends on funty 2.0.0 and uses funty::Unsigned as a supertrait of data::LinkType. So funty comes in transitively through platform-data — doublets itself doesn't depend on funty directly.

However, platform-trees 0.3.3 uses num_traits::Unsigned (via Number from platform-num), not funty::Unsigned. These are different traits from different crates that both describe "unsigned integer."

If we wanted to eliminate funty entirely from the ecosystem:

  • platform-data would need to switch from funty::Unsigned to num_traits::Unsigned (or platform-num::Number)
  • This would be a breaking change for platform-data

3. Can we use LinkReference instead of LinkType?

LinkReference (from platform-num 0.6.0) is: Number + Unsigned + ToSigned + MaxValue + FromPrimitive + Debug + Display + Hash + Send + Sync + 'static

data::LinkType (from platform-data 1.0.0) is: funty::Unsigned + FuntyPart + TryFrom/TryInto for all integer types

trees::LinkType (from platform-trees 0.3.3) is: Number + num_traits::Unsigned + TryFrom<u8> + FromPrimitive

These three traits have overlapping but different requirements:

  • LinkReference does NOT imply data::LinkType (missing funty::Unsigned, TryFrom/TryInto bounds)
  • LinkReference does NOT imply trees::LinkType (missing TryFrom<u8>)
  • Neither data::LinkType nor trees::LinkType implies the other

All three ARE implemented for the same concrete types (u8, u16, u32, u64, usize) via blanket impls, but the Rust type system can't express that generically.

4. How to keep them in sync?

Option A (recommended): Unify at the platform-data level. Have platform-data::LinkType use Number + num_traits::Unsigned instead of funty::Unsigned. Then trees::LinkType would be a strict superset of data::LinkType (it adds FromPrimitive), and LinkReference would be a strict superset of both. This eliminates the funty dependency entirely.

Option B: Add LinkReference as a supertrait to both. Make data::LinkType: LinkReference and trees::LinkType: LinkReference. Then doublets could use LinkReference as its primary bound.

Option C (current): Keep the dual-bound approach. doublets uses T: data::LinkType + trees::LinkType where needed. This works but is verbose and couples doublets to both upstream trait hierarchies.

5. Recommendation

The cleanest path forward is Option A: file an issue on platform-data to replace funty::Unsigned with num_traits::Unsigned + Number. This would:

  • Remove funty from the dependency tree
  • Make trees::LinkType a natural superset of data::LinkType
  • Allow doublets to use a single trait bound

For now, the current dual-bound approach (T: LinkType + TreesLinkType) works correctly and all tests pass. The local funty helper function in doublets is kept to avoid ambiguity between data::FuntyPart::funty and trees::LinkType::funty methods.

Should I file issues on the upstream repositories to propose Option A?

@konard konard marked this pull request as ready for review April 14, 2026 09:41
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $3.321545

📊 Context and tokens usage:

Claude Opus 4.6:

  • Context window: 87.9K / 1M (9%) input tokens, 14.4K / 128K (11%) output tokens

Total: (77.6K + 4.5M cached) input tokens, 14.4K output tokens, $3.075171 cost

Claude Haiku 4.5:

Total: (41.2K + 1.5M cached) input tokens, 8.3K / 64K (13%) output tokens, $0.246374 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Main model: Claude Opus 4.6 (claude-opus-4-6)
  • Additional models:
    • Claude Haiku 4.5 (claude-haiku-4-5-20251001)

📎 Log file uploaded as Gist (2519KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

Based on #48 (comment), please report issues to Numbers, trees-rs, data-rs, so all use depend on Numbers instead of funty, and Numbers should support all features we require in trees-rs, data-rs and doublets-rs.

@konard konard marked this pull request as draft April 14, 2026 10:09
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-04-14T10:09:18.608Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

Filed upstream issues for funty → Numbers unification

Based on the analysis in the previous comment, I've filed issues in all three upstream repositories to unify on LinkReference from platform-num (Numbers) instead of using funty:

Execution order (dependencies flow top-down):

  1. Add TryFrom/TryInto bounds and FuntyPart-like functionality to LinkReference Numbers#144Add TryFrom/TryInto bounds and FuntyPart-like functionality to LinkReference

    • Adds TryFrom/TryInto bounds for all integer types to LinkReference
    • Adds funty(n: u8) -> Self convenience method
    • This is the foundation — must be done first
  2. Replace funty dependency with platform-num (Numbers) for LinkType trait data-rs#16Replace funty dependency with platform-num (Numbers) for LinkType trait

    • Replaces funty::Unsigned + FuntyPart with LinkReference
    • Eliminates funty from the dependency tree
    • Depends on Numbers#144
  3. Replace LinkType trait with LinkReference from platform-num (Numbers) trees-rs#30Replace LinkType trait with LinkReference from platform-num (Numbers)

    • Replaces local LinkType definition with LinkReference
    • Depends on Numbers#144

After all three are resolved:

doublets-rs can replace the current dual-bound approach (T: data::LinkType + trees::LinkType with a local TreesLinkType alias and funty helper) with a single unified T: LinkReference bound.

@konard konard marked this pull request as ready for review April 14, 2026 10:13
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $1.243396

📊 Context and tokens usage:

Claude Opus 4.6:

  • Context window: 48.7K / 1M (5%) input tokens, 8.5K / 128K (7%) output tokens

Total: (40.0K + 863.3K cached) input tokens, 8.5K output tokens, $0.890285 cost

Claude Haiku 4.5:

Total: (96.3K + 1.7M cached) input tokens, 13.3K / 64K (21%) output tokens, $0.353111 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Main model: Claude Opus 4.6 (claude-opus-4-6)
  • Additional models:
    • Claude Haiku 4.5 (claude-haiku-4-5-20251001)

📎 Log file uploaded as Gist (2115KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🔄 Auto-restart 1/3

Detected uncommitted changes from previous run. Starting new session to review and commit or discard them.

Uncommitted files:

?? trees-rs/

Auto-restart will stop after changes are committed or discarded, or after 2 more iterations. Please wait until working session will end and give your feedback.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🔄 Auto-restart 1/3 Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $0.291127

📊 Context and tokens usage:

  • Context window: 32.2K / 1M (3%) input tokens, 1.7K / 128K (1%) output tokens

Total: (20.4K + 244.1K cached) input tokens, 1.7K output tokens, $0.291127 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Model: Claude Opus 4.6 (claude-opus-4-6)

📎 Log file uploaded as Gist (3496KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

After linksplatform/trees-rs#31 and linksplatform/data-rs#17 and linksplatform/Numbers#147 are applied. We can use latest version of https://crates.io/crates/platform-num as well as latest versions of trees-rs and data-rs, now we can fully support LinkReference, and also fully drop num_traits dependency, as https://crates.io/crates/platform-num reexports everything. We also now can drop any LinkType and replace it with LinkReference.

If something is still missing - report bug at https://github.com/linksplatform/Numbers, or/and tree-rs/data-rs upstream libraries.

@konard konard marked this pull request as draft April 14, 2026 14:34
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-04-14T14:34:36.501Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

- Upgrade platform-data 1.0.0 → 2.0.0, platform-trees 0.3.3 → 0.3.4
- Add platform-num 0.8.0 as direct dependency
- Replace all data::LinkType with data::LinkReference throughout
- Remove TreesLinkType alias (no longer needed, both crates use LinkReference)
- Remove crate::funty helper, use T::from_byte() from LinkReference trait
- Replace .as_usize() (funty) with .as_() (num_traits::AsPrimitive)
- Replace += / -= with plain assignment (LinkReference lacks AddAssign)

All 306 tests pass, clippy clean, fmt clean, docs generate.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review April 14, 2026 14:50
@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

Migrated to LinkReference and latest deps

Per the request, this commit upgrades to the latest upstream crates and unifies the type system:

Dependency upgrades

  • platform-num 0.8.0 (new direct dep)
  • platform-data 1.0.0 → 2.0.0
  • platform-trees 0.3.3 → 0.3.4

Type system unification

  • Replaced all data::LinkType + trees::LinkType dual bounds with single LinkReference from platform-num
  • Removed TreesLinkType alias (no longer needed)
  • Removed crate::funty() helper — now uses T::from_byte() from LinkReference
  • Replaced .as_usize() (funty) with .as_() (num_traits AsPrimitive)
  • Replaced +=/-= with plain assignment (PrimInt doesn't include NumAssign)

Results

  • All 306 tests pass
  • All CI checks pass (lint, test on ubuntu/macos/windows, coverage, build)
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo doc --workspace --no-deps generates without warnings
  • funty crate is no longer in the dependency tree

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost: $4.395137

📊 Context and tokens usage:

Claude Opus 4.6:

  • Context window: 107.0K / 1M (11%) input tokens, 17.0K / 128K (13%) output tokens

Total: (95.8K + 6.3M cached) input tokens, 17.0K output tokens, $4.191119 cost

Claude Haiku 4.5:

Total: (64.0K + 834.5K cached) input tokens, 8.1K / 64K (13%) output tokens, $0.204018 cost

🤖 Models used:

  • Tool: Anthropic Claude Code
  • Requested: opus
  • Main model: Claude Opus 4.6 (claude-opus-4-6)
  • Additional models:
    • Claude Haiku 4.5 (claude-haiku-4-5-20251001)

📎 Log file uploaded as Gist (2766KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented Apr 14, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard merged commit 9bac9a7 into main Apr 14, 2026
14 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.

Double check we don't depend on any non stable features of rust and use all the latest best practices and versions of rust in the code

1 participant