Skip to content

fix: wire up remote thesaurus loading and remove memoize overhead - #737

Merged
AlexMikhalev merged 2 commits into
mainfrom
task/138-143-wire-read-url-remove-memoize
Mar 30, 2026
Merged

AlexMikhalev merged 2 commits into
mainfrom
task/138-143-wire-read-url-remove-memoize

Conversation

@AlexMikhalev

Copy link
Copy Markdown
Contributor

Summary

  • Wire up the existing read_url function in load_thesaurus so AutomataPath::Remote actually fetches from the URL instead of returning an error (was dead code)
  • Remove #[memoize] from magic_pair/magic_unpair -- trivial u64 arithmetic where hash-table lookup overhead exceeds computation cost
  • Replace with #[inline] for proper optimization
  • Remove memoize crate dependency from terraphim_rolegraph

Impact

  • Remote thesaurus loading now works end-to-end with remote-loading feature
  • Hot-path pairing operations are faster without hash-table overhead
  • One fewer dependency in rolegraph (removes memoize + its proc-macro crate)

Fixes #138, Fixes #143

Test plan

  • cargo test -p terraphim_automata -- 83 passed (45 unit + 30 integration + 7 paragraph + 5 doc - 4 overlap)
  • cargo test -p terraphim_rolegraph -- 34 passed (20 unit + 14 proptest)
  • cargo test -p terraphim_middleware -p terraphim_service -- 52 suites, 0 failures
  • cargo clippy -- clean
  • cargo fmt -- clean

Generated with Terraphim AI

@github-actions

Copy link
Copy Markdown
Contributor

Documentation Preview

Your documentation changes have been deployed to:
https://e6cb8bf4.terraphim-docs.pages.dev

This preview will be available until the PR is closed.

@AlexMikhalev
AlexMikhalev merged commit acf6206 into main Mar 30, 2026
33 checks passed
@AlexMikhalev
AlexMikhalev deleted the task/138-143-wire-read-url-remove-memoize branch March 30, 2026 14:14
AlexMikhalev added a commit that referenced this pull request Apr 25, 2026
* fix: wire up remote thesaurus loading and remove memoize overhead

* docs: add research and verification reports

Co-Authored-By: Terraphim AI <noreply@anthropic.com>

---------

Co-authored-by: Terraphim AI <noreply@anthropic.com>
AlexMikhalev added a commit that referenced this pull request Apr 25, 2026
…st + KG routing' (#737) from task/kg-planning-tier-k2p6 into main
AlexMikhalev added a commit that referenced this pull request May 1, 2026
* fix: wire up remote thesaurus loading and remove memoize overhead

* docs: add research and verification reports

Co-Authored-By: Terraphim AI <noreply@anthropic.com>

---------

Co-authored-by: Terraphim AI <noreply@anthropic.com>
AlexMikhalev added a commit that referenced this pull request May 1, 2026
…st + KG routing' (#737) from task/kg-planning-tier-k2p6 into main

This branch was successfully deployed

1 active deployment
docs-preview — ce25107e Deployed Mar 30, 2026 by AlexMikhalev via Deploy Preview #163
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