Skip to content

adds harness run test - #5933

Merged
akshaydeo merged 1 commit into
devfrom
08-06-adds_harness_run_test
Aug 7, 2026
Merged

adds harness run test#5933
akshaydeo merged 1 commit into
devfrom
08-06-adds_harness_run_test

Conversation

@akshaydeo

@akshaydeo akshaydeo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the test-core CI job's in-process go test suite with an end-to-end provider harness run. Instead of running unit tests with coverage, the job now builds a bifrost-http binary and drives the full provider harness collection (tests/e2e/api/collections/provider-harness.json) against it via Newman, exercising real provider APIs from a live gateway.

Changes

  • test-core job no longer runs go test or uploads coverage to Codecov. It now validates the core build, then delegates to test-provider-harness.sh which boots a real bifrost-http binary and runs the Newman harness against it.
  • test-provider-harness.sh (new script) handles the full CI lifecycle: builds the UI and binary, seeds a throwaway SQLite app dir, authenticates gcloud from VERTEX_CREDENTIALS for Vertex token-parity cells, waits for /health, then invokes make run-provider-harness-test CI=1 USE_INFISICAL=0.
  • Egress allowlist expanded to cover Vertex (aiplatform.googleapis.com, us-central1-aiplatform.googleapis.com, accounts.google.com, oauth2.googleapis.com), gcloud CLI install (dl.google.com, packages.cloud.google.com, objects.githubusercontent.com), Replicate (api.replicate.com), and the getbifrost.ai pricing datasheet used by the dbverify reporter.
  • New CI dependencies installed in the job: jq, newman@6.2.1, newman-reporter-htmlextra@1.23.1, and the gcloud CLI (google-github-actions/setup-gcloud@v3).
  • New secrets forwarded to the run step: AWS_REGION, GOOGLE_LOCATION, XAI_API_KEY, REPLICATE_API_KEY, BEDROCK_GUARDRAIL_IDENTIFIER, BEDROCK_GUARDRAIL_VERSION. CODECOV_TOKEN removed.
  • Harness artifacts (newman-report*.json, newman-cli*.log, harness-failures.md, harness-token-parity.md, bifrost-dev.log, etc.) are uploaded on every run (including failures) with a 30-day retention.
  • harness-monitor.mjs gains a --ci mode that disables the alternate screen buffer and cursor-home redraws, emits append-only progress snapshots every --ci-interval seconds (default 30), logs each assertion failure inline as it is parsed, and writes a plain-text final table to both stdout and $GITHUB_STEP_SUMMARY.
  • Makefile pins Newman versions via NEWMAN_VERSION and NEWMAN_HTMLEXTRA_VERSION variables (defaulting to 6.2.1 / 1.23.1) and fixes the CI=1 branch of run-provider-harness-test to start the monitor in append-only mode and still print per-provider pass/fail lines and log tails.
  • Job timeout set to 90 minutes to accommodate the full provider sweep.

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (React)
  • Docs

How to test

The harness runs automatically in CI on any change that triggers core-needs-release. To run locally:

make run-provider-harness-test

For CI-equivalent mode (append-only output, no terminal UI):

make run-provider-harness-test CI=1 USE_INFISICAL=0 PARALLEL=1

Required environment variables for the full sweep: all existing provider API keys plus AWS_REGION, GOOGLE_LOCATION, VERTEX_CREDENTIALS (service-account JSON), XAI_API_KEY, REPLICATE_API_KEY, BEDROCK_GUARDRAIL_IDENTIFIER, BEDROCK_GUARDRAIL_VERSION.

Breaking changes

  • Yes
  • No

The test-core job no longer runs go test or reports coverage to Codecov. Any downstream tooling that depends on Codecov coverage reports from this job will stop receiving them.

Security considerations

  • The Vertex service-account key (VERTEX_CREDENTIALS) is written to disk only for the duration of the gcloud auth call and is deleted in the cleanup trap before the artifact-upload step runs, ensuring it is never captured in uploaded artifacts.
  • The egress allowlist is explicitly extended for each new external endpoint; no wildcard rules are added.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

@akshaydeo
akshaydeo marked this pull request as ready for review August 7, 2026 05:55
@akshaydeo
akshaydeo requested a review from a team as a code owner August 7, 2026 05:55

akshaydeo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

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

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c6a89976-3f20-47e1-8c08-c0420755efc0

📥 Commits

