Skip to content

feat: expose linked TinyBus module entry point - #45

Closed
senamakel wants to merge 5 commits into
tinyhumansai:mainfrom
senamakel:windows-linked-modules
Closed

senamakel wants to merge 5 commits into
tinyhumansai:mainfrom
senamakel:windows-linked-modules

Conversation

@senamakel

@senamakel senamakel commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add opt-in tinyjuice-module/static-link using TinyBus module_export_optional_static!, which selects dynamic exports by default and a Rust-addressable module in static builds.
  • Expose tinyjuice_module::linked_module() for direct host registration.
  • Pin TinyBus commit 433d9ed and use =0.1.2 registry dependency identities, with local Cargo patches for standalone builds.

Related issue

Depends on tinyhumansai/tinybus#29, which builds on merged #28. Ready condition: #29 is merged, this gitlink is reachable from upstream TinyBus, and CI passes. This PR remains a draft until then.

API or behavior changes

Additive public linked_module() under static-link. The default loadable module path and wire contract are unchanged.

Validation

  • cargo fmt --manifest-path Cargo.toml --all -- --check
  • cargo check --manifest-path Cargo.toml -p tinyjuice-module --offline
  • cargo check --manifest-path Cargo.toml -p tinyjuice-module --features static-link --offline
  • Full clippy, build, test, and coverage suites have not been rerun on this final commit.

Tests

The two feature builds verify both TinyBus macro expansions and the public root reexport. No runtime behavior changes were added in this package.

Documentation

The feature and root entry point are documented in this PR and by TinyBus #29.

Checklist

  • The change is focused on static module registration.
  • No lint levels were relaxed in this update.
  • No secrets or environment contents are included.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 5 billable files and costs up to $1.25.

Or wait 38 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 563b5419-13b1-4c22-bf93-f2194b8ae98a

📥 Commits

Reviewing files that changed from the base of the PR and between f39939e and 57f874f.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • Cargo.toml
  • crates/tinyjuice-module/Cargo.toml
  • crates/tinyjuice-module/src/lib.rs
  • crates/tinyjuice-module/src/service.rs
  • vendor/tinybus

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel marked this pull request as ready for review September 30, 2026 09:56
@senamakel senamakel closed this Sep 30, 2026
@tinysweeper

tinysweeper Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 6 lane(s) and found 3 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Incomplete
Priority: medium
Reviewed head: 57f874f25241
Updated: 1790762580 (Unix time)

Review snapshot

Change surface Files Review signal Count
Production 2 Active findings 3
Tests 0 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 2 Pending checks/questions 8

Completeness: Incomplete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

What changed

The review could not produce a supported behavioral summary; inspect the cited changed surface and lane details below.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

Findings

  • medium · tests · Add a test that exercises the static-link feature — The change introduces a `static-link` feature that conditionally exports a `linked_module` symbol via the `module_export_optional_static!` macro. No test enables this feature or ve (crates/tinyjuice\-module/src/service\.rs:195)
  • medium · description · Document the new `linked_module` function in the crate root or README — The `linked_module` function is exported at the crate root under the `static-link` feature, but it has no documentation. The repository rule requires public API changes to be docum (\(pull request description\))
  • medium · e2e · Add end-to-end coverage for the static-link feature's linked_module export — The new `linked_module` public function, gated behind the `static-link` feature, is an external surface that no end-to-end test exercises. The only end-to-end test (`crates/tinyjui (crates/tinyjuice\-module/src/lib\.rs:9)

Could not review: Cargo.toml, crates/tinyjuice-module/Cargo.toml, crates/tinyjuice-module/src/lib.rs, crates/tinyjuice-module/src/service.rs

Before merge

  • Complete the critique review for Cargo.toml, crates/tinyjuice-module/Cargo.toml, crates/tinyjuice-module/src/lib.rs, crates/tinyjuice-module/src/service.rs.
  • Complete the security review for Cargo.toml, crates/tinyjuice-module/Cargo.toml, crates/tinyjuice-module/src/lib.rs, crates/tinyjuice-module/src/service.rs.

How this fits together

flowchart LR
  n0["setup<br/>changed<br/>1 finding"]:::flagged
  n1["call"]:::impacted
  n2["compress"]:::impacted
  n3["service_compresses_and_retrieves_a_large_log"]:::impacted
  n4["llm"]:::impacted
  n5["install"]:::impacted
  n0 -->|calls| n1
  n0 -->|uses| n4
  n3 -->|calls| n2
  n3 -->|tests| n2
  n3 -->|calls| n5
  n3 -->|tests| n5
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: Cargo.toml, crates/tinyjuice-module/Cargo.toml, crates/tinyjuice-module/src/lib.rs, crates/tinyjuice-module/src/service.rs
  • Lane summary: Reviewed 0 files; 0 findings. 4 files could not be reviewed: Cargo.toml, crates/tinyjuice-module/Cargo.toml, crates/tinyjuice-module/src/lib.rs, crates/tinyjuice-module/src/service.rs.

security

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: Cargo.toml, crates/tinyjuice-module/Cargo.toml, crates/tinyjuice-module/src/lib.rs, crates/tinyjuice-module/src/service.rs
  • Lane summary: Reviewed 0 files; 0 findings. 4 files could not be reviewed: Cargo.toml, crates/tinyjuice-module/Cargo.toml, crates/tinyjuice-module/src/lib.rs, crates/tinyjuice-module/src/service.rs.

tests

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: This pull request adds a `static-link` feature and a conditional export of a `linked_module` symbol, but does not add any test that exercises the new code path. The existing tests do not enable the feature, so a regression in the macro-generated symbol would go undetected at test time. A test should be added that enables the feature and verifies the symbol exists. _The code index is behind this pull request (indexed at `d41861d10c2a`), so retrieved context may be out of date._ _Memory was unavailable (model: cortex: v1/recall: timed out after 10s), so this review ran without it._
  • Evidence: crates/tinyjuice\-module/src/service\.rs — Add a test that exercises the static-link feature

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: This PR adds a `static-link` feature that exposes a `linked_module` function for static module registration, using a new TinyBus macro and local patches. The change is additive and the feature gate is correctly applied, but the new public API lacks documentation, violating the repository's requirement that public API changes be documented in README or docs. The PR should not be merged without documentation. _The code index is behind this pull request (indexed at `d41861d10c2a`), so retrieved context may be out of date._ _Memory was unavailable (model: cortex: v1/recall: timed out after 10s), so this review ran without it._
  • Evidence: \(pull request description\) — Document the new `linked_module` function in the crate root or README

e2e

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Lane summary: _The code index is behind this pull request (indexed at `d41861d10c2a`), so retrieved context may be out of date._ _Memory was unavailable (model: cortex: v1/recall: timed out after 10s), so this review ran without it._
  • Evidence: crates/tinyjuice\-module/src/lib\.rs — Add end-to-end coverage for the static-link feature's linked_module export
Evidence and run details
  • Models: ladder/vectors, deepseek/deepseek-v4-flash
  • Spend: $0.005140
  • Tokens: 45367 input · 14361 output · 21248 cached · 151 embedding
Head State Pass summary
57f874f25241 incomplete 3 active finding(s), 0 resolved finding(s) (at 1790762580)

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tinysweeper found nothing blocking, but could not review everything, so this is not an approval: Cargo.toml, crates/tinyjuice-module/Cargo.toml, crates/tinyjuice-module/src/lib.rs, crates/tinyjuice-module/src/service.rs.

             $0.0051 · 45,367 in / 14,361 out · 21,248 cached (47%) · ladder/vectors, deepseek/deepseek-v4-flash · 151 embedded
tests:       $0.0020 · 25,927 in / 4,031 out  · 15,360 cached (59%) · deepseek/deepseek-v4-flash
description: $0.0008 · 3,800 in  / 3,564 out  · 2,304 cached (61%)  · deepseek/deepseek-v4-flash
e2e:         $0.0016 · 13,190 in / 3,408 out  · 3,072 cached (23%)  · deepseek/deepseek-v4-flash

#[allow(missing_docs, unreachable_pub)]
mod exports {
tinybus_module::module_export! {
tinybus_module::module_export_optional_static! {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

priority medium tests confident

Add a test that exercises the static-link feature

The change introduces a static-link feature that conditionally exports a linked_module symbol via the module_export_optional_static! macro. No test enables this feature or verifies the symbol is correctly generated. If the macro is misused or the vendored crate changes, a regression could go undetected until someone actually uses the feature and encounters a compile/link error. Add a test that enables features = ["static-link"] and calls linked_module() (or at least verifies the symbol compiles).

[RULE] missing-test ·


mod service;

#[cfg(feature = "static-link")]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

priority medium e2e confident

Add end-to-end coverage for the static-link feature's linked_module export

The new linked_module public function, gated behind the static-link feature, is an external surface that no end-to-end test exercises. The only end-to-end test (crates/tinyjuice-module/tests/module_e2e.rs) tests the dynamic-loading path without enabling the static-link feature. A regression in the static-linking path would go undetected.

[RULE] e2e-uncovered ·

@tinysweeper tinysweeper Bot added the priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. label Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant