Skip to content

test: linked admission test for the static-link build - #39

Merged
senamakel merged 2 commits into
mainfrom
tiny-modules-e0
Oct 12, 2026
Merged

senamakel merged 2 commits into
mainfrom
tiny-modules-e0

Conversation

@senamakel

@senamakel senamakel commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Part of tinyhumansai/openhuman#7524, leaf issue tinyhumansai/openhuman#7610 (E0.3).

Verified: the module crate builds as rlib+cdylib and uses module_export_optional_static! with a static-link feature. It lacked a test asserting linked_module() is admitted by ModuleHost::attach_linked_with_config. This adds tests/static_link.rs (gated on static-link; covered by the existing --all-features CI lane).

Local: cargo test --features static-link --test static_link passes.

Summary by CodeRabbit

  • Tests
    • Added a check that the statically linked TinyDocs module attaches to its host and becomes ready within 10 seconds.

…linked_with_config

Verification for tinyhumansai/openhuman#7610 (E0.3, epic #7524): the linked
export must be admitted and reach Ready.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

Or wait 44 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: 6378cc01-5e79-42b4-a440-2329bc2bbcfd

📥 Commits

Reviewing files that changed from the base of the PR and between c1c0dac and f169278.


📒 Files selected for processing (1)
  • crates/tinydocs-module/tests/static_link.rs

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: 82bb338e-79a8-4c84-af07-ed92b3cca65e

📥 Commits

Reviewing files that changed from the base of the PR and between 7354dd4 and c1c0dac.


📒 Files selected for processing (1)
  • crates/tinydocs-module/tests/static_link.rs

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



📝 Walkthrough
📝 Walkthrough

Walkthrough

Adds a Tokio integration test, enabled with static-link, that attaches the linked TinyDocs module to a ModuleHost and waits for it to reach Ready.

Changes

Module readiness test

Layer / File(s) Summary
Attach module and check readiness
crates/tinydocs-module/tests/static_link.rs
The test starts a broker on a memory bus, attaches the module with empty JSON configuration, checks admission and the module name, then polls for Ready for up to 10 seconds.

Priority: ⬇️ Low

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

Change: Other


Merge Risk: ⚪ Minimal · up to c1c0d

The new static-link test checks attachment and readiness without changing production behavior. No merge-blocking issue is identified.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the added test for linked module admission in the static-link build.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
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.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the module’s name,
Then waits for Ready all the same.
Ten seconds pass, the polls go by,
The host reports the state is nigh.
The bunny hops, test green and done.

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

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@senamakel
senamakel merged commit dcac0f8 into main Oct 12, 2026
14 checks passed
@tinysweeper

tinysweeper Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper completed its review; deterministic results follow.

State: Ready for maintainer review
Priority: none
Reviewed head: f1692787ebd4
Updated: 2026-10-13T10:29:07Z

Review snapshot

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

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

What changed

Adds a 39-line integration test file, `crates/tinydocs-module/tests/static_link.rs`. The test is compiled only under `#![cfg(feature = "static-link")]` and allows `clippy::unwrap_used`/`clippy::expect_used`; on a two-worker multi-thread Tokio runtime it builds a `MemoryBus` and `Broker`, spawns the broker on the bus, constructs a `ModuleHost`, calls `attach_linked_with_config(tinydocs_module::linked_module().unwrap(), serde_json::json!({}))`, asserts `info.name == "tinydocs-module"`, and polls `host.list()` every 10 ms until any module state matches `ModuleState::Ready`, wrapped in a 10-second `tokio::time::timeout`. No production code, documentation, or configuration is modified.

Features

  • Added — Static-link admission integration test through ModuleHost: Introduces a feature-gated integration test that exercises the statically linked module end to end against a real `ModuleHost`, verifying the module is admitted by `attach_linked_with_config` and transitions to `ModuleState::Ready`. It is gated by the same `static-link` feature that gates the `tinydocs_module::linked_module()` re-export it calls, and its `serde_json` and TinyBus dev-dependencies are declared in the crate manifest, so it is inert in builds without that feature. Because `vendor/tinybus` is not checked out, the TinyBus host API surface it depends on could not be verified against its definitions. (crates/tinydocs-module/tests/static_link.rs)

Tests

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

Findings

No active actionable findings.

Before merge

None.

Agent review details