Reviewing files that changed from the base of the PR and between b3189ef and 6e6112d.

📒 Files selected for processing (11)
  • .github/workflows/release-pipeline.yml
  • .github/workflows/scripts/harness-gateway.sh
  • .github/workflows/scripts/test-cli-harness.sh
  • .github/workflows/scripts/test-core.sh
  • .github/workflows/scripts/test-provider-harness.sh
  • Makefile
  • tests/e2e/api/runners/harness-monitor.mjs
  • tests/e2e/api/runners/lib/ci-interval.mjs
  • tests/e2e/api/runners/lib/ci-interval.test.mjs
  • tests/e2e/clis/clis_test.go
  • tests/e2e/clis/reportsdir_test.go
🚧 Files skipped from review as they are similar to previous changes (7)
  • tests/e2e/api/runners/lib/ci-interval.test.mjs
  • tests/e2e/clis/reportsdir_test.go
  • tests/e2e/api/runners/harness-monitor.mjs
  • .github/workflows/scripts/harness-gateway.sh
  • tests/e2e/api/runners/lib/ci-interval.mjs
  • tests/e2e/clis/clis_test.go
  • Makefile

📝 Walkthrough

Summary by CodeRabbit

  • Testing

    • Added automated end-to-end validation for CLI and provider integrations.
    • Improved CI progress updates, failure diagnostics, and summary reports.
    • Added release gates requiring integration checks to pass.
    • Added configurable monitoring intervals with sensible limits.
    • Added support for nested and custom test report directories.
  • Reliability

    • Enhanced gateway startup, health monitoring, cleanup, and diagnostics.
    • Pinned testing tool versions for consistent validation results.
    • Improved handling of trailing requests and test completion status.

Walkthrough

The release pipeline adds provider and CLI harness jobs. Shell helpers build isolated gateways, run integration suites, publish reports, and clean up resources. CI monitoring emits progress and final summaries. Release jobs use CLI harness results for gating.

Changes

Harness release CI

Layer / File(s) Summary
Provider harness execution
.github/workflows/release-pipeline.yml, .github/workflows/scripts/*
The workflow prepares provider-harness tools and credentials. The scripts build, seed, health-check, and stop an isolated gateway, then run provider tests and publish diagnostics.
CLI harness execution
.github/workflows/release-pipeline.yml, .github/workflows/scripts/test-cli-harness.sh, tests/e2e/clis/*
A conditional job installs pinned Claude Code and Codex versions. It runs both suites independently, rejects empty selections, and stores reports in configurable directories.
CI harness monitoring
Makefile, tests/e2e/api/runners/*
Newman versions are configurable and pinned. CI monitoring validates intervals and emits progress, assertion failures, log tails, and final reports to GitHub Actions summaries.
Release gating
.github/workflows/release-pipeline.yml
Release, Docker, changelog, and notification jobs require the CLI harness to succeed or be skipped. Existing component-release checks remain in place.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleasePipeline
  participant ProviderHarness
  participant CLIHarness
  participant BifrostGateway
  participant GitHubStepSummary
  ReleasePipeline->>ProviderHarness: run provider validation
  ProviderHarness->>BifrostGateway: build, seed, and start gateway
  ProviderHarness-->>ReleasePipeline: return provider status and reports
  ReleasePipeline->>CLIHarness: run CLI validation
  CLIHarness->>BifrostGateway: start isolated gateway
  CLIHarness-->>GitHubStepSummary: publish CLI reports
  CLIHarness-->>ReleasePipeline: return CLI status
  ReleasePipeline->>ReleasePipeline: evaluate release gates
Loading

Possibly related PRs

Suggested reviewers: tejasghatte, pratham-mishra04

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 63.16% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title identifies the harness test change, but it is broad and does not clearly state the CI workflow replacement.
Description check ✅ Passed The description clearly explains the CI workflow changes, testing steps, breaking impact, security considerations, and checklist completion.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 08-06-adds_harness_run_test

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

@akshaydeo
akshaydeo force-pushed the 08-06-adds_harness_run_test branch from 2ceaaf5 to dca169b Compare August 7, 2026 05:57

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

Actionable comments posted: 5

🧹 Nitpick comments (3)
Makefile (1)

1834-1836: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

The pin is not enforced when newman is already installed.

which newman succeeds for any installed version. If a developer has an older global newman, the target skips the install and the pinned NEWMAN_VERSION never applies. The same applies to the reporter check, which uses npm list -g newman-reporter-htmlextra without a version.

Compare the installed version against the pin so local runs match CI.

♻️ Proposed refactor
-	@$(USE_NODE); which newman > /dev/null 2>&1 || ($(ECHO) "$(YELLOW)Installing newman@$(NEWMAN_VERSION)...$(NC)" && npm install -g newman@$(NEWMAN_VERSION))
-	@$(USE_NODE); npm list -g newman-reporter-htmlextra > /dev/null 2>&1 || ($(ECHO) "$(YELLOW)Installing newman-reporter-htmlextra@$(NEWMAN_HTMLEXTRA_VERSION)...$(NC)" && npm install -g newman-reporter-htmlextra@$(NEWMAN_HTMLEXTRA_VERSION))
+	@$(USE_NODE); [ "$$(newman --version 2>/dev/null)" = "$(NEWMAN_VERSION)" ] || ($(ECHO) "$(YELLOW)Installing newman@$(NEWMAN_VERSION)...$(NC)" && npm install -g newman@$(NEWMAN_VERSION))
+	@$(USE_NODE); npm list -g newman-reporter-htmlextra@$(NEWMAN_HTMLEXTRA_VERSION) > /dev/null 2>&1 || ($(ECHO) "$(YELLOW)Installing newman-reporter-htmlextra@$(NEWMAN_HTMLEXTRA_VERSION)...$(NC)" && npm install -g newman-reporter-htmlextra@$(NEWMAN_HTMLEXTRA_VERSION))
🤖 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 `@Makefile` around lines 1834 - 1836, Update the install-newman target’s checks
for newman and newman-reporter-htmlextra to inspect their installed versions and
install the pinned NEWMAN_VERSION or NEWMAN_HTMLEXTRA_VERSION when they are
missing or mismatched. Preserve the existing skip behavior only when the
installed package version exactly matches its configured pin.
.github/workflows/scripts/test-provider-harness.sh (1)

71-82: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

umask 077 persists for the rest of the script.

Line 73 sets umask 077 in the current shell, not in a subshell. Every file the script and its children create afterwards inherits the restrictive mask, including the harness reports under tmp/. This works in CI because the same user reads them. Scope the mask to the key write to keep the intent local.

♻️ Proposed refactor
-  umask 077
-  printf '%s' "$VERTEX_CREDENTIALS" > "$GCLOUD_KEY_FILE"
+  (umask 077; printf '%s' "$VERTEX_CREDENTIALS" > "$GCLOUD_KEY_FILE")
🤖 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 @.github/workflows/scripts/test-provider-harness.sh around lines 71 - 82,
Scope the restrictive umask in the Vertex credential setup block so it applies
only while writing GCLOUD_KEY_FILE, rather than persisting for the remainder of
the script. Update the credential-write operation around VERTEX_CREDENTIALS and
preserve the existing gcloud authentication flow and logging.
.github/workflows/release-pipeline.yml (1)

345-357: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Consider a manual override for test-cli-harness failures.

test-core has approve-flaky-test-core because provider API calls are flaky. test-cli-harness drives the same real provider APIs through installed CLIs, but it has no equivalent override. Every downstream release job requires test-cli-harness.result == 'success' || 'skipped'. A single flaky CLI cell then blocks the whole release and forces a full pipeline re-run.

Add an approval gate job for test-cli-harness that mirrors approve-flaky-test-core, or document why the CLI harness is treated as non-flaky.

🤖 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 @.github/workflows/release-pipeline.yml around lines 345 - 357, Add an
approval-gate job for test-cli-harness, modeled on approve-flaky-test-core, and
wire downstream release conditions to accept the gate’s approved outcome when
the harness fails while preserving success/skipped behavior. Use the existing
workflow approval symbols and conventions rather than introducing a separate
mechanism.
🤖 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/release-pipeline.yml:
- Around line 363-385: Update the allowed-endpoints list in the release workflow
to include o33249.ingest.sentry.io:443 alongside statsig.anthropic.com:443,
keeping the surrounding Claude Code telemetry configuration and comment
consistent.

In @.github/workflows/scripts/test-cli-harness.sh:
- Around line 82-88: Adjust the timeout budget in run_cases so its two
run-cli-harness-test invocations, together with the workflow setup work, fit
within the test-cli-harness job’s timeout-minutes: 60 limit. Prefer lowering the
per-suite TIMEOUT from 25m while retaining enough headroom for report artifacts
to upload before job cancellation.
- Around line 70-72: Update run_cases in the harness script so the make
run-cli-harness-test invocation passes API_KEY="$HARNESS_API_KEY". Keep the
existing BIFROST_API_KEY export, allowing the target’s explicit environment
assignment to receive the placeholder key.

In @.github/workflows/scripts/test-core.sh:
- Around line 20-33: Add a dedicated core unit-test step in the test-core
workflow after the core build validation, running go test ./... from the core
module before invoking test-provider-harness.sh. Keep the existing build and
provider harness steps unchanged so core unit tests gate the release pipeline.

In `@tests/e2e/api/runners/harness-monitor.mjs`:
- Around line 63-64: Update the ci-interval parsing near CI_INTERVAL_MS to
validate that the parsed value is finite before applying Math.max. Use the
existing default interval value when args["ci-interval"] is non-numeric or
otherwise invalid, while preserving the minimum 5-second interval behavior for
valid values.

---

Nitpick comments:
In @.github/workflows/release-pipeline.yml:
- Around line 345-357: Add an approval-gate job for test-cli-harness, modeled on
approve-flaky-test-core, and wire downstream release conditions to accept the
gate’s approved outcome when the harness fails while preserving success/skipped
behavior. Use the existing workflow approval symbols and conventions rather than
introducing a separate mechanism.

In @.github/workflows/scripts/test-provider-harness.sh:
- Around line 71-82: Scope the restrictive umask in the Vertex credential setup
block so it applies only while writing GCLOUD_KEY_FILE, rather than persisting
for the remainder of the script. Update the credential-write operation around
VERTEX_CREDENTIALS and preserve the existing gcloud authentication flow and
logging.

In `@Makefile`:
- Around line 1834-1836: Update the install-newman target’s checks for newman
and newman-reporter-htmlextra to inspect their installed versions and install
the pinned NEWMAN_VERSION or NEWMAN_HTMLEXTRA_VERSION when they are missing or
mismatched. Preserve the existing skip behavior only when the installed package
version exactly matches its configured pin.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 34b55b54-5ccb-4ca5-9e67-bd009ebe9d29

📥 Commits

Reviewing files that changed from the base of the PR and between 55871ff and dca169b.

📒 Files selected for processing (7)
  • .github/workflows/release-pipeline.yml
  • .github/workflows/scripts/harness-gateway.sh
  • .github/workflows/scripts/test-cli-harness.sh
  • .github/workflows/scripts/test-core.sh
  • .github/workflows/scripts/test-provider-harness.sh
  • Makefile
  • tests/e2e/api/runners/harness-monitor.mjs

Comment thread .github/workflows/release-pipeline.yml
Comment thread .github/workflows/scripts/test-cli-harness.sh
Comment thread .github/workflows/scripts/test-cli-harness.sh
Comment thread .github/workflows/scripts/test-core.sh
Comment thread tests/e2e/api/runners/harness-monitor.mjs Outdated
@akshaydeo
akshaydeo force-pushed the 08-06-adds_harness_run_test branch from dca169b to 9c046db Compare August 7, 2026 06:49
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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

Actionable comments posted: 3

🤖 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/release-pipeline.yml:
- Line 153: Update the test-core job condition at the workflow line guarded by
the core-needs-release output to also run when
needs.detect-changes.outputs.bifrost-http-needs-release is true, matching the
CLI harness condition. Preserve the existing skip-tests and should-skip checks
so bifrost-http-only releases execute provider-harness validation.

In @.github/workflows/scripts/test-cli-harness.sh:
- Around line 44-45: Update the CLI harness around CLAUDE_CASES and CODEX_CASES
to isolate each filter run by clearing reports or using a unique run-specific
reports directory. After every go test -run invocation, validate that the
expected cells were produced rather than relying only on the exit status and
reports/ existence, and fail the release gate when a provider is skipped or a
filter matches no TestCLIs subtests.

In `@tests/e2e/api/runners/lib/ci-interval.mjs`:
- Around line 17-19: Update the interval calculation around parsed and seconds
to cap the resolved integer-second value at 2,147,483 before multiplying by 1000
and passing it to setInterval. Preserve the existing default and minimum
handling, and add a regression test covering an oversized value such as
2_147_484.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9d7df02a-7deb-4f8c-b1c6-657bb170af6e

📥 Commits

Reviewing files that changed from the base of the PR and between 55871ff and 9c046db.

📒 Files selected for processing (9)
  • .github/workflows/release-pipeline.yml
  • .github/workflows/scripts/harness-gateway.sh
  • .github/workflows/scripts/test-cli-harness.sh
  • .github/workflows/scripts/test-core.sh
  • .github/workflows/scripts/test-provider-harness.sh
  • Makefile
  • tests/e2e/api/runners/harness-monitor.mjs
  • tests/e2e/api/runners/lib/ci-interval.mjs
  • tests/e2e/api/runners/lib/ci-interval.test.mjs
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/scripts/harness-gateway.sh
  • Makefile
  • tests/e2e/api/runners/harness-monitor.mjs

Comment thread .github/workflows/release-pipeline.yml Outdated
Comment thread .github/workflows/scripts/test-cli-harness.sh
Comment thread tests/e2e/api/runners/lib/ci-interval.mjs Outdated
@akshaydeo
akshaydeo force-pushed the 08-06-adds_harness_run_test branch from 9c046db to ddbb11d Compare August 7, 2026 07:28
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

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

Actionable comments posted: 3

🤖 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/release-pipeline.yml:
- Around line 153-163: Update the approval-job condition in
approve-flaky-test-core to allow execution when either core-needs-release or
bifrost-http-needs-release is true, so bifrost-http-only releases can use the
flaky-test override. Preserve the existing skip-tests and other gating
conditions.

In @.github/workflows/scripts/test-provider-harness.sh:
- Around line 51-57: Update cleanup() so harness_stop_gateway is best-effort and
cannot abort the function under set -e; ensure rm -f "$GCLOUD_KEY_FILE" always
executes before exiting with the original exit_code.
- Around line 99-105: Redact sensitive diagnostics before publishing or
uploading harness-failures.md, including authorization values, API keys, tokens,
query secrets, and sensitive payloads from raw response bodies, URLs, assertion
messages, and Bifrost log lines. Update the analyze-failures.mjs generation path
and ensure the summary block guarded by GITHUB_STEP_SUMMARY only consumes the
sanitized file.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e1347be7-6689-490c-8486-1c33fec7f4b7

📥 Commits

Reviewing files that changed from the base of the PR and between b3189ef and ddbb11d.

📒 Files selected for processing (11)
  • .github/workflows/release-pipeline.yml
  • .github/workflows/scripts/harness-gateway.sh
  • .github/workflows/scripts/test-cli-harness.sh
  • .github/workflows/scripts/test-core.sh
  • .github/workflows/scripts/test-provider-harness.sh
  • Makefile
  • tests/e2e/api/runners/harness-monitor.mjs
  • tests/e2e/api/runners/lib/ci-interval.mjs
  • tests/e2e/api/runners/lib/ci-interval.test.mjs
  • tests/e2e/clis/clis_test.go
  • tests/e2e/clis/reportsdir_test.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/scripts/harness-gateway.sh
  • tests/e2e/api/runners/harness-monitor.mjs
  • tests/e2e/api/runners/lib/ci-interval.test.mjs
  • Makefile

Comment thread .github/workflows/release-pipeline.yml
Comment thread .github/workflows/scripts/test-provider-harness.sh
Comment thread .github/workflows/scripts/test-provider-harness.sh
@akshaydeo
akshaydeo force-pushed the 08-06-adds_harness_run_test branch from ddbb11d to 6e6112d Compare August 7, 2026 07:40
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

akshaydeo commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Aug 7, 7:50 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Aug 7, 7:50 AM UTC: @akshaydeo merged this pull request with Graphite.

@akshaydeo
akshaydeo merged commit cc4a0d6 into dev Aug 7, 2026
14 checks passed
@akshaydeo
akshaydeo deleted the 08-06-adds_harness_run_test branch August 7, 2026 07:50
akshaydeo added a commit that referenced this pull request Aug 7, 2026
## Summary

Replaces the `test-core` CI job's in-process `go test` suite with an end-to-end provider harness run. Instead of running unit tests with coverage, the job now builds a `bifrost-http` binary and drives the full provider harness collection (`tests/e2e/api/collections/provider-harness.json`) against it via Newman, exercising real provider APIs from a live gateway.

## Changes

- **`test-core` job** no longer runs `go test` or uploads coverage to Codecov. It now validates the core build, then delegates to `test-provider-harness.sh` which boots a real `bifrost-http` binary and runs the Newman harness against it.
- **`test-provider-harness.sh`** (new script) handles the full CI lifecycle: builds the UI and binary, seeds a throwaway SQLite app dir, authenticates gcloud from `VERTEX_CREDENTIALS` for Vertex token-parity cells, waits for `/health`, then invokes `make run-provider-harness-test CI=1 USE_INFISICAL=0`.
- **Egress allowlist** expanded to cover Vertex (`aiplatform.googleapis.com`, `us-central1-aiplatform.googleapis.com`, `accounts.google.com`, `oauth2.googleapis.com`), gcloud CLI install (`dl.google.com`, `packages.cloud.google.com`, `objects.githubusercontent.com`), Replicate (`api.replicate.com`), and the getbifrost.ai pricing datasheet used by the dbverify reporter.
- **New CI dependencies** installed in the job: `jq`, `newman@6.2.1`, `newman-reporter-htmlextra@1.23.1`, and the gcloud CLI (`google-github-actions/setup-gcloud@v3`).
- **New secrets forwarded** to the run step: `AWS_REGION`, `GOOGLE_LOCATION`, `XAI_API_KEY`, `REPLICATE_API_KEY`, `BEDROCK_GUARDRAIL_IDENTIFIER`, `BEDROCK_GUARDRAIL_VERSION`. `CODECOV_TOKEN` removed.
- **Harness artifacts** (`newman-report*.json`, `newman-cli*.log`, `harness-failures.md`, `harness-token-parity.md`, `bifrost-dev.log`, etc.) are uploaded on every run (including failures) with a 30-day retention.
- **`harness-monitor.mjs`** gains a `--ci` mode that disables the alternate screen buffer and cursor-home redraws, emits append-only progress snapshots every `--ci-interval` seconds (default 30), logs each assertion failure inline as it is parsed, and writes a plain-text final table to both stdout and `$GITHUB_STEP_SUMMARY`.
- **Makefile** pins Newman versions via `NEWMAN_VERSION` and `NEWMAN_HTMLEXTRA_VERSION` variables (defaulting to `6.2.1` / `1.23.1`) and fixes the `CI=1` branch of `run-provider-harness-test` to start the monitor in append-only mode and still print per-provider pass/fail lines and log tails.
- Job timeout set to 90 minutes to accommodate the full provider sweep.

## Type of change

- [ ] Bug fix
- [ ] Feature
- [x] Refactor
- [ ] Documentation
- [x] Chore/CI

## Affected areas

- [x] Core (Go)
- [x] Transports (HTTP)
- [x] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

The harness runs automatically in CI on any change that triggers `core-needs-release`. To run locally:

```sh
make run-provider-harness-test
```

For CI-equivalent mode (append-only output, no terminal UI):

```sh
make run-provider-harness-test CI=1 USE_INFISICAL=0 PARALLEL=1
```

Required environment variables for the full sweep: all existing provider API keys plus `AWS_REGION`, `GOOGLE_LOCATION`, `VERTEX_CREDENTIALS` (service-account JSON), `XAI_API_KEY`, `REPLICATE_API_KEY`, `BEDROCK_GUARDRAIL_IDENTIFIER`, `BEDROCK_GUARDRAIL_VERSION`.

## Breaking changes

- [x] Yes
- [ ] No

The `test-core` job no longer runs `go test` or reports coverage to Codecov. Any downstream tooling that depends on Codecov coverage reports from this job will stop receiving them.

## Security considerations

- The Vertex service-account key (`VERTEX_CREDENTIALS`) is written to disk only for the duration of the gcloud auth call and is deleted in the `cleanup` trap before the artifact-upload step runs, ensuring it is never captured in uploaded artifacts.
- The egress allowlist is explicitly extended for each new external endpoint; no wildcard rules are added.

## Checklist

- [x] I read `docs/contributing/README.md` and followed the guidelines
- [x] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [x] I verified the CI pipeline passes locally if applicable
atharvamhaske pushed a commit to atharvamhaske/bifrost that referenced this pull request Aug 13, 2026
## Summary

Replaces the `test-core` CI job's in-process `go test` suite with an end-to-end provider harness run. Instead of running unit tests with coverage, the job now builds a `bifrost-http` binary and drives the full provider harness collection (`tests/e2e/api/collections/provider-harness.json`) against it via Newman, exercising real provider APIs from a live gateway.

## Changes

- **`test-core` job** no longer runs `go test` or uploads coverage to Codecov. It now validates the core build, then delegates to `test-provider-harness.sh` which boots a real `bifrost-http` binary and runs the Newman harness against it.
- **`test-provider-harness.sh`** (new script) handles the full CI lifecycle: builds the UI and binary, seeds a throwaway SQLite app dir, authenticates gcloud from `VERTEX_CREDENTIALS` for Vertex token-parity cells, waits for `/health`, then invokes `make run-provider-harness-test CI=1 USE_INFISICAL=0`.
- **Egress allowlist** expanded to cover Vertex (`aiplatform.googleapis.com`, `us-central1-aiplatform.googleapis.com`, `accounts.google.com`, `oauth2.googleapis.com`), gcloud CLI install (`dl.google.com`, `packages.cloud.google.com`, `objects.githubusercontent.com`), Replicate (`api.replicate.com`), and the getbifrost.ai pricing datasheet used by the dbverify reporter.
- **New CI dependencies** installed in the job: `jq`, `newman@6.2.1`, `newman-reporter-htmlextra@1.23.1`, and the gcloud CLI (`google-github-actions/setup-gcloud@v3`).
- **New secrets forwarded** to the run step: `AWS_REGION`, `GOOGLE_LOCATION`, `XAI_API_KEY`, `REPLICATE_API_KEY`, `BEDROCK_GUARDRAIL_IDENTIFIER`, `BEDROCK_GUARDRAIL_VERSION`. `CODECOV_TOKEN` removed.
- **Harness artifacts** (`newman-report*.json`, `newman-cli*.log`, `harness-failures.md`, `harness-token-parity.md`, `bifrost-dev.log`, etc.) are uploaded on every run (including failures) with a 30-day retention.
- **`harness-monitor.mjs`** gains a `--ci` mode that disables the alternate screen buffer and cursor-home redraws, emits append-only progress snapshots every `--ci-interval` seconds (default 30), logs each assertion failure inline as it is parsed, and writes a plain-text final table to both stdout and `$GITHUB_STEP_SUMMARY`.
- **Makefile** pins Newman versions via `NEWMAN_VERSION` and `NEWMAN_HTMLEXTRA_VERSION` variables (defaulting to `6.2.1` / `1.23.1`) and fixes the `CI=1` branch of `run-provider-harness-test` to start the monitor in append-only mode and still print per-provider pass/fail lines and log tails.
- Job timeout set to 90 minutes to accommodate the full provider sweep.

## Type of change

- [ ] Bug fix
- [ ] Feature
- [x] Refactor
- [ ] Documentation
- [x] Chore/CI

## Affected areas

- [x] Core (Go)
- [x] Transports (HTTP)
- [x] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

The harness runs automatically in CI on any change that triggers `core-needs-release`. To run locally:

```sh
make run-provider-harness-test
```

For CI-equivalent mode (append-only output, no terminal UI):

```sh
make run-provider-harness-test CI=1 USE_INFISICAL=0 PARALLEL=1
```

Required environment variables for the full sweep: all existing provider API keys plus `AWS_REGION`, `GOOGLE_LOCATION`, `VERTEX_CREDENTIALS` (service-account JSON), `XAI_API_KEY`, `REPLICATE_API_KEY`, `BEDROCK_GUARDRAIL_IDENTIFIER`, `BEDROCK_GUARDRAIL_VERSION`.

## Breaking changes

- [x] Yes
- [ ] No

The `test-core` job no longer runs `go test` or reports coverage to Codecov. Any downstream tooling that depends on Codecov coverage reports from this job will stop receiving them.

## Security considerations

- The Vertex service-account key (`VERTEX_CREDENTIALS`) is written to disk only for the duration of the gcloud auth call and is deleted in the `cleanup` trap before the artifact-upload step runs, ensuring it is never captured in uploaded artifacts.
- The egress allowlist is explicitly extended for each new external endpoint; no wildcard rules are added.

## Checklist

- [x] I read `docs/contributing/README.md` and followed the guidelines
- [x] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [x] I verified the CI pipeline passes locally if applicable
akhsaul pushed a commit to akhsaul/bifrost that referenced this pull request Aug 27, 2026
## Summary

Replaces the `test-core` CI job's in-process `go test` suite with an end-to-end provider harness run. Instead of running unit tests with coverage, the job now builds a `bifrost-http` binary and drives the full provider harness collection (`tests/e2e/api/collections/provider-harness.json`) against it via Newman, exercising real provider APIs from a live gateway.

## Changes

- **`test-core` job** no longer runs `go test` or uploads coverage to Codecov. It now validates the core build, then delegates to `test-provider-harness.sh` which boots a real `bifrost-http` binary and runs the Newman harness against it.
- **`test-provider-harness.sh`** (new script) handles the full CI lifecycle: builds the UI and binary, seeds a throwaway SQLite app dir, authenticates gcloud from `VERTEX_CREDENTIALS` for Vertex token-parity cells, waits for `/health`, then invokes `make run-provider-harness-test CI=1 USE_INFISICAL=0`.
- **Egress allowlist** expanded to cover Vertex (`aiplatform.googleapis.com`, `us-central1-aiplatform.googleapis.com`, `accounts.google.com`, `oauth2.googleapis.com`), gcloud CLI install (`dl.google.com`, `packages.cloud.google.com`, `objects.githubusercontent.com`), Replicate (`api.replicate.com`), and the getbifrost.ai pricing datasheet used by the dbverify reporter.
- **New CI dependencies** installed in the job: `jq`, `newman@6.2.1`, `newman-reporter-htmlextra@1.23.1`, and the gcloud CLI (`google-github-actions/setup-gcloud@v3`).
- **New secrets forwarded** to the run step: `AWS_REGION`, `GOOGLE_LOCATION`, `XAI_API_KEY`, `REPLICATE_API_KEY`, `BEDROCK_GUARDRAIL_IDENTIFIER`, `BEDROCK_GUARDRAIL_VERSION`. `CODECOV_TOKEN` removed.
- **Harness artifacts** (`newman-report*.json`, `newman-cli*.log`, `harness-failures.md`, `harness-token-parity.md`, `bifrost-dev.log`, etc.) are uploaded on every run (including failures) with a 30-day retention.
- **`harness-monitor.mjs`** gains a `--ci` mode that disables the alternate screen buffer and cursor-home redraws, emits append-only progress snapshots every `--ci-interval` seconds (default 30), logs each assertion failure inline as it is parsed, and writes a plain-text final table to both stdout and `$GITHUB_STEP_SUMMARY`.
- **Makefile** pins Newman versions via `NEWMAN_VERSION` and `NEWMAN_HTMLEXTRA_VERSION` variables (defaulting to `6.2.1` / `1.23.1`) and fixes the `CI=1` branch of `run-provider-harness-test` to start the monitor in append-only mode and still print per-provider pass/fail lines and log tails.
- Job timeout set to 90 minutes to accommodate the full provider sweep.

## Type of change

- [ ] Bug fix
- [ ] Feature
- [x] Refactor
- [ ] Documentation
- [x] Chore/CI

## Affected areas

- [x] Core (Go)
- [x] Transports (HTTP)
- [x] Providers/Integrations
- [ ] Plugins
- [ ] UI (React)
- [ ] Docs

## How to test

The harness runs automatically in CI on any change that triggers `core-needs-release`. To run locally:

```sh
make run-provider-harness-test
```

For CI-equivalent mode (append-only output, no terminal UI):

```sh
make run-provider-harness-test CI=1 USE_INFISICAL=0 PARALLEL=1
```

Required environment variables for the full sweep: all existing provider API keys plus `AWS_REGION`, `GOOGLE_LOCATION`, `VERTEX_CREDENTIALS` (service-account JSON), `XAI_API_KEY`, `REPLICATE_API_KEY`, `BEDROCK_GUARDRAIL_IDENTIFIER`, `BEDROCK_GUARDRAIL_VERSION`.

## Breaking changes

- [x] Yes
- [ ] No

The `test-core` job no longer runs `go test` or reports coverage to Codecov. Any downstream tooling that depends on Codecov coverage reports from this job will stop receiving them.

## Security considerations

- The Vertex service-account key (`VERTEX_CREDENTIALS`) is written to disk only for the duration of the gcloud auth call and is deleted in the `cleanup` trap before the artifact-upload step runs, ensuring it is never captured in uploaded artifacts.
- The egress allowlist is explicitly extended for each new external endpoint; no wildcard rules are added.

## Checklist

- [x] I read `docs/contributing/README.md` and followed the guidelines
- [x] I added/updated tests where appropriate
- [x] I updated documentation where needed
- [x] I verified builds succeed (Go and UI)
- [x] I verified the CI pipeline passes locally if applicable
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