Skip to content

Expose a statically linked TinyDocs module entry - #18

Merged
senamakel merged 7 commits into
tinyhumansai:mainfrom
senamakel:static-modules
Oct 1, 2026
Merged

senamakel merged 7 commits into
tinyhumansai:mainfrom
senamakel:static-modules

Conversation

@senamakel

@senamakel senamakel commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add opt-in tinydocs-module/static-link using TinyBus module_export_optional_static!, which selects dynamic exports by default and a Rust-addressable module in static builds.
  • Expose tinydocs_module::linked_module() for direct host registration. The earlier linked raw ABI entry points remain available.
  • 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 tinydocs-module --offline
  • cargo check --manifest-path Cargo.toml -p tinydocs-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.

Summary by CodeRabbit

  • New Features
    • Added support for statically linking the TinyDocs adapter into host applications without exporting shared C names.
    • Static-link integrations can now access the adapter’s initialization and manifest entry points.

@tinysweeper

tinysweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

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

State: Incomplete
Priority: none
Reviewed head: 9501126d3ceb
Updated: 1790879190 (Unix time)

Review snapshot

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

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.

  • Unreviewed: tinysweeper/tests

Findings

Previously reported and still active

  • Exercise the static-link export path
  • Cover the static-linking path with an end-to-end test
  • Update Cargo.lock for the vendored TinyBus patches
  • Update vendor/tinybus to provide module\_export\_static! macro
  • Add tests for the static-link feature path
  • Add a test for the static-linking entry points
  • Cover the static-linking path with an end-to-end test
  • Add a test for the static-linking entry points
  • Update vendor/tinybus to provide module\_export\_static! macro
  • Cover the static-linking path with an end-to-end test
  • Add a test for the static-linking entry points
  • Exercise the static-link export path
  • Add tests for the static-link feature path
  • Add a test for the static-linking entry points
  • Update vendor/tinybus to provide module_export_static! macro
  • Update vendor/tinybus to provide module_export_optional_static! macro
  • Vendor paths patched but no vendor changes provided

Pending checks: TinyBus module E2E

Could not review: Cargo.toml, crates/tinydocs-module/Cargo.toml, crates/tinydocs-module/src/lib.rs, crates/tinydocs-module/src/service/mod.rs, tinysweeper/description, tinysweeper/e2e, tinysweeper/tests

Before merge

  • Address carried finding Exercise the static-link export path.
  • Address carried finding Cover the static-linking path with an end-to-end test.
  • Address carried finding Update Cargo.lock for the vendored TinyBus patches.
  • Address carried finding Update vendor/tinybus to provide module\_export\_static! macro.
  • Address carried finding Add tests for the static-link feature path.
  • Address carried finding Add a test for the static-linking entry points.
  • Address carried finding Cover the static-linking path with an end-to-end test.
  • Address carried finding Add a test for the static-linking entry points.
  • Address carried finding Update vendor/tinybus to provide module\_export\_static! macro.
  • Address carried finding Cover the static-linking path with an end-to-end test.
  • Address carried finding Add a test for the static-linking entry points.
  • Address carried finding Exercise the static-link export path.
  • Address carried finding Add tests for the static-link feature path.
  • Address carried finding Add a test for the static-linking entry points.
  • Address carried finding Update vendor/tinybus to provide module_export_static! macro.
  • Address carried finding Update vendor/tinybus to provide module_export_optional_static! macro.
  • Address carried finding Vendor paths patched but no vendor changes provided.
  • Complete the critique review for Cargo.toml, crates/tinydocs-module/Cargo.toml, crates/tinydocs-module/src/lib.rs, crates/tinydocs-module/src/service/mod.rs.
  • Complete the security review for Cargo.toml, crates/tinydocs-module/Cargo.toml, crates/tinydocs-module/src/lib.rs, crates/tinydocs-module/src/service/mod.rs.
  • Complete the tests review for tinysweeper/tests.
  • Complete the description review for tinysweeper/description.
  • Wait for TinyBus module E2E.
  • Complete the e2e review for tinysweeper/e2e.

How this fits together

