Skip to content

Fix issue #866: Implement the atomic single-PR change: swap ZZ/XX meanings, add the placeholder-swap - #868

Open
octoaide[bot] wants to merge 2 commits into
mainfrom
octoaide/issue-866-1788464921649
Open

Fix issue #866: Implement the atomic single-PR change: swap ZZ/XX meanings, add the placeholder-swap#868
octoaide[bot] wants to merge 2 commits into
mainfrom
octoaide/issue-866-1788464921649

Conversation

@octoaide

@octoaide octoaide Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Implement the atomic single-PR change: swap ZZ/XX meanings, add the placeholder-swap migration and retry-safe checkpointing, allow placeholder filtering, and update docs/tests. Create a draft branch/PR containing code, tests, and docs per the issue plan.

Changed files

  • CHANGELOG.md
  • Cargo.toml
  • README.md
  • src/event.rs
  • src/event/bootp.rs
  • src/event/common.rs
  • src/event/conn.rs
  • src/event/dcerpc.rs
  • src/event/dhcp.rs
  • src/event/dns.rs
  • src/event/ftp.rs
  • src/event/http.rs
  • src/event/kerberos.rs
  • src/event/ldap.rs
  • src/event/malformed_dns.rs
  • src/event/mqtt.rs
  • src/event/network.rs
  • src/event/nfs.rs
  • src/event/ntlm.rs
  • src/event/radius.rs
  • src/event/rdp.rs
  • src/event/smb.rs
  • src/event/smtp.rs
  • src/event/ssh.rs
  • src/event/stored_timestamp_contract.rs
  • src/event/tls.rs
  • src/event/tor.rs
  • src/event/unusual_destination_pattern.rs
  • src/lib.rs
  • src/migration.rs
  • src/migration/migration_structures.rs
  • src/util.rs

Closes #866


This pull request was automatically created by octoaide.

@octoaide
octoaide Bot requested a review from sophie-cluml September 3, 2026 20:06
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.10429% with 58 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.74%. Comparing base (8a29d66) to head (eabbd86).

Files with missing lines Patch % Lines
src/migration/migration_structures.rs 6.77% 55 Missing ⚠️
src/migration.rs 99.13% 2 Missing ⚠️
src/util.rs 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #868      +/-   ##
==========================================
+ Coverage   84.58%   84.74%   +0.16%     
==========================================
  Files          92       92              
  Lines       37105    37524     +419     
==========================================
+ Hits        31385    31801     +416     
- Misses       5720     5723       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/migration.rs Outdated

/// Last default-column-family key durably processed by the placeholder swap.
const COUNTRY_CODE_SWAP_CHECKPOINT_KEY: &[u8] =
b"migration/0.47.0-alpha.3/country-code-placeholder-swap/checkpoint";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
b"migration/0.47.0-alpha.3/country-code-placeholder-swap/checkpoint";
b"migration/0.47.0/country-code-placeholder-swap/checkpoint";

The migration logic looks sound. My two suggestions make the checkpoint and completion keys stable across the 0.47 prerelease chain. Later alphas extend the same migration, so tying these keys to alpha.3 risks renaming them and reapplying the non-idempotent swap. Please use the final 0.47.0 format namespace before merge.

Comment thread src/migration.rs Outdated

/// Durable marker preventing the placeholder swap from being applied twice.
const COUNTRY_CODE_SWAP_COMPLETED_KEY: &[u8] =
b"migration/0.47.0-alpha.3/country-code-placeholder-swap/completed";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
b"migration/0.47.0-alpha.3/country-code-placeholder-swap/completed";
b"migration/0.47.0/country-code-placeholder-swap/completed";

Use the final 0.47.0 namespace for checkpoint and completion
keys to preserve idempotence across prerelease updates.
@octoaide

octoaide Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

Implemented the reviewer’s checkpoint-key feedback in eabbd86.

  • Updated the migration checkpoint key to the stable 0.47.0 namespace.
  • Updated the completion key to the same namespace.
  • This keeps migration state stable across the 0.47 prerelease chain and prevents the non-idempotent swap from being reapplied.

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.

Swap the meanings of the ZZ and XX country placeholders and make them filterable

1 participant