Skip to content

feat(pq-key-encoder): phase 0 - move test fixtures to shared directory (ENG-1303, ENG-1304)#6

Merged
eacet merged 1 commit intomainfrom
feature/eng-1303
Feb 11, 2026
Merged

feat(pq-key-encoder): phase 0 - move test fixtures to shared directory (ENG-1303, ENG-1304)#6
eacet merged 1 commit intomainfrom
feature/eng-1303

Conversation

@eacet
Copy link
Copy Markdown
Member

@eacet eacet commented Feb 10, 2026

No description provided.

@linear
Copy link
Copy Markdown

linear bot commented Feb 10, 2026

ENG-1303 0.1: Move fixture files to shared test-data directory

  • Create packages/pq-key-encoder/test-data/test-keys/ directory
  • Move all 24 files from packages/pq-key-encoder/ts/tests/data/test-keys/ to packages/pq-key-encoder/test-data/test-keys/
  • Remove the now-empty packages/pq-key-encoder/ts/tests/data/test-keys/ directory (and data/ if empty)

ENG-1304 0.2: Update TypeScript test references

Update fixture path in packages/pq-key-encoder/ts/tests/test-keys.test.ts from:

const fixtureDir = new URL('./data/test-keys/', import.meta.url);

to:

const fixtureDir = new URL('../../test-data/test-keys/', import.meta.url);

Verify TypeScript tests still pass: cd packages/pq-key-encoder/ts && bun test

Copy link
Copy Markdown
Member Author

eacet commented Feb 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@eacet eacet changed the title Move test fixtures to shared test-data directory feat: phase 0 - move test fixtures to shared directory (ENG-1303, ENG-1304) Feb 10, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Feb 10, 2026

Greptile Overview

Greptile Summary

This PR relocates pq-key-encoder key fixtures from packages/pq-key-encoder/ts/tests/data/test-keys/ into a shared directory at packages/pq-key-encoder/test-data/test-keys/, and updates the test (ts/tests/test-keys.test.ts) to load fixtures from the new path via import.meta.url.

The change keeps fixture contents the same (git detects renames) and the tests continue to validate that fromDER/fromPEM decode both public and private keys and that the decoded key sizes match pq-oid’s Algorithm metadata.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk.
  • Changes are limited to moving test fixtures and updating a single relative fixture path in one test; no production code paths are altered.
  • No files require special attention.

Important Files Changed

Filename Overview
packages/pq-key-encoder/test-data/test-keys/ml_dsa_44_priv.der Renamed/moved DER private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_dsa_44_priv.pem Renamed/moved PEM private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_dsa_44_pub.der Renamed/moved DER public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_dsa_44_pub.pem Renamed/moved PEM public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_dsa_65_priv.der Renamed/moved DER private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_dsa_65_priv.pem Renamed/moved PEM private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_dsa_65_pub.der Renamed/moved DER public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_dsa_65_pub.pem Renamed/moved PEM public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_1024_priv.der Renamed/moved DER private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_1024_priv.pem Renamed/moved PEM private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_1024_pub.der Renamed/moved DER public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_1024_pub.pem Renamed/moved PEM public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_512_priv.der Renamed/moved DER private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_512_priv.pem Renamed/moved PEM private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_512_pub.der Renamed/moved DER public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_512_pub.pem Renamed/moved PEM public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_768_priv.der Renamed/moved DER private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_768_priv.pem Renamed/moved PEM private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_768_pub.der Renamed/moved DER public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/ml_kem_768_pub.pem Renamed/moved PEM public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/slh_dsa_sha2_128s_priv.der Renamed/moved DER private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/slh_dsa_sha2_128s_priv.pem Renamed/moved PEM private key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/slh_dsa_sha2_128s_pub.der Renamed/moved DER public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/test-data/test-keys/slh_dsa_sha2_128s_pub.pem Renamed/moved PEM public key fixture into shared test-data directory (no content change).
packages/pq-key-encoder/ts/tests/test-keys.test.ts Updated fixtureDir URL to point at new shared test-data directory.

Sequence Diagram

sequenceDiagram
  autonumber
  participant T as bun:test runner
  participant S as test-keys.test.ts
  participant FS as node:fs
  participant F as test-data fixtures
  participant L as pq-key-encoder (fromDER/fromPEM)
  participant O as pq-oid Algorithm

  T->>S: execute test suite
  loop each {alg,prefix} case
    S->>O: Algorithm.get(alg)
    S->>FS: readFileSync(URL(prefix_pub.der))
    FS->>F: read bytes
    S->>L: fromDER(bytes)
    L-->>S: {alg,type,bytes}

    S->>FS: readFileSync(URL(prefix_priv.der))
    FS->>F: read bytes
    S->>L: fromDER(bytes)
    L-->>S: {alg,type,bytes}

    S->>FS: readFileSync(URL(prefix_pub.pem), 'utf8')
    FS->>F: read string
    S->>L: fromPEM(pem)
    L-->>S: {alg,type,bytes}

    S->>FS: readFileSync(URL(prefix_priv.pem), 'utf8')
    FS->>F: read string
    S->>L: fromPEM(pem)
    L-->>S: {alg,type,bytes}
  end
  T-->>T: assertions pass
Loading

@eacet eacet changed the title feat: phase 0 - move test fixtures to shared directory (ENG-1303, ENG-1304) feat(pq-key-encoder): move test fixtures to shared directory (ENG-1303, ENG-1304) Feb 10, 2026
@eacet eacet changed the title feat(pq-key-encoder): move test fixtures to shared directory (ENG-1303, ENG-1304) feat(pq-key-encoder): phase 0 - move test fixtures to shared directory (ENG-1303, ENG-1304) Feb 10, 2026
Copy link
Copy Markdown
Member Author

eacet commented Feb 10, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ 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".

Copy link
Copy Markdown
Member Author

eacet commented Feb 11, 2026

Merge activity

  • Feb 11, 4:53 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 11, 4:53 AM UTC: @eacet merged this pull request with Graphite.

@eacet eacet merged commit 672d7c2 into main Feb 11, 2026
6 of 7 checks passed
@eacet eacet deleted the feature/eng-1303 branch February 11, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant