Skip to content

Add package-boundary smoke test for cargo publish/package #411

Description

@coderabbitai

Summary

PR #409 inlines the ninja_env crate to unblock cargo publish and updates Cargo.toml's include list to add build_l10n_audit.rs. No automated test covers the publish/package boundary itself: the PR's test changes are limited to import updates and YAML/TOML contract tests, not cargo publish --dry-run or the resulting crate contents.

Rationale

Manifest include/exclude regressions (e.g. a build-script file silently dropped from the packaged tarball) will not be caught by unit or behavioural tests, only by manually running cargo package/cargo publish --dry-run, which is not automated. This class of failure surfaces only when someone actually attempts a release.

Affected areas

  • Cargo.toml (include list, package metadata)
  • build.rs / build_l10n_audit.rs (build script dependency implicitly required by the packaged crate)
  • CI/test suite (no current coverage of the packaging boundary)

Suggested change

Add a package-boundary smoke test or manifest-include contract, for example:

  • A test (or CI step) that runs cargo package --list (or cargo publish --dry-run) and asserts the resulting file list contains build_l10n_audit.rs and any other build-script dependencies.
  • Optionally, assert absence of stale entries (e.g. no lingering ninja_env/ paths) to guard against similar regressions in future refactors.

Acceptance criteria

  • Automated check (test or CI job) fails if cargo package/cargo publish --dry-run fails.
  • Automated check fails if build_l10n_audit.rs (or other build-script sources required at build time) is missing from the packaged file list.
  • Check runs as part of the standard CI pipeline (not just a manual step).

References

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions