Skip to content

perf(cf06): parallelize deterministic oracle validation - #17

Merged
TheHalfMoon merged 1 commit into
mainfrom
perf/cf06-oracle-runtime-hardening
Aug 18, 2026
Merged

perf(cf06): parallelize deterministic oracle validation#17
TheHalfMoon merged 1 commit into
mainfrom
perf/cf06-oracle-runtime-hardening

Conversation

@TheHalfMoon

@TheHalfMoon TheHalfMoon commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

Parallelize the existing CF-06 oracle validation workflow across two independent GitHub-hosted jobs while preserving every existing assertion and failure-path check. A final fail-closed enforcement job requires both validation suites to succeed.

Production DAG

  • oracle-self-smoke
    • build pinned HL7 oracle adapter
    • resolve and verify the pinned R4 package context
    • run real R4 self-equivalence oracle smoke
    • run commandF self-diff smoke
  • oracle-changed-profile
    • independently build the same pinned adapter
    • independently resolve and verify the same pinned R4 package context
    • build deterministic changed-profile fixtures
    • preserve invalid-empty fail-closed coverage
    • preserve corrupted-cache fail-closed coverage on both sides
    • preserve byte-deterministic changed-profile oracle evidence
    • preserve commandF/oracle reconciliation assertions
  • oracle-proof
    • runs always() and fails unless both validation suites concluded success

Semantic boundary

No Rust, Java oracle, fixture, package-resolution, corpus, Cargo dependency, schema, or HL7 pin changes are included. Existing semantic assertions are copied unchanged into their corresponding suite. The production HL7 oracle identity remains release 6.10.2 at source commit d06577dbc5c62c74a2a8823fbc4830a3024d5b0b.

Supply-chain hardening

The touched workflow now pins actions/checkout, actions/setup-java, and dtolnay/rust-toolchain to immutable commit SHAs matching the versions already proven by the H0 harness.

H0 provenance

H0 experimental run 32067554329 completed three successful exact-head attempts on 1d15fe0aa0724f18f75ca56c06576983e0fce462. The replicated benchmark reduced wall time from the 5792-second serial baseline to 2998s, 2942s, and 2863s (48.239%–50.570% improvement under the measured hosted-runner conditions). This PR does not claim that production CI will reproduce that exact speedup; exact-head production workflow timing is still required.

Validation status

  • Local YAML parse: PASS
  • Changed files: exactly .github/workflows/cf06-oracle.yml
  • Exact-head CI: PENDING
  • Production semantic-equivalence review: PENDING exact-head execution
  • Runtime improvement: PENDING exact-head execution
  • Independent review: PENDING

This PR must remain Draft. Do not merge without explicit founder authorization.


Summary by cubic

Parallelizes CF‑06 oracle validation by replacing the previous single serial workflow with two parallel jobs and a fail‑closed gate. Old behavior: one job ran all validations. New behavior: oracle-self-smoke and oracle-changed-profile run independently, and oracle-proof fails unless both succeed; all assertions and failure paths are unchanged.

Review notes

  • Only .github/workflows/cf06-oracle.yml changed; no Rust/Java, fixture, package-resolution, corpus, schema, or HL7 pin changes. The HL7 oracle identity remains 6.10.2.
  • Both suites independently build the pinned HL7 oracle adapter and resolve/verify the same R4 package context to avoid shared state.
  • The changed-profile suite preserves invalid-empty and corrupted-cache fail‑closed coverage, byte‑deterministic evidence, and commandF/oracle reconciliation assertions.
  • Adds a final oracle-proof job that runs always() and enforces success of both validation suites.
  • Pins actions/checkout, actions/setup-java, and dtolnay/rust-toolchain to immutable SHAs for supply‑chain hardening. H0 experiments observed ~48–51% faster wall time; production CI timing may vary.

Written for commit 098f644. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Chores
    • Updated Oracle validation workflows with pinned tooling and credentialless checkout.
    • Added validation for changed profiles using the real HL7 R4 context.
    • Added a final verification step that reports success only when all Oracle validations pass.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c0c211c6-092b-4b4e-a090-b26b72855300

📥 Commits

Reviewing files that changed from the base of the PR and between d66f6c7 and 098f644.

📒 Files selected for processing (1)
  • .github/workflows/cf06-oracle.yml

Included review availability: Your plan includes up to 3 reviews per rolling hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Oracle workflow replaces the adapter job, adds changed-profile validation with verified HL7 R4 context, pins action revisions, disables persisted checkout credentials, and adds an aggregation job that requires both validation jobs to succeed.

Changes

Oracle CI validation

Layer / File(s) Summary
Oracle validation jobs
.github/workflows/cf06-oracle.yml
The workflow runs pinned self-smoke and changed-profile validation. Checkout does not persist credentials. The changed-profile job packages the adapter and verifies the resolved HL7 R4 context.
Oracle validation proof
.github/workflows/cf06-oracle.yml
The always-running oracle-proof job depends on both validation jobs and fails unless both report success.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 098f6

This PR only reorganizes the existing validation workflow and adds a fail-closed aggregation job; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly summarizes the main change: parallelizing deterministic CF-06 oracle validation.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch perf/cf06-oracle-runtime-hardening

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

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@TheHalfMoon
TheHalfMoon marked this pull request as ready for review August 18, 2026 15:55
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Parallelize CF-06 oracle validation with a fail-closed proof gate

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Runs self-smoke and changed-profile oracle validation concurrently in isolated jobs.
• Adds a fail-closed gate requiring both validation suites to succeed.
• Pins workflow actions to immutable SHAs and disables checkout credential persistence.
Diagram

graph TD
  W["CF-06 Workflow"] --> S["Self Smoke"] --> P["Proof Gate"]
  W --> C["Changed Profile"] --> P
Loading
High-Level Assessment

The explicit two-job split is appropriate for a narrowly scoped performance change: it exposes suite ownership clearly, preserves isolation, and enables straightforward fail-closed enforcement. A matrix or reusable setup workflow could reduce duplication, but would add conditional orchestration or broaden the change without improving validation semantics.

Files changed (1) +44 / -4

Other (1) +44 / -4
cf06-oracle.ymlSplit oracle validation into parallel suites with proof enforcement +44/-4

Split oracle validation into parallel suites with proof enforcement

• Separates self-equivalence smoke checks from changed-profile, corruption, determinism, and reconciliation checks so they run concurrently on independent runners. Adds an always-running proof job that fails unless both suites succeed, and pins setup actions to immutable commits with checkout credentials disabled.

.github/workflows/cf06-oracle.yml

@greptile-apps

greptile-apps Bot commented Aug 18, 2026

Copy link
Copy Markdown

Greptile Summary

The PR parallelizes CF-06 oracle validation into two independent suites and adds a fail-closed aggregation job.

  • Independently provisions the Java, Rust, adapter, and R4 package context in both validation jobs.
  • Preserves self-smoke and changed-profile assertions while allowing the suites to execute concurrently.
  • Pins workflow actions to immutable revisions and disables persisted checkout credentials.
  • Adds oracle-proof, which succeeds only when both validation suites succeed.

Confidence Score: 4/5

The PR appears safe to merge from a functional perspective, with only a non-blocking documentation mismatch concerning the renamed and parallelized job topology.

Both validation jobs recreate their required state independently and the proof job rejects every non-success dependency result; the remaining issue is that CF-06 convergence documentation still specifies the removed single-job structure.

Files Needing Attention: .github/workflows/cf06-oracle.yml and specs/006-cf-06-hl7-oracle-divergence/convergence.md

Important Files Changed

Filename Overview
.github/workflows/cf06-oracle.yml Splits the serial oracle job into two self-contained parallel jobs and a fail-closed proof gate; implementation is coherent, but the documented workflow topology is now stale.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Workflow trigger] --> B[oracle-self-smoke]
    A --> C[oracle-changed-profile]
    B --> D[oracle-proof]
    C --> D
    D -->|Both results are success| E[CF-06 validation passes]
    D -->|Either result is non-success| F[CF-06 validation fails closed]
Loading

Reviews (1): Last reviewed commit: "perf(cf06): parallelize deterministic or..." | Re-trigger Greptile

Comment on lines +13 to +14
oracle-self-smoke:
name: oracle-self-smoke

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Workflow topology documentation is stale

Replacing the documented single oracle-adapter job with oracle-self-smoke, oracle-changed-profile, and oracle-proof leaves the CF-06 convergence document describing a nonexistent job and outdated final workflow structure, which can mislead maintainers validating the intended CI topology.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@TheHalfMoon
TheHalfMoon merged commit 3df3717 into main Aug 18, 2026
7 checks passed
@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (2) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. ubuntu-latest runner is mutable 📘 Rule violation § Compliance
Description
The newly added validation jobs select ubuntu-latest, allowing their runner environment to change
without a repository change. This makes the production validation DAG dependent on a mutable
infrastructure identifier.
Code

.github/workflows/cf06-oracle.yml[97]

+    runs-on: ubuntu-latest
Relevance

●●● Strong

Recent workflow hardening accepted immutable dependency pinning, supporting enforcement of mutable
infrastructure identifiers.

PR-#12

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 2717380 prohibits mutable image or artifact tags in production infrastructure definitions. Both
newly added jobs use the floating ubuntu-latest runner label.

Rule 2717380: Disallow mutable image or package tags in production infrastructure definitions
.github/workflows/cf06-oracle.yml[97-97]
.github/workflows/cf06-oracle.yml[280-280]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The newly added jobs use the mutable `ubuntu-latest` runner label.

## Issue Context
Compliance rule 2717380 requires production infrastructure definitions to use immutable, fully specified image or artifact identifiers. Select a fixed runner image version or an immutable self-hosted runner image reference for both new jobs.

## Fix Focus Areas
- .github/workflows/cf06-oracle.yml[97-97]
- .github/workflows/cf06-oracle.yml[280-280]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. java-version is not exact 📘 Rule violation § Compliance
Description
The new changed-profile job requests only Java major version 17, allowing different JDK patch and
build versions to be installed over time. This leaves a package dependency in the production
validation environment unpinned.
Code

.github/workflows/cf06-oracle.yml[R102-105]

+      - uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
+        with:
+          distribution: temurin
+          java-version: '17'
Relevance

●●● Strong

The repository recently accepted supply-chain pinning for workflow dependencies; exact Java
selection follows the same reproducibility concern.

PR-#12

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 2717380 requires package dependencies in production infrastructure definitions to use fully
specified versions. The added setup step pins the action itself by commit but requests the mutable
Java version selector 17.

Rule 2717380: Disallow mutable image or package tags in production infrastructure definitions
.github/workflows/cf06-oracle.yml[102-105]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new job configures `actions/setup-java` with the floating major version `17` rather than an exact JDK patch and build.

## Issue Context
Compliance rule 2717380 requires package versions in production infrastructure definitions to be fully specified. Configure the Temurin installation with an exact supported JDK version and build identifier.

## Fix Focus Areas
- .github/workflows/cf06-oracle.yml[102-105]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Workflow contract remains stale 🐞 Bug ⚙ Maintainability
Description
The workflow renames oracle-adapter and splits its validation into three jobs, but the CF-06
convergence contract still says the final workflow contains only the oracle-adapter job. This
leaves reviewers and operators with an incorrect description of the required validation checks.
Code

.github/workflows/cf06-oracle.yml[R13-14]

+  oracle-self-smoke:
+    name: oracle-self-smoke
Relevance

●●● Strong

Renaming workflow jobs leaves the canonical convergence contract factually stale; documentation
should match the production DAG.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed workflow defines two independent validation jobs and an aggregate proof job, while the
canonical CF-06 convergence document explicitly states that this workflow contains only a job named
oracle-adapter.

.github/workflows/cf06-oracle.yml[13-14]
.github/workflows/cf06-oracle.yml[95-97]
.github/workflows/cf06-oracle.yml[274-289]
specs/006-cf-06-hl7-oracle-divergence/convergence.md[51-51]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Update the CF-06 convergence documentation so it describes the new parallel validation DAG rather than claiming the workflow contains only `oracle-adapter`.

## Issue Context
The workflow now consists of `oracle-self-smoke`, `oracle-changed-profile`, and the fail-closed `oracle-proof` aggregate job. Preserve the documentation's distinction between oracle-specific validation and general mainline CI.

## Fix Focus Areas
- specs/006-cf-06-hl7-oracle-divergence/convergence.md[51-51]
- .github/workflows/cf06-oracle.yml[13-14]
- .github/workflows/cf06-oracle.yml[95-96]
- .github/workflows/cf06-oracle.yml[274-289]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context
✅ Compliance rules (platform): 13 rules
Review mode: ⚖️ Balanced: This changes CI workflow behavior and supply-chain action pinning, with parallel job dependencies and fail-closed enforcement; it carries meaningful correctness and security risk but is localized enough for one careful review.

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo


oracle-changed-profile:
name: oracle-changed-profile
runs-on: ubuntu-latest

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. ubuntu-latest runner is mutable 📘 Rule violation § Compliance

The newly added validation jobs select ubuntu-latest, allowing their runner environment to change
without a repository change. This makes the production validation DAG dependent on a mutable
infrastructure identifier.
Agent Prompt
## Issue description
The newly added jobs use the mutable `ubuntu-latest` runner label.

## Issue Context
Compliance rule 2717380 requires production infrastructure definitions to use immutable, fully specified image or artifact identifiers. Select a fixed runner image version or an immutable self-hosted runner image reference for both new jobs.

## Fix Focus Areas
- .github/workflows/cf06-oracle.yml[97-97]
- .github/workflows/cf06-oracle.yml[280-280]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +102 to +105
- uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: temurin
java-version: '17'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. java-version is not exact 📘 Rule violation § Compliance

The new changed-profile job requests only Java major version 17, allowing different JDK patch and
build versions to be installed over time. This leaves a package dependency in the production
validation environment unpinned.
Agent Prompt
## Issue description
The new job configures `actions/setup-java` with the floating major version `17` rather than an exact JDK patch and build.

## Issue Context
Compliance rule 2717380 requires package versions in production infrastructure definitions to be fully specified. Configure the Temurin installation with an exact supported JDK version and build identifier.

## Fix Focus Areas
- .github/workflows/cf06-oracle.yml[102-105]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +13 to +14
oracle-self-smoke:
name: oracle-self-smoke

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

3. Workflow contract remains stale 🐞 Bug ⚙ Maintainability

The workflow renames oracle-adapter and splits its validation into three jobs, but the CF-06
convergence contract still says the final workflow contains only the oracle-adapter job. This
leaves reviewers and operators with an incorrect description of the required validation checks.
Agent Prompt
## Issue description
Update the CF-06 convergence documentation so it describes the new parallel validation DAG rather than claiming the workflow contains only `oracle-adapter`.

## Issue Context
The workflow now consists of `oracle-self-smoke`, `oracle-changed-profile`, and the fail-closed `oracle-proof` aggregate job. Preserve the documentation's distinction between oracle-specific validation and general mainline CI.

## Fix Focus Areas
- specs/006-cf-06-hl7-oracle-divergence/convergence.md[51-51]
- .github/workflows/cf06-oracle.yml[13-14]
- .github/workflows/cf06-oracle.yml[95-96]
- .github/workflows/cf06-oracle.yml[274-289]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Copy link
Copy Markdown
Owner Author

CF-06 runtime-hardening post-merge closeout

Status: CANONICAL_POST_MERGE_PROVEN

  • Canonical main: 3df371773d9f8ba284a4ff5938e710aa63bccec8
  • Canonical tree: f0f009fe8abcab99b3a1d339d400b63af4a7b486
  • Merge verification: verified=true, reason=valid
  • Ordered parents:
    1. d66f6c76414562df06ae1185da82e90dee86ceb4
    2. 098f644c15d894c109711f432cbaac720d138fb8
  • Candidate-to-merge tree/content equivalence: PASS (098f644... -> 3df3717... has zero changed files)
  • Changed production file: .github/workflows/cf06-oracle.yml only
  • Exact-head candidate run: 32095093427 = SUCCESS
    • oracle-self-smoke = SUCCESS
    • oracle-changed-profile = SUCCESS
    • oracle-proof = SUCCESS
  • Independent CodeRabbit review: PASS, no actionable findings
  • HL7 oracle identity remains release 6.10.2, source commit d06577dbc5c62c74a2a8823fbc4830a3024d5b0b
  • H0 provenance remains experimental evidence only; no product semantic claim was introduced.

No post-merge main Actions run is expected from the current workflow triggers: both .github/workflows/cf06-oracle.yml and .github/workflows/ci.yml restrict push to named feature branches and do not include main. The canonical merge tree is byte/content-equivalent to the exact candidate tree that passed CI and review.

No Rust semantics, Java oracle semantics, fixtures, corpus, Cargo dependencies, schemas, or HL7 pin changed. CF-12 is not started.

Final classification: CF06_RUNTIME_HARDENING_CLOSED_CANONICAL_PROVEN

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.

1 participant