critique

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The `#![cfg(feature = "static-link")]` gate matches the feature gating the re-export the test calls, and the `serde_json` and TinyBus dev-dependencies it uses are declared in the crate manifest; no defect was found in the file.
  • Lane summary: This adds a feature-gated integration test that attaches the statically linked module to a real `ModuleHost` over an in-memory bus and polls until the module reports `Ready`; the `#![cfg(feature = "static-link")]` gate matches the re-export it calls, and `serde_json` and the TinyBus dev-dependency it uses are declared in the crate manifest. I found no defect in the file. The one thing I could not check is the TinyBus host API itself — `vendor/tinybus` is not checked out here, so `Broker::spawn`, `ModuleHost::new`/`list`/`attach_linked_with_config` and `ModuleState::Ready` were never visible to me, and no finding rests on them. _The code index is behind this pull request (indexed at `b5e9f852feb2`), so retrieved context may be out of date._

security

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The test uses only already-exported crate API (`tinydocs_module::linked_module`, gated by the same feature the test is gated on), takes no untrusted input, and introduces no network, subprocess, deserialization, or permission changes.
  • Lane summary: This pull request adds one feature-gated integration test, `crates/tinydocs-module/tests/static_link.rs`, which drives the statically linked module through `ModuleHost` over an in-memory bus and waits for `Ready`. The test uses only already-exported crate API (`tinydocs_module::linked_module`, gated by the same `static-link` feature the test is gated on), takes no untrusted input, and introduces no network, subprocess, deserialization, or permission changes. The vendored TinyBus submodule is not checked out here, so the `attach_linked_with_config`, `Broker`, `MemoryBus`, and `ModuleState` signatures could not be verified against their definitions; nothing in the diff shows a defect. No findings. _The code index is behind this pull request (indexed at `b5e9f852feb2`), so retrieved context may be out of date._

tests

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Positive: No behavioural change: nothing outside documentation, configuration and tests.
  • Lane summary: No behavioural change: nothing outside documentation, configuration and tests.

commits

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

description

  • Conclusion: Success
  • Scope reviewed: all assigned evidence
  • Positive: The pull request body matches the diff: one added file gated by `#![cfg(feature = "static-link")]` that attaches `tinydocs_module::linked_module()` via `ModuleHost::attach_linked_with_config` and waits up to 10s for `ModuleState::Ready`, with no significant change unmentioned.
  • Lane summary: The body accurately describes the diff: it adds exactly one file, `crates/tinydocs-module/tests/static_link.rs`, gated with `#![cfg(feature = "static-link")]`, which attaches `tinydocs_module::linked_module()` through `ModuleHost::attach_linked_with_config` and waits up to 10s for `ModuleState::Ready` — exactly what the body claims. I could not verify the tinybus API surface (vendor/tinybus is not checked out) or that the `--all-features` CI lane actually runs this file, but the description asserts nothing the diff contradicts, and no significant change goes unmentioned. _The code index is behind this pull request (indexed at `b5e9f852feb2`), so retrieved context may be out of date._
Evidence and run details
  • Models: ladder/vectors-oai3, deepseek-v4.1-flash
  • Spend: $0.002165
  • Tokens: 103383 input · 26924 output · 9216 cached · 107 embedding
Head State Pass summary
f1692787ebd4 incomplete 0 active finding(s), 0 resolved finding(s) (at 2026-10-13T10:13:20Z)
f1692787ebd4 ready for maintainer review 0 active finding(s), 0 resolved finding(s) (at 2026-10-13T10:29:07Z)

tinysweeper 0.1.2

@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: crates/tinydocs-module/tests/static_link.rs, tinysweeper/description.

          $0.0005 · 26,533 in / 1,914 out · 3,968 cached (15%) · ladder/vectors-oai3, glm-5.3-flash, deepseek-v4.1-flash · 107 embedded
critique: $0.0001 · 13,028 in / 893 out   · 2,176 cached (17%) · glm-5.3-flash
security: $0.0004 · 13,505 in / 1,021 out · 1,792 cached (13%) · deepseek-v4.1-flash

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Oct 13, 2026

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

             $0.0022 · 103,383 in / 26,924 out · 9,216 cached (9%)  · ladder/vectors-oai3, deepseek-v4.1-flash · 107 embedded
critique:    $0.0009 · 43,671 in  / 9,554 out  · 2,176 cached (5%)  · deepseek-v4.1-flash
security:    $0.0005 · 40,673 in  / 7,992 out  · 3,968 cached (10%) · deepseek-v4.1-flash
description: $0.0005 · 16,852 in  / 7,371 out  · 3,072 cached (18%) · deepseek-v4.1-flash

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