flowchart LR
  n0["Documents<br/>changed"]:::changed
  n1["setup<br/>changed"]:::changed
  n2["service"]:::impacted
  n3["generate_pptx"]:::impacted
  n4["read_output"]:::impacted
  n5["generate_docx"]:::impacted
  n6["hold"]:::impacted
  n7["generate_docx_holds_a_readable_document"]:::impacted
  n1 -->|uses| n0
  n2 -->|uses| n0
  n3 -->|calls| n6
  n5 -->|calls| n6
  n7 -->|calls| n2
  n7 -->|tests| n2
  n7 -->|calls| n4
  n7 -->|tests| n4
  n7 -->|calls| n5
  n7 -->|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/tinydocs-module/Cargo.toml, crates/tinydocs-module/src/lib.rs, crates/tinydocs-module/src/service/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 4 files could not be reviewed: Cargo.toml, crates/tinydocs-module/Cargo.toml, crates/tinydocs-module/src/lib.rs, crates/tinydocs-module/src/service/mod.rs.

security

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

tests

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/tests
  • Lane summary: No reviewer could be consulted.

commits

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

description

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/description
  • Lane summary: No reviewer could be consulted.

e2e

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/e2e
  • Lane summary: No reviewer could be consulted; only the job states below are reported. Waiting on 1 end-to-end job: `TinyBus module E2E`. (17 earlier finding(s) still open)
  • Unresolved questions/checks: TinyBus module E2E
Evidence and run details
  • Models: ladder/vectors
  • Spend: $0.000003
  • Tokens: 0 input · 0 output · 0 cached · 281 embedding
Head State Pass summary
6e620b33157f changes requested 5 active finding(s), 1 resolved finding(s) (at 1790366581)
6f8abbb29608 changes requested 29 active finding(s), 6 resolved finding(s) (at 1790371052)
9501126d3ceb incomplete 0 active finding(s), 0 resolved finding(s) (at 1790879190)

tinysweeper 0.1.0

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 09af6132-2dbf-423c-87ea-770ee061e978

📥 Commits

Reviewing files that changed from the base of the PR and between 6e620b3 and 6f8abbb.

📒 Files selected for processing (5)
  • Cargo.toml
  • crates/tinydocs-module/Cargo.toml
  • crates/tinydocs-module/src/lib.rs
  • crates/tinydocs-module/src/service/mod.rs
  • vendor/tinybus

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The tinydocs-module crate adds a static-link feature and feature-gated public TinyBus entry points. It updates export macro wiring and TinyBus dependency resolution, including the vendored submodule reference.

Changes

Static linking support

Layer / File(s) Summary
TinyBus dependency sources
vendor/tinybus, Cargo.toml, crates/tinydocs-module/Cargo.toml
Updates the TinyBus submodule reference, adds local Cargo source overrides, and sets the tinybus and tinybus-module dependencies to exact registry versions.
Static-link feature and export wiring
crates/tinydocs-module/Cargo.toml, crates/tinydocs-module/src/lib.rs, crates/tinydocs-module/src/service/mod.rs
Adds the static-link feature and feature-gated public TinyBus entry points. Makes the exports module crate-visible, uses module_export_optional_static!, and adds an unknown_lints allowance.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 6f8ab

No confirmed defect in the supplied evidence blocks merging. The linked-host path still needs its planned integration check.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to 6f8ab

The linked entry points retain the existing service methods, but the host-side admission and failure behavior of this new integration path has not been verified. No security exploit is established.

Retained concerns

  • Medium · security · inferred: The new linked-host attachment path has no demonstrated equivalent to the dynamic loader's manifest admission, broker identity, and invocation controls. A bypass is not established, but the effective boundary cannot yet be assessed.
Security review details

Security Blast Radius

  • inferred — The new exports are gated by static-link and declare no additional service methods. Their effective attackable scope depends on the linked host's attachment and broker access, which are not supplied.

Security Findings and Attack Paths

  • inferred — No sensitive-data attack path is verified. The deferred TinyBus candidate cannot be compared across revisions without linked-host panic-hook behavior and untrusted-input reachability.

Trust Boundaries and Controls

  • observed — The supplied dynamic end-to-end path loads an artifact through ModuleHost, checks its manifest, and invokes the service through a broker. It does not exercise linked-host admission or invocation.

Resilience and Maintainability Implications

  • inferred — The adapter's setup orders object registration before name acquisition. Without the linked host's attachment contract, cleanup after failure, interruption, or repeated attachment cannot be established; this is not evidence of a new failure.

Hardening Proposals

  • proposed — At host integration, verify linked manifest admission, broker identity and authorization, and initialization cleanup under failure and repetition; compare the pinned TinyBus revisions' panic-hook behavior before treating the deferred exposure question as resolved.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: exposing a statically linked TinyDocs module entry.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

A rabbit checks the linking trail,
The TinyBus names are set to sail.
A feature opens entry doors,
The export macro joins the course.
New sources guide the crates along,
The rabbit hops and hums a song.

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

@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.

Requesting changes: 1 lane(s) blocking, worst finding is high.

Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.

             $0.0049 · 199,038 in / 21,948 out · 39,668 cached (20%) · ladder/vectors, gpt-5.6-luna, deepseek-v4-flash · 228 embedded
critique:    $0.0017 · 66,082 in  / 3,172 out  · 8,796 cached (13%)  · gpt-5.6-luna, deepseek-v4-flash
security:    $0.0016 · 60,057 in  / 1,658 out  · 3,736 cached (6%)   · gpt-5.6-luna
tests:       $0.0009 · 46,755 in  / 8,781 out  · 19,968 cached (43%) · deepseek-v4-flash
description: $0.0002 · 7,508 in   / 4,006 out  · 2,560 cached (34%)  · deepseek-v4-flash
e2e:         $0.0003 · 16,171 in  / 1,530 out  · 4,608 cached (28%)  · deepseek-v4-flash

mod service;

/// Entry points for hosts that link `TinyDocs` into their own executable.
#[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 critique confident

Exercise the static-link export path

The new static-link feature is only compiled when explicitly enabled, and the existing loader test exercises the dynamic-library path instead. No test builds this crate with static-link or verifies that the re-exported ABI symbols are present and callable, so errors in module_export_static!, the generated ABI, or the public re-exports will not be detected before a host tries to link against it. Add a dedicated static-link integration/compile test that enables the feature and calls or links the exported symbols.

[RULE] e2e-uncovered ·


/// Entry points for hosts that link `TinyDocs` into their own executable.
#[cfg(feature = "static-link")]
pub mod linked {

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

Cover the static-linking path with an end-to-end test

The new static-link feature and linked module provide public ABI symbols for hosts that want to link TinyDocs directly rather than loading it as a dynamic library. The only end-to-end test (module_e2e) builds and loads the dynamic library; it never enables the static-link feature or verifies that the exported symbols are present and usable. A bug in the static-linking path (e.g. a missing import, a mismatched macro) would not be caught until a host tries to use it.

Add a test that compiles the crate with --features static-link and verifies the re-exported symbols are callable, or exercise the path through a minimal host link.


Additional tests observation

priority medium confident

Add tests for the static-link feature path

[RULE] missing-test-coverage

The new pub mod linked and the conditional module_export_static! macro inside service/mod.rs are gated behind the static-link feature and have no test coverage. An earlier finding already flagged this gap. A compilation test or an integration test that builds with --features static-link and verifies the exported symbols are callable would prevent silent regressions.

[RULE] e2e-uncovered ·

@tinysweeper tinysweeper Bot added the priority: p1 Next. Wrong behaviour a user will hit, or a security weakness behind a condition. label Sep 25, 2026
@senamakel
senamakel marked this pull request as draft September 25, 2026 21:14

@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.

Requesting changes: 4 lane(s) blocking, worst finding is critical.

Fix or reply to the findings below and push. The next review clears this automatically once they are gone — you should not need to dismiss anything by hand.

