Skip to content

fix(skills): compile the package bound test module - #858

Merged
vastsa merged 1 commit into
mainfrom
fix/skill-package-tests-module
Sep 22, 2026
Merged

vastsa merged 1 commit into
mainfrom
fix/skill-package-tests-module

Conversation

@vastsa

@vastsa vastsa commented Sep 22, 2026

Copy link
Copy Markdown
Owner

#855 shipped crates/host-core/src/user_skills/package_tests.rs — and never compiled it. The declaration #[cfg(test)] mod package_tests; was lost before the commit: the change was staged from a worktree where a revert experiment had restored user_skills.rs with git checkout --, which discarded the uncommitted declaration along with the experiment.

The file therefore shipped as an undeclared source file: its six bound tests never ran, the suite still reported 623 tests instead of 629, and CI had nothing to fail on. The production behavior of #855 is unaffected — the constants, the shared receiver bound, and the metadata pre-check all landed — but the record that pins them was dead weight.

Change

Evidence

  • cargo test -p host-core --locked -- --list now lists six user_skills::package_tests::* tests; before this fix it listed none.
  • cargo test -p host-core --locked: 629 passed (623 before).
  • Each bound is pinned by a test that fails when it is lowered, re-run on this branch:
    • per-resource 128 KiB → 3 failures (two_devices…, …accepts_a_data_shaped_package, …accepts_resources_above_the_document_limit).
    • receiver-only 128 KiB in engine_remote.rs → two_devices… fails with remote resource is too large.
    • 64 package files → …accepts_a_data_shaped_package fails.
    • 512 KiB per package → 2 failures.
  • cargo fmt --check and node scripts/check-architecture.mjs pass.

Follow-up

CI cannot see a source file that no module declares. A "no orphan source file" rule would have caught this, but a quick prototype flagged legitimate modules (the config_sync child modules and rpc/*_tests.rs), so it needs a real design rather than a rushed rule. Until then, verification for host changes includes counting listed tests, not only running them.

The package bound tests live in `user_skills/package_tests.rs` because
`tests.rs` crossed the rust file-size limit, but the declaration that compiles
that module never reached the commit: the change was staged from a tree where a
revert experiment had restored `user_skills.rs` with `git checkout --`. The file
shipped undeclared, so its six tests never ran, the suite still reported 623
tests, and CI had nothing to fail on.

Declare the module. The suite now reports 629 tests, six of them in
`user_skills::package_tests`, and each bound has a test that fails when it is
lowered.
Copilot AI lite review requested due to automatic review settings September 22, 2026 07:14

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vastsa
vastsa merged commit 583ec8f into main Sep 22, 2026
3 checks passed
@vastsa
vastsa deleted the fix/skill-package-tests-module branch September 22, 2026 07:36
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.

2 participants