Skip to content

build: the crates.io package carries only what builds the crate, and CI builds it - #1127

Merged
DrunkOnJava merged 5 commits into
mainfrom
build/crate-include-allowlist
Oct 30, 2026
Merged

DrunkOnJava merged 5 commits into
mainfrom
build/crate-include-allowlist

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Cargo.toml's exclude list let cargo package the whole repository. An include allowlist now keeps what the crate needs. The doc job builds the packaged crate on every pull request.

Motivation

Found in a repository audit (2026-10-30). cargo package --list gave 1,252 files, 12 MiB uncompressed:

  • 286 examples
  • 258 reports
  • 180 tools files
  • 98 docs
  • BACKLOG.md and TODO.md
  • the launch drafts
  • .devcontainer, .vscode and .cursor

The 0.10.0 crate is 3.6 MB of crates.io's 10 MB limit, and reports/ grows with every RE finding. Nothing in CI ran cargo package; only publish.yml:449 publishes. A file the list missed would therefore first fail at release.

Changes

  • Cargo.toml: include = ["/src/**/*.rs", "/docs/support-matrix.json", "/docs/data/tag-drift-2016-2026.csv", "/README.md", "/LICENSE", "/NOTICE"]. The two data files are the only include_str!/include_bytes! targets in src/ (src/capability.rs:17, src/class_tag_map.rs:47). cargo package now packs 185 files (--list prints 187 lines with Cargo.toml.orig and .cargo_vcs_info.json). The examples, tests and benches are left out, and cargo drops their targets from the packaged manifest.
  • ci.yml, doc job: cargo package -p rvt --locked (builds the packaged crate, as cargo publish verifies it). It is in an existing job, so the CI passed needs-list is unchanged.
  • changelog.d/changed/crate-include-allowlist.md.

Testing

The new step ran in this PR's cargo doc job (job 123953269254): Packaged 185 files, 4.1MiB (1.0MiB compressed), then Verifying rvt v0.10.0 built the packaged crate in 51.6 s. cargo dropped the targets whose files are left out, as intended: the 285 examples, the integration test and the four benches, each with an "ignoring … not included in the published package" warning. For comparison, 0.10.0 on crates.io is 3.6 MB compressed.

Audit-honesty checklist

  • Changelog fragment
  • Workflow YAML parses (yaml.safe_load), and the file mode is unchanged

Breaking changes

None for the API. Users of the crates.io tarball no longer get the repository's examples, tests, reports or tooling; they remain on GitHub.

Related issues

None.

…CI builds it

Cargo.toml's exclude list let cargo package the whole repository: 1,252 files, 12 MiB uncompressed, 3.6 MB of crates.io's 10 MB limit for 0.10.0, and growing with every RE report. An include allowlist keeps the source, the two files it embeds with include_str! (docs/support-matrix.json, docs/data/tag-drift-2016-2026.csv), the README and the licence files. The doc job now runs cargo package -p rvt, which builds the packaged crate, so a file the list misses fails on the pull request instead of at release.
@DrunkOnJava
DrunkOnJava disabled auto-merge October 30, 2026 07:53

@DrunkOnJava DrunkOnJava left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Maintainer self-review. GitHub does not let a PR's author approve it, so this review stands in for an approval: I read the full diff and checked each claim.

  • Cargo.toml: include lists exactly the two include_str! targets in src/ (src/capability.rs:17 → docs/support-matrix.json; src/class_tag_map.rs:47 → docs/data/tag-drift-2016-2026.csv, which #1131 will drop once class_tag_map is gone). git grep 'include_str!\|include_bytes!' -- src finds no other target. readme = "README.md" is covered. LICENSE and NOTICE ship.
  • ci.yml: the step sits in the existing doc job, so CI passed's needs-list is unchanged. The YAML parses, and the file mode is unchanged.
  • Verified: the step built and verified the packaged crate (185 files, 1.0 MiB compressed, 51.6 s), dropping the example, test and bench targets as expected. The changelog's figures are now cargo's own.

Ready to land on CI passed.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 30, 2026 08:23
@DrunkOnJava
DrunkOnJava merged commit ce29ab2 into main Oct 30, 2026
30 checks passed
@DrunkOnJava
DrunkOnJava deleted the build/crate-include-allowlist branch October 30, 2026 08:29
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…ons, which nothing uses (#1131)

## Summary

Removes three research modules that nothing calls. All three sat behind
`unstable-research`, outside the semver promise.

## Motivation

A repository audit (2026-10-30) checked `src/`, `src/bin`, `tests`,
`examples`, `benches`, `fuzz`, `rvt-py` and `rvt-wasm`. Only
`src/lib.rs` and `src/research.rs` named these modules, to declare them:
- `relations.rs` (320 lines) calls itself "architecture stubs", with
"nothing here wired into default IFC emission".
- `compound_framing.rs` (150 lines) is a marker tokenizer for the RE-15
compound ArcWall study.
- `class_tag_map.rs` (109 lines) is a 2016–2026 tag lookup from
`docs/data/tag-drift-2016-2026.csv`. `formats::SchemaClasses` (`by_tag`)
reads each file's own tags instead.

## Changes

- Delete the three files, their `#[path]` declarations and module-list
lines in `src/research.rs`, and their `pub(crate) use` entries in
`src/lib.rs`.
- `docs/support-matrix.json`: the #154 status sentence no longer names
`class_tag_map`.
- `examples/probe_arcwall_2024.rs`: its doc names the CSV, not the
module.
- `changelog.d/removed/dead-research-modules.md`.
- `Cargo.toml` (after #1127 landed): the `include` list drops
`docs/data/tag-drift-2016-2026.csv`, which only `class_tag_map`
embedded. `src/capability.rs`'s `docs/support-matrix.json` is now the
one `include_str!` target. The CSV stays in the repository for
`examples/tag_drift_svg.rs`.

## Testing

N/A for output: no exporter path used these modules. CI's clippy and
rustdoc runs check that nothing still names them.

## Breaking changes

Only under `unstable-research`: `rvt::research::{class_tag_map,
compound_framing, relations}` go.

## Related issues

Refs #154.
DrunkOnJava added a commit that referenced this pull request Oct 30, 2026
…te, rvt-probes (#1132)

## Summary

The 244 `probe_*.rs` programs behind the RE reports move from
`examples/` into `probes/examples/`, the examples of a new unpublished
workspace crate, `rvt-probes`. `rvt`'s builds and CI checks stop
compiling them. CI's clippy job checks them once.

## Motivation

Griffin's decision, from the 2026-10-30 interview: the audit's four
refactors, this one included. As examples of `rvt`, all 244 probes
compiled in every `--all-targets` run: clippy, the Linux build, the MSRV
check and the Windows and macOS builds. `cargo package` also had to skip
each one (#1127).

## Changes

- **`probes/Cargo.toml`:** `rvt-probes`, `publish = false`. It depends
on `rvt` (with `unstable-research`) and the five crates the probes use
directly: anyhow, cfb, memchr, serde_json and sha2. It is a workspace
member, and `Cargo.lock` gains only its entry (`cargo metadata --locked
--offline` resolves).
- **The move:** `git mv examples/probe_*.rs probes/examples/`. The 49
corpus defaults built from `CARGO_MANIFEST_DIR` gain `/..`. The 186 run
commands in the probes' module docs name `-p rvt-probes`. rustfmt
reflowed the lines that grew.
- **CI:** `cargo clippy -p rvt-probes --examples --no-deps -- -D
warnings` in the clippy job.
- **Measure:** a probe builds with `-p rvt-probes` from
`probes/examples`, or from `examples/` on a ref older than this move, so
base runs on older commits still work. Both land in
`target/ci/examples`, which `measure-reference-models.sh` already runs
from.
- **Docs:** CONTRIBUTING, the PR template, the README,
`examples/README.md`, a new `probes/README.md`, the support matrix's 104
evidence paths, rustdoc in four modules, and 61 scorers' docstrings.
Reports and dated research notes keep the paths they were written with;
git follows the rename.
- **Changelog:** `changelog.d/changed/probes-crate.md`.

The user examples (`basics_*`) and the ~37 earlier research tools stay
in `examples/`, since the README and the reconnaissance report cite them
by path.

## Testing

- CI is the compile check: the new clippy step builds all 244 probes,
and the `rvt` jobs prove they no longer need them.
- Measure
[41027853083](https://github.com/DrunkOnJava/rvt-rs/actions/runs/41027853083)
runs this branch's workflow and code with two probes on Core Interior
(`probe_re70_wall_join_lists` scored by `wall_join_lists_vs_ifc`, and
`probe_re33_category_census`). That proves the new build path end to
end. The result will be posted here before merge.

## Breaking changes

None for the crate. Anyone running a probe adds `-p rvt-probes`.

## Related issues

None.
Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 31, 2026
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.

1 participant