             $0.0078 · 268,968 in / 34,511 out · 30,298 cached (11%) · ladder/vectors, gpt-5.6-luna, deepseek-v4-flash · 281 embedded
critique:    $0.0039 · 130,965 in / 9,517 out  · 6,164 cached (5%)   · gpt-5.6-luna, deepseek-v4-flash
security:    $0.0023 · 75,399 in  / 5,153 out  · 3,654 cached (5%)   · gpt-5.6-luna
tests:       $0.0009 · 39,470 in  / 11,487 out · 14,336 cached (36%) · deepseek-v4-flash
description: $0.0002 · 5,098 in   / 3,606 out  · 1,024 cached (20%)  · deepseek-v4-flash
e2e:         $0.0003 · 14,051 in  / 2,647 out  · 1,536 cached (11%)  · deepseek-v4-flash

Comment thread Cargo.toml
codegen-units = 1
strip = "debuginfo"

[patch.crates-io]

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 critical critique confident

Update Cargo.lock for the vendored TinyBus patches

These patches replace the registry resolutions recorded in the existing Cargo.lock with local path packages. Because the repository's CI and release commands use --locked, Cargo will reject the unchanged lockfile with “lock file needs to be updated but --locked was passed.” Regenerate and commit Cargo.lock after applying these patches.

[RULE] lockfile-sync ·

tinybus = { version = "=0.1.2", default-features = false, features = ["macros", "modules"] }
# The module-side SDK owns its runtime and exports the stable C entrypoints.
tinybus-module = { version = "0.1.0", path = "../../vendor/tinybus/crates/tinybus-module" }
tinybus-module = "=0.1.2"

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 high critique likely

Update vendor/tinybus to provide module_export_static! macro

The workspace patches tinybus-module to the vendored source, so this registry-looking dependency still resolves to the checked-out vendor implementation during workspace builds. The static-link implementation requires the vendor's static-export macro/API, but the vendor submodule was not available to verify that it provides the required macro. If it does not, enabling static-link fails to compile; update the vendored TinyBus revision/package together with this manifest change and verify the feature build.

[RULE] dependency-api-mismatch ·


[features]
# Link this adapter into a host binary without exporting the shared C names.
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 critique confident

Add tests for the static-link feature path

The feature declaration changes the crate's supported build matrix, but no feature-specific test is present for it. At minimum, CI should compile and test the crate with --features static-link; preferably it should also exercise the exported entry points so this configuration cannot silently drift.


Additional critique observation

priority medium confident

Exercise the static-link export path

[RULE] missing-feature-coverage

This feature introduces a separate public linking mode, but the repository context shows no test exercising the exported static-link symbols. A build or API change in this path can therefore pass CI while producing unusable host entry points. Add coverage that enables static-link and verifies the exported entry points can be linked and called.


Additional security observation

priority medium confident

Exercise the static-link export path

[RULE] missing-feature-coverage

This pull request introduces the static-link feature, but the repository still has no test that builds or loads the static-linked adapter. A feature-specific export or ABI regression can therefore pass CI unnoticed. Add coverage that enables this feature and verifies the resulting entry points.


Additional critique observation

priority medium confident

Cover the static-linking path with an end-to-end test

[RULE] missing-integration-test

The new feature is intended for hosts that link the adapter into their executable, yet the available test graph contains no caller for these symbols. Add an end-to-end host test that builds with static-link, links the adapter, and reaches the module initialization/manifest path rather than only testing the dynamic library.


Additional security observation

priority medium confident

Cover the static-linking path with an end-to-end test

[RULE] missing-feature-coverage

The static-linking path is a distinct integration mode from the cdylib path and is not exercised by the existing dynamic-module loader test. Add an end-to-end test that links the adapter into a host and invokes its exported service.


Additional security observation

priority medium confident

Add tests for the static-link feature path

[RULE] missing-feature-coverage

Enabling static-link currently adds an untested build configuration. Add a deterministic feature-enabled test or CI job so compilation and the static export behavior are checked before regressions reach users.


Additional security observation

priority medium confident

Add a test for the static-linking entry points

[RULE] missing-feature-coverage

The newly declared feature changes how the module's entry points are provided, yet no test covers those entry points in static-link mode. Add a test that calls the statically linked interface rather than only testing the separately loaded artifact.

[RULE] missing-feature-test ·

tinydocs-bus = { path = "../tinydocs-bus" }
# TinyBus provides the typed service interface and dynamic module host ABI.
tinybus = { version = "0.1.0", path = "../../vendor/tinybus/crates/tinybus", default-features = false, features = ["macros", "modules"] }
tinybus = { version = "=0.1.2", default-features = false, features = ["macros", "modules"] }

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 critique confident

Add a test for the static-linking entry points

The manifest now exposes a static-link configuration, while the repository context explicitly shows no test calling the resulting entry points. This leaves ABI initialization, manifest export, and symbol availability unchecked for the new caller mode. Add a dedicated test target or host fixture that enables the feature and invokes those entry points.

[RULE] missing-static-link-test ·

};
}

#[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 critique confident

Cover the static-linking path with an end-to-end test

The new linked_module entry point has no end-to-end coverage. Nothing verifies that a statically linked host can initialize the module and route a request through the generated exports, so this path can regress independently of the existing dynamic-loader tests. Add an end-to-end test or CI target that enables static-link and invokes the linked module.


Additional security observation

priority medium confident

Add tests for the static-link feature path

[RULE] missing-feature-test

There is no feature-enabled test covering compilation and behavior of the newly added static-link surface. Without it, changes to the conditional exports or macro expansion can silently break static consumers while the default feature tests continue to pass.


Additional tests observation

priority medium likely

Cover the static-linking path with an end-to-end test

[RULE] no-test-coverage

The static-linking path is used when a host links tinydocs-module as an rlib and calls linked_module to register the service. No test verifies that this works end-to-end when the feature is enabled. Add a test (possibly integration) that enables the feature and verifies the module can be initialised.

[RULE] missing-test ·

mod service;

/// Entry points for hosts that link `TinyDocs` into their own executable.
#[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 security confident

Cover the static-linking path with an end-to-end test

The static-link feature introduces a distinct host-integration path, but the existing loader coverage only exercises the dynamic module artifact. Add an end-to-end test that links the module into a host and reaches the service through that path.


Additional tests observation

priority medium confident

Exercise the static-link export path

[RULE] no-test-coverage

The static-link feature adds publicly exported entry points (linked_module, ABI symbols) but no test exercises them. A unit test that builds with the feature and calls one of these symbols would catch regressions (e.g., a missing re-export or a renamed macro). Add a test under #[cfg(feature = "static-link")] in a test module or in the existing test file.


Additional tests observation

priority medium confident

Add a test for the static-linking entry points

[RULE] no-test-coverage

The linked module re-exports ABI symbols like tinybus_module_init_v1. There is no test ensuring these symbols are actually reachable under the static-link feature. Add a test that enables the feature and calls one of them (or at least checks that the module compiles and the symbols are present).

[RULE] missing-integration-test ·

/// Entry points for hosts that link `TinyDocs` into their own executable.
#[cfg(feature = "static-link")]
pub mod linked {
pub use crate::service::exports::{

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 security confident

Add a test for the static-linking entry points

The ABI, init, and manifest symbols newly exposed through linked are not exercised by any test. Add a static-link test that resolves these entry points and verifies the manifest and initialization behavior expected by a linked host.

[RULE] missing-entrypoint-test ·

pub mod outputs;
mod service;

/// Entry points for hosts that link `TinyDocs` into their own executable.

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

Exercise the static-link export path

The static-link feature adds new public symbols (linked_module, TINYBUS_MODULE_ABI_V1, tinybus_module_init_v1, tinybus_module_manifest_v1) that are reachable by a host binary linking the crate as an rlib. No end-to-end test loads or calls these symbols. A test should build a small host program that depends on tinydocs-module with features = ["static-link"] and calls each exported function, verifying that the module initializes and reports a correct manifest. This finding was raised in earlier cycles and remains unaddressed.

[RULE] e2e-uncovered ·

repository = "https://github.com/tinyhumansai/tinydocs"
publish = false

[features]

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 tests for the static-link feature path

The static-link feature is defined but not tested. The absence of an end-to-end test means any regression in the static-linking entry points will go undetected. A test should be added (e.g., in tests/ as an integration test or via a #[cfg(feature = "static-link")] test) that exercises the feature. This finding was raised in earlier cycles and remains unaddressed.


Additional tests observation

priority medium confident

Add tests for the static-link feature path

[RULE] no-test-coverage

The new static-link feature flag is added with no corresponding test that exercises the code it gates. A test in the crate (e.g., a local unit test) should build with features = ["static-link"] and assert that the exported items exist and are callable.

[RULE] e2e-uncovered ·

)]
mod exports {
tinybus_module::module_export! {
pub(crate) mod exports {

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 a test for the static-linking entry points

The change uses module_export_optional_static! instead of module_export!. The exported symbols (ABI version, init, manifest) are now gated behind pub(crate) visibility and the macro may behave differently when the module is statically linked. No test verifies that linked_module returns a properly configured module host or that the ABI functions are callable. This finding was raised in earlier cycles and remains unaddressed.

[RULE] e2e-uncovered ·

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel marked this pull request as ready for review October 1, 2026 18:25
@senamakel
senamakel merged commit 9e93bd4 into tinyhumansai:main Oct 1, 2026
6 checks passed

@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/tinydocs-module/Cargo.toml, crates/tinydocs-module/src/lib.rs, crates/tinydocs-module/src/service/mod.rs, tinysweeper/description, tinysweeper/e2e, tinysweeper/tests.

$0.0000 · 0 in / 0 out · 281 embedded · ladder/vectors

@tinysweeper tinysweeper Bot added priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. and removed priority: p1 Next. Wrong behaviour a user will hit, or a security weakness behind a condition. labels Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant