Skip to content

test(codecs): add native codec compatibility coverage - #26257

Open
pront wants to merge 9 commits into
masterfrom
pront-native-fixture-cleanup
Open

test(codecs): add native codec compatibility coverage#26257
pront wants to merge 9 commits into
masterfrom
pront-native-fixture-cleanup

Conversation

@pront

@pront pront commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Motivation

Native codec tests currently rely on large historical fixture snapshots for both current round-trip behavior and backward compatibility. Before removing that fixture machinery in a separate PR, establish explicit replacement coverage that distinguishes those two jobs.

Changes

  • add 1,000-case in-memory canonicalization property tests for native JSON and Protobuf
  • add frozen protobuf wire payloads for pre-v24 metric variants, pre-v0.27 tags, pre-v34 metadata, and pre-v41 missing source event IDs
  • generate JSON-safe logs, metrics, traces, metadata, tags, and values with a dedicated proptest strategy
  • keep the replacement tests independent of the fixture generator's QuickCheck implementation
  • retain every historical fixture, fixture test, generator binary, feature, and runtime compatibility path unchanged

Fixture removal is intentionally deferred to a follow-up PR.

References

None.

Vector configuration

Not applicable; this adds test coverage only.

How did you test this PR?

  • cargo test -p codecs --test native — 18 passed, including the existing fixture suite and 2,000 generated cases; 5 ignored
  • cargo test -p vector-core event::proto::tests — 4 passed
  • cargo check -p vector-core --features generate-fixtures --bin generate-fixtures
  • cargo clippy -p codecs --test native -- -D warnings
  • cargo fmt --all -- --check

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

Contributor Guidelines

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them. To catch issues early, add a pre-push hook (template) or run the following locally before pushing:
    • make fmt
    • make check-clippy (auto-fix with make clippy-fix)
    • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details on the dd-rust-license-tool.

@pront pront added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Aug 28, 2026
@github-actions github-actions Bot added the domain: core Anything related to core crates i.e. vector-core, core-common, etc label Aug 28, 2026
@pront pront changed the title chore(codecs): replace native encoding fixtures with focused tests test(codecs): add native codec compatibility coverage Aug 28, 2026
@pront
pront marked this pull request as ready for review August 28, 2026 20:20
@pront
pront requested a review from a team as a code owner August 28, 2026 20:20

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdc6a50c7e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/codecs/tests/native.rs Outdated
Comment thread lib/vector-core/src/event/proto.rs Outdated
Comment thread lib/codecs/tests/native.rs Outdated
Comment thread lib/codecs/tests/native.rs
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T01:25:31.642905Z da08ead New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]

This comment was marked as outdated.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6f8a4889ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/codecs/tests/native.rs Outdated
Comment thread lib/codecs/tests/native.rs
Comment thread lib/codecs/tests/native.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: core Anything related to core crates i.e. vector-core, core-common, etc no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant