Skip to content

chore(xtest): Enables pqc on platform checkouts#484

Merged
dmihalcik-virtru merged 7 commits into
mainfrom
DSPX-3499-pqcrun
Jun 9, 2026
Merged

chore(xtest): Enables pqc on platform checkouts#484
dmihalcik-virtru merged 7 commits into
mainfrom
DSPX-3499-pqcrun

Conversation

@dmihalcik-virtru

@dmihalcik-virtru dmihalcik-virtru commented Jun 5, 2026

Copy link
Copy Markdown
Member
  • Enables preview support for hybrid post-quantum/traditional TDF in key management services.
    • Notably, fixes the log-based detection of PQC feature support at platform startup, which had been incorrectly skipping all PQC tests
  • Updated test workflows to use pinned PQC-enabled action versions for platform initialization and key server management.

With this fix (run from this branch):
image

Without this fix (last night's scheduled run):

image

Summary by CodeRabbit

  • New Features

    • Enabled hybrid TDF as a preview feature for key-management instances.
  • Chores

    • Updated CI workflows to use pinned action revisions and enable PQC support.
    • Added a draft specification for PQC and hybrid test behaviors.
  • Bug Fixes / Tests

    • Improved test tooling log parsing to more reliably detect configured key algorithms.

@dmihalcik-virtru dmihalcik-virtru requested review from a team as code owners June 5, 2026 17:34
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Pins CI startup actions to PQC-enabled revisions and passes pqc-enabled: true to platform and additional KAS startup steps; enables services.kas.preview.hybrid_tdf_enabled for key-management KAS instances; updates xtest km1 log parsing to prefer the kas trust mechanisms initialized message; and adds a draft spec (DSPX-3499) documenting PQC/hybrid test skip behavior.

Changes

PQC and Hybrid TDF Test Infrastructure

Layer / File(s) Summary
Feature specification for PQC and hybrid TDF tests
spec/DSPX-3499.md
Adds a draft specification file with ticket metadata and a scaffolded outline for PQC/hybrid pq/t test skip behavior and acceptance criteria.
Hybrid TDF service configuration
otdf-local/src/otdf_local/services/kas.py
Sets services.kas.preview.hybrid_tdf_enabled = True when is_key_management is true inside KAS _generate_config.
Test infrastructure setup for PQC
.github/workflows/vulnerability.yml, .github/workflows/xtest.yml
Pins opentdf/platform/test/start-up-with-containers and opentdf/platform/test/start-additional-kas to PQC-enabled revisions and adds pqc-enabled: true inputs to platform and multikas startup steps.
xtest KM1 log parsing update
xtest/tdfs.py
Prefers the kas trust mechanisms initialized INFO entry and returns its mechanisms; updates fallback matching to kas config loaded and continues extracting algorithms from entry['config'].

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • opentdf/tests#443: Related xtest CI changes enabling PQC test execution alongside workflow adjustments.
  • opentdf/tests#464: Related changes to xtest workflow handling of PQC test inclusion/exclusion.

Suggested reviewers

  • jakedoublev
  • sievdokymov-virtru

Poem

🐰 I hopped through workflows pinned and neat,
PQC flags set, containers start on beat,
KAS now says "preview: true" in stride,
Logs whisper mechanisms now bona fide,
A draft spec naps while tests aligned — hooray! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore(xtest): Enables pqc on platform checkouts' accurately summarizes the main objective of the changeset, which is to enable PQC support across the test infrastructure by updating workflows and configurations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DSPX-3499-pqcrun

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request enables the hybrid_tdf_enabled preview setting in the local KAS service configuration when key management is active. It also adds a draft specification document (spec/DSPX-3499.md) for handling pqc and hybrid pq/t tests. However, the specification document currently contains placeholder text for several key sections that should be fully documented before merging.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread spec/DSPX-3499.md
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

X-Test Failure Report

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
otdf-local/src/otdf_local/services/kas.py (1)

1-229: ⚠️ Potential issue | 🟠 Major

Run Python quality gates for otdf-local (ruff + pyright) before merge: the attempted checks didn’t run because uv wasn’t available (uv: command not found). From otdf-local/, run:

  • uv run ruff check .
  • uv run ruff format . (and re-stage any changes)
  • uv run pyright
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@otdf-local/src/otdf_local/services/kas.py` around lines 1 - 229, The
CI-quality checks for this module failed because the repo-level task runner "uv"
was not available; from the otdf-local root run the requested linters and type
checks (uv run ruff check ., uv run ruff format . then re-stage, and uv run
pyright); if "uv" is not installed on your environment, run ruff and pyright
directly (ruff check ., ruff format . then git add any formatted files, and
pyright) and fix any reported issues in this file (look for KASService,
KASManager, and get_kas_manager) before re-running the checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/vulnerability.yml:
- Around line 39-42: The workflow startup step that invokes the action
"opentdf/platform/test/start-up-with-containers@626ce47dd662cb8ff16898e3b6727001a4753d92"
currently doesn't pass the pqc-enabled input; update that action invocation (the
step using that "uses" string) to include the input kv pair pqc-enabled: true
under its with: block so the startup runs with PQC explicitly enabled.

---

Outside diff comments:
In `@otdf-local/src/otdf_local/services/kas.py`:
- Around line 1-229: The CI-quality checks for this module failed because the
repo-level task runner "uv" was not available; from the otdf-local root run the
requested linters and type checks (uv run ruff check ., uv run ruff format .
then re-stage, and uv run pyright); if "uv" is not installed on your
environment, run ruff and pyright directly (ruff check ., ruff format . then git
add any formatted files, and pyright) and fix any reported issues in this file
(look for KASService, KASManager, and get_kas_manager) before re-running the
checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c822ec94-7fc8-4e60-8cbb-13d7313d26eb

📥 Commits

Reviewing files that changed from the base of the PR and between d9d34b0 and 67d3b32.

📒 Files selected for processing (4)
  • .github/workflows/vulnerability.yml
  • .github/workflows/xtest.yml
  • otdf-local/src/otdf_local/services/kas.py
  • spec/DSPX-3499.md

Comment thread .github/workflows/vulnerability.yml Outdated
@dmihalcik-virtru dmihalcik-virtru changed the title chore(xtest): Enables pqc on platform checkouts" chore(xtest): Enables pqc on platform checkouts Jun 8, 2026

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (2)
spec/DSPX-3499.md (2)

9-9: ⚡ Quick win

Link the implementing PR in prs metadata.

prs: [] drops traceability to this change set. Please add the current PR reference (for example, opentdf/tests#484) so the draft spec is connected to implementation history.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@spec/DSPX-3499.md` at line 9, The prs metadata currently is empty (`prs:
[]`), breaking traceability; update the `prs` entry in spec/DSPX-3499.md by
replacing the empty list with the implementing PR reference (e.g., `prs:
["opentdf/tests#484"]`) so the draft spec links to the corresponding
implementation PR.

36-39: ⚡ Quick win

Replace placeholder acceptance criteria with explicit skip/run conditions.

The current checklist is not verifiable. Please define concrete outcomes (e.g., when PQC/hybrid support is detected tests must run; when features are absent tests must skip with expected reason) so this draft can serve as an executable contract for CI behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@spec/DSPX-3499.md` around lines 36 - 39, Replace the placeholder checklist
under the "## Acceptance Criteria" header with explicit, testable skip/run
conditions: for each bullet (currently "_Clear, testable condition_" and "_…_")
state the exact detection condition (e.g., "If PQC or hybrid cryptography
support is detected via feature flag X or environment variable Y, run tests A,
B, C"), and the explicit skip condition and reason (e.g., "If feature X is
absent, skip tests A, B, C with skip-reason 'PQC support missing'"), include
expected pass/fail outcomes and the CI signal (e.g., exit code or artifact) so
the criteria act as an executable contract for CI behavior; update any
referenced test names or feature identifiers to the real symbols used in the
codebase (e.g., the feature flag name or test suite names) so automation can map
these acceptance criteria directly to CI logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@spec/DSPX-3499.md`:
- Line 9: The prs metadata currently is empty (`prs: []`), breaking
traceability; update the `prs` entry in spec/DSPX-3499.md by replacing the empty
list with the implementing PR reference (e.g., `prs: ["opentdf/tests#484"]`) so
the draft spec links to the corresponding implementation PR.
- Around line 36-39: Replace the placeholder checklist under the "## Acceptance
Criteria" header with explicit, testable skip/run conditions: for each bullet
(currently "_Clear, testable condition_" and "_…_") state the exact detection
condition (e.g., "If PQC or hybrid cryptography support is detected via feature
flag X or environment variable Y, run tests A, B, C"), and the explicit skip
condition and reason (e.g., "If feature X is absent, skip tests A, B, C with
skip-reason 'PQC support missing'"), include expected pass/fail outcomes and the
CI signal (e.g., exit code or artifact) so the criteria act as an executable
contract for CI behavior; update any referenced test names or feature
identifiers to the real symbols used in the codebase (e.g., the feature flag
name or test suite names) so automation can map these acceptance criteria
directly to CI logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8b0a7653-570f-46e5-8212-4ff3a6f9c050

📥 Commits

Reviewing files that changed from the base of the PR and between 67d3b32 and 6def870.

📒 Files selected for processing (4)
  • .github/workflows/vulnerability.yml
  • .github/workflows/xtest.yml
  • otdf-local/src/otdf_local/services/kas.py
  • spec/DSPX-3499.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • otdf-local/src/otdf_local/services/kas.py
  • .github/workflows/xtest.yml
  • .github/workflows/vulnerability.yml

_algs_from_km1_log was checking for "kas initialized" and "kas config",
but the platform emits "kas trust mechanisms initialized" and "kas config
loaded". Neither branch matched, so the function always returned an empty
set and every test_pqc.* skipped with "platform service ... doesn't yet
support [mechanism-xwing|secpmlkem|mlkem]".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dmihalcik-virtru dmihalcik-virtru merged commit 86e1425 into main Jun 9, 2026
6 checks passed
@dmihalcik-virtru dmihalcik-virtru deleted the DSPX-3499-pqcrun branch June 9, 2026 15:23
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

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.

2 participants