Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v2.0.0 - 2026-09-08

- Cut the Rust source API over to explicit borrowed execution options for CSV analysis, preview, output, paste transformation, and quick generation; the public wire contracts and CLI/Tauri command names remain unchanged.
- Centralize frontend protection readiness so disabled controls and direct CSV, paste, and quick actions agree, including selected Local AI download blocking and the specific malformed tokenization-key error.
- Isolate anonymization job transport tracking and split internal core type ownership behind the unchanged root type façade.

## v1.0.93 - 2026-09-08

- Close anonymization disclosure paths in pasted text and XML, including complete PEM redaction, character-reference transformation, and honest residual-audit evidence.
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
resolver = "3"

[workspace.package]
version = "1.0.93"
version = "2.0.0"
edition = "2024"
license = "MIT"
authors = ["Douwe de Vries <douwe.de.vries.82@gmail.com>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<category>Utility</category>
</categories>
<releases>
<release version="2.0.0" date="2026-09-08" />
<release version="1.0.93" date="2026-09-08" />
<release version="1.0.92" date="2026-08-19" />
<release version="1.0.91" date="2026-08-18" />
Expand Down
63 changes: 36 additions & 27 deletions crates/csv-anonymizer-app/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pub(crate) fn run_cli(action: CliAction) -> Result<(), String> {
match action {
CliAction::Analyze { input } => {
let headers = service
.analyze_csv(&input)
.analyze_csv(&input, csv_anonymizer_core::CsvAnalysisOptions::default())
.map_err(|error| error.to_string())?;
println!(
"CSV Anonymizer {} inspected {} rows in {}",
Expand All @@ -145,7 +145,7 @@ pub(crate) fn run_cli(action: CliAction) -> Result<(), String> {
}
CliAction::SmokeAnonymize { input, output } => {
let headers = service
.analyze_csv(&input)
.analyze_csv(&input, csv_anonymizer_core::CsvAnalysisOptions::default())
.map_err(|error| error.to_string())?;
let columns = headers
.columns
Expand All @@ -158,29 +158,35 @@ pub(crate) fn run_cli(action: CliAction) -> Result<(), String> {
}

let preview = service
.preview_anonymization(PreviewParams {
file_path: input.clone(),
columns: columns.clone(),
controls: vec![],
sample_count: 2,
// The analyze and anonymize calls either side of this one take
// the service default, so the preview has to ask for it too.
sample_row_count: 100,
})
.preview_anonymization(
PreviewParams {
file_path: input.clone(),
columns: columns.clone(),
controls: vec![],
sample_count: 2,
// The analyze and anonymize calls either side of this one take
// the service default, so the preview has to ask for it too.
sample_row_count: 100,
},
csv_anonymizer_core::TransformRuntime::default(),
)
.map_err(|error| error.to_string())?;
if preview.previews.is_empty() {
return Err("smoke preview did not produce any column samples".to_string());
}

let result = service
.anonymize_csv(AnonymizeParams {
file_path: input,
output_path: output,
columns,
controls: vec![],
force: true,
preview_smart_replacements: preview.smart_replacements,
})
.anonymize_csv(
AnonymizeParams {
file_path: input,
output_path: output,
columns,
controls: vec![],
force: true,
preview_smart_replacements: preview.smart_replacements,
},
csv_anonymizer_core::CsvRunOptions::default(),
)
.map_err(|error| error.to_string())?;
println!(
"CSV Anonymizer smoke OK: wrote {} rows to {} in {} ms",
Expand All @@ -197,14 +203,17 @@ pub(crate) fn run_cli(action: CliAction) -> Result<(), String> {
force,
} => {
let result = service
.anonymize_csv(AnonymizeParams {
file_path: input,
output_path: output,
columns,
controls: vec![],
force,
preview_smart_replacements: vec![],
})
.anonymize_csv(
AnonymizeParams {
file_path: input,
output_path: output,
columns,
controls: vec![],
force,
preview_smart_replacements: vec![],
},
csv_anonymizer_core::CsvRunOptions::default(),
)
.map_err(|error| error.to_string())?;
println!(
"Wrote {} rows to {} in {} ms",
Expand Down
68 changes: 37 additions & 31 deletions crates/csv-anonymizer-core/benches/csv_streaming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,28 @@ fn bench_standard_csv_streaming(c: &mut Criterion) {
c.bench_function("anonymize_standard_streaming_10k", |b| {
b.iter(|| {
service
.anonymize_csv(AnonymizeParams {
file_path: black_box(input_path.clone()),
output_path: output_path.clone(),
columns: vec![1, 2],
controls: vec![
ColumnControl {
column_index: 1,
type_override: Some(DataType::Email),
strategy: AnonymizationStrategy::Auto,
},
ColumnControl {
column_index: 2,
type_override: Some(DataType::FullName),
strategy: AnonymizationStrategy::Auto,
},
],
force: true,
preview_smart_replacements: vec![],
})
.anonymize_csv(
AnonymizeParams {
file_path: black_box(input_path.clone()),
output_path: output_path.clone(),
columns: vec![1, 2],
controls: vec![
ColumnControl {
column_index: 1,
type_override: Some(DataType::Email),
strategy: AnonymizationStrategy::Auto,
},
ColumnControl {
column_index: 2,
type_override: Some(DataType::FullName),
strategy: AnonymizationStrategy::Auto,
},
],
force: true,
preview_smart_replacements: vec![],
},
csv_anonymizer_core::CsvRunOptions::default(),
)
.expect("standard anonymization should succeed")
})
});
Expand Down Expand Up @@ -108,18 +111,21 @@ fn bench_cardinality(c: &mut Criterion) {
group.bench_function(format!("{strategy_label}_{shape_label}_10k"), |b| {
b.iter(|| {
service
.anonymize_csv(AnonymizeParams {
file_path: black_box(input_path.clone()),
output_path: output_path.clone(),
columns: vec![1],
controls: vec![ColumnControl {
column_index: 1,
type_override: Some(DataType::String),
strategy,
}],
force: true,
preview_smart_replacements: vec![],
})
.anonymize_csv(
AnonymizeParams {
file_path: black_box(input_path.clone()),
output_path: output_path.clone(),
columns: vec![1],
controls: vec![ColumnControl {
column_index: 1,
type_override: Some(DataType::String),
strategy,
}],
force: true,
preview_smart_replacements: vec![],
},
csv_anonymizer_core::CsvRunOptions::default(),
)
.expect("cardinality anonymization should succeed")
})
});
Expand Down
Loading
Loading