Skip to content

fix: keep service constants out of external references - #19

Merged
konard merged 2 commits into
mainfrom
issue-18-6bda6195d0a2
Oct 30, 2026
Merged

konard merged 2 commits into
mainfrom
issue-18-6bda6195d0a2

Conversation

@konard

@konard konard commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

LinksConstants::external() classified continue as an external reference because both used MAX / 2. Start external references at MAX / 2 + 1, matching the C# behavior reported in the issue. For u32, the external range is now 2147483648..=4294967295; continue remains 2147483647 and is neither external nor a reference.

  • Apply the corrected boundary to external(), via_only_external(true), and via_external(_, true) for every supported unsigned address type.
  • Add the suggested constructor validation: full_new and via_ranges panic when custom external ranges overlap the supplied internal range, including the six service values. Disjoint ranges in either order, absent external ranges, and empty external ranges remain supported. The new panic condition is documented.
  • Add a patch changelog fragment for the automatic release workflow. Synchronize the stale package version in Cargo.lock with the existing 2.0.0 manifest without changing dependency versions, and remove the PR placeholder.

Validation:

  • Reproduce with cargo test --test constants test_external_range_starts_after_continue_u32: the new assertion fails on the original implementation because is_external(continue) returns true.

  • Before the fix, the constants suite had four failing regressions; after the fix, all 27 constants tests pass.

  • Regression coverage checks u8, u16, u32, u64, u128, and usize; all six service values; null; both internal/external endpoints; all three external constructors; invalid custom overlaps; and preservation of valid custom ranges.

  • Local checks passed: cargo fmt --all -- --check, cargo clippy --locked --all-targets --all-features -- -D warnings, cargo test --locked --all-features --verbose (98 tests plus one doctest), cargo test --locked --doc --verbose, rust-script scripts/check-file-size.rs, cargo build --locked --release --verbose, and cargo package --locked --list --allow-dirty.

  • Changelog and version policy scripts passed locally.

  • GitHub Actions passed for commit d910933: tests on Linux, macOS, and Windows; lint/format; coverage; package build; and changelog/version checks.

Fixes #18

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

Issue: #18
@konard konard self-assigned this Oct 30, 2026
@konard konard changed the title [WIP] LinksConstants::external() overlaps the external range with the continue constant fix: keep service constants out of external references Oct 30, 2026
@konard
konard marked this pull request as ready for review October 30, 2026 13:44
@konard

konard commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Implemented in PR #19, now ready for review.

  • Fixed the external range boundary and added custom-range overlap validation.
  • Added regression tests across all unsigned address types.
  • All 98 tests, the doctest, and CI checks pass, including Linux, macOS, and Windows.
  • Working tree is clean.

Completed in about 11 minutes.


This summary was automatically extracted from the AI working session output.

@konard

konard commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

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

💰 Cost estimation:

  • Model: GPT-6.1 Sol
  • Provider: OpenAI
  • Public pricing estimate: $1.225174

📊 Context and tokens usage:

  • 92.9K / 272K (34%) input tokens, 16.5K / 128K (13%) output tokens

Total: (92.9K + 3.0M cached) input tokens, 16.5K output tokens, $1.225174 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-6.1-sol
  • Thinking level: xhigh (~31999 tokens)
  • Model: GPT-6.1 Sol (gpt-6.1-sol)

📎 Log file uploaded as Gist (547KB)


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

@konard
konard merged commit 9ab09cb into main Oct 30, 2026
13 checks passed
@konard

konard commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Linked issues

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.

LinksConstants::external() overlaps the external range with the continue constant

1 participant