Merge bfloat16-senbei workspace restructure, bump to 1.1.0

Adopts the fork's workspace split (senbei-cli / senbei-crypto / senbei-io /
senbei-metadata / senbei-pe), its structured error taxonomy, entry-transform
and layout validation, PE32 dd8 key-formula selection with a skip floor, the
CRT entry-stub dd8 oracle, and the extensionless-file scan skip.

Kept from senbei on top of the restructure:
- ManagedExe detection/routing and the CLR (COR20 + BSJB) metadata restore
  in the EXE pipeline.
- The RET+int3 padding fingerprint as the primary dd8 padding signal, ahead
  of the mutated-position 0xCC fallback.
- docs/, .github/, samples/, tests/ (moved to senbei-cli/tests), and the
  web/ wasm frontend (rewired to the split crates), all of which the fork
  had dropped.
- The fork's README compatibility matrix is not taken: it names real games,
  which the public-repo hygiene rules forbid.
- The wasm32 localtime fallback in logfile and unpack_bytes_force_exe (the
  web app's trap-recovery entry point), both lost in the restructure.

Golden corpus: 35/35 byte-identical. clippy -D warnings clean; wasm32 check
clean for the full workspace.
This commit is contained in:
2026-08-30 22:31:21 +08:00
49 changed files with 5259 additions and 3856 deletions
+31
View File
@@ -0,0 +1,31 @@
use senbei_io::job::{default_out_root_for_file, out_name};
use std::path::Path;
#[test]
fn out_name_inserts_unpack_before_last_dot() {
assert_eq!(out_name(Path::new("foo.exe")), Path::new("foo.unpack.exe"));
assert_eq!(
out_name(Path::new("a/b/bar.dll")),
Path::new("a/b/bar.unpack.dll")
);
assert_eq!(out_name(Path::new("x.y.dll")), Path::new("x.y.unpack.dll"));
}
#[test]
fn out_name_no_dot_appends_unpack() {
assert_eq!(out_name(Path::new("nodot")), Path::new("nodot.unpack"));
}
#[test]
fn default_out_root_for_file_is_parent_unpack() {
assert_eq!(
default_out_root_for_file(Path::new("a/b/foo.exe")),
Path::new("a/b/unpack")
);
}
#[test]
fn default_out_root_for_file_cwd_when_no_parent() {
let p = default_out_root_for_file(Path::new("foo.exe"));
assert_eq!(p, Path::new(".").join("unpack"));
}