Audit public API and SemVer surface (#103)
Some checks failed
API and SemVer surface / api-surface (push) Failing after 13m8s
Native code generation / deterministic (push) Failing after 2m8s
Concurrency and resource soak audit / soak (push) Failing after 6m39s
Imaging and meshing gate / native (push) Has been cancelled
Release platform and feature matrix / audit (push) Has been cancelled
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
Native Rust workspace compile / compile (push) Has been cancelled
Dependency and supply-chain audit / audit (push) Has been cancelled
JPEG 2000 feature / linux (push) Successful in 2m46s
Skia feature / linux (push) Successful in 31m0s

This commit is contained in:
2026-08-12 01:35:26 +00:00
parent 5eb3f01122
commit d08b59c9a9
35 changed files with 5112 additions and 67 deletions

View File

@@ -11,6 +11,7 @@ publish = false
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.11"
[lints]
workspace = true

File diff suppressed because it is too large Load Diff

View File

@@ -11,9 +11,11 @@ use std::path::{Path, PathBuf};
use std::process::{Command, ExitStatus, Stdio};
use std::time::{SystemTime, UNIX_EPOCH};
mod api_surface;
mod dependency;
mod documentation;
pub use api_surface::{audit_api_surface, write_api_baseline};
pub use dependency::audit_dependencies;
pub use documentation::{audit_documentation, write_documentation_report};

View File

@@ -1,6 +1,6 @@
use metacrate_ci_matrix::{
audit, audit_dependencies, audit_documentation, load, run, workspace_root,
write_documentation_report,
audit, audit_api_surface, audit_dependencies, audit_documentation, load, run, workspace_root,
write_api_baseline, write_documentation_report,
};
use std::path::{Path, PathBuf};
@@ -67,9 +67,27 @@ fn execute() -> Result<(), Box<dyn std::error::Error>> {
audit_documentation(&root, &evidence)?;
println!("documentation coverage: ok ({})", evidence.display());
}
Some("api-baseline-write") if arguments.next().is_none() => {
write_api_baseline(&root)?;
println!("API/SemVer baseline and report: updated");
}
Some("api-audit") => {
let flag = arguments
.next()
.ok_or("api-audit requires --evidence FILE")?;
let evidence = arguments
.next()
.ok_or("api-audit requires --evidence FILE")?;
if flag != "--evidence" || arguments.next().is_some() {
return Err("usage: ci-matrix api-audit --evidence FILE".into());
}
let evidence = absolute_or_rooted(&root, &evidence);
audit_api_surface(&root, &evidence)?;
println!("API/SemVer surface: ok ({})", evidence.display());
}
_ => {
return Err(
"usage: ci-matrix audit | run PROFILE --evidence FILE | dependency-audit --evidence FILE | documentation-report | documentation-audit --evidence FILE"
"usage: ci-matrix audit | run PROFILE --evidence FILE | dependency-audit --evidence FILE | documentation-report | documentation-audit --evidence FILE | api-baseline-write | api-audit --evidence FILE"
.into(),
);
}

View File

@@ -2921,10 +2921,12 @@ NATIVE_MESSAGE_CODEC_TYPES = {
OPEN_ENUM_IDS = {"T:LibreMetaverse.BakeType", "T:LibreMetaverse.HoleType"}
TRAIT_SUPERTRAITS = {
"T:LibreMetaverse.IBakingTextureProvider": "std::any::Any + Send + Sync",
"T:LibreMetaverse.IGridClient": "Send + Sync",
"T:LibreMetaverse.Interfaces.IMessage": "std::any::Any",
"T:LibreMetaverse.Appearance.ICurrentOutfitPolicy": "Send + Sync",
"T:LibreMetaverse.RLV.IRlvActionCallbacks": "Send + Sync",
"T:LibreMetaverse.RLV.IRlvQueryCallbacks": "Send + Sync",
"T:LibreMetaverse.Voice.WebRTC.IVoiceLogger": "Send + Sync",
}
CORE_NAMESPACES = (
"LibreMetaverse.Http",

View File

@@ -1271,7 +1271,19 @@ def parameter_slug(value: str) -> str:
def member_signature(mapper: Mapper, owner: dict, item: dict, rust_name: str) -> tuple[str, str, str, str, str]:
if item["doc_id"] in MEMBER_SIGNATURE_OVERRIDES:
signature, ownership = MEMBER_SIGNATURE_OVERRIDES[item["doc_id"]]
return signature, ownership, "sync", "Result<_, crate::Error>", "method"
error_model = (
"none"
if item["doc_id"] == "P:LibreMetaverse.ExpiringCache`2.Item(`0)"
else "Result<_, crate::Error>"
)
asyncness = (
"async"
if signature.startswith("pub async fn")
else "boxed_future"
if "dyn std::future::Future" in signature
else "sync"
)
return signature, ownership, asyncness, error_model, "method"
generics = generic_names(item, owner)
mapped_parameters = [map_parameter(mapper, parameter, generics) for parameter in item.get("parameters", [])]
packet_owner = owner["doc_id"].startswith("T:LibreMetaverse.Packets.")