Skip to content

feat: give fensu-facts and fensu-native a deliberate Rust API and release them with Fensu - #133

Merged
kvlonge merged 4 commits into
mainfrom
chore/publish-analysis-crates
Nov 14, 2026
Merged

kvlonge merged 4 commits into
mainfrom
chore/publish-analysis-crates

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

SQLBuild needs Fensu's Python analysis and core rules from Rust (CHI-1353). fensu-facts and fensu-native 0.1.0 were published by hand from this branch's first commit, but that surface was never designed as a library: no clean constructor, internals public, bundled SQLite always pulled in, and a fresh project can't build them.

Changes

  • fensu-native: rule functions and models at the crate root, rule codes in rules::constants, internals pub(crate). rusqlite, flate2 and sha2 are optional, enabled by python.
  • fensu-facts: root ProgramHandle and ParseFailure, new ProgramHandle::parse_source(source, major, minor). Modules shared with the workspace are #[doc(hidden)].
  • fensu-facts pins get-size2 = "=0.10.1": later versions use compact_str 0.10, which breaks ruff_python_ast 0.0.4 in a fresh resolution. That also breaks 0.1.0.
  • Versions locked to Fensu's, managed by Release Please, like fensu-policy. The release metadata check, version guard and publish metadata step cover the new files.
  • publish.yml publishes fensu-facts, then fensu-native, on Rust 1.95.
  • The shared-crate check packages both, and a fresh project runs evaluate_core_rules with default-features = false. It fails if Python, SQLite or compression crates appear.

Verification

  • Clippy with and without default features, Rust and Python self-checks 0 faults.
  • cargo test -p fensu-facts -p fensu-native -p fensu-cli, release metadata tests, and focused Python tests loading fensu._native.
  • The shared-crate script end to end.
  • One independent review covering the 0.1.0 surface, and one follow-up, both clean.
  • After release: yank 0.1.0 of both crates, which don't build fresh.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Deploying fensu with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1aa7c07
Status: ✅  Deploy successful!
Preview URL: https://e06718a4.fensu.pages.dev
Branch Preview URL: https://chore-publish-analysis-crate.fensu.pages.dev

View logs

@kvlonge
kvlonge enabled auto-merge (squash) November 14, 2026 08:31
@kvlonge
kvlonge disabled auto-merge November 14, 2026 08:39
@kvlonge kvlonge changed the title chore(release): publish fensu-facts and fensu-native for Rust consumers feat: give fensu-facts and fensu-native a deliberate Rust API and release them with Fensu Nov 14, 2026
@kvlonge
kvlonge enabled auto-merge (squash) November 14, 2026 09:12
@kvlonge
kvlonge merged commit 2cf1440 into main Nov 14, 2026
38 checks passed
@kvlonge
kvlonge deleted the chore/publish-analysis-crates branch November 14, 2026 09:18
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