test(orb): cover the review_audit→export→ingest→analytics fleet path end-to-end - #1270
Merged
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1270 +/- ##
=======================================
Coverage 95.05% 95.05%
=======================================
Files 177 177
Lines 19981 19981
Branches 7189 7189
=======================================
Hits 18993 18993
Misses 395 395
Partials 593 593 🚀 New features to boost your workflow:
|
This was referenced Jun 24, 2026
…end-to-end The three Orb fleet stages are each unit-tested in isolation (selfhost-orb-collector, orb-ingest, orb-analytics), but nothing asserted they COMPOSE on a consistent target_id/repo_hash/pr_hash key — the seam where the FLEET_QUERY source filter or the gate_decision↔pr_outcome join can silently break. Add an integration test that seeds a self-host instance's review_audit ledger, runs exportOrbBatch with a capturing fetch mock, feeds the captured payload into handleOrbIngest, then asserts computeFleetAnalytics: 5 clean merges → a 100%-precision fleet of one, and a reverted merge propagates reversal_flag end-to-end into the fleet's reversal + false-positive rates. Test-only; no production change. Advances #1255.
JSONbored
force-pushed
the
test/orb-fleet-e2e
branch
from
June 24, 2026 22:40
f58e5bb to
d680c09
Compare
JSONbored
force-pushed
the
test/orb-fleet-e2e
branch
from
June 24, 2026 22:41
d680c09 to
f1a9266
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The three Orb fleet stages are each unit-tested in isolation today —
selfhost-orb-collector.test.ts(export),orb-ingest.test.ts(ingest),orb-analytics.test.ts(analytics) — but nothing asserts they compose on a consistenttarget_id/repo_hash/pr_hashkey. That seam is exactly where theFLEET_QUERYsource='gittensory-native'filter or thegate_decision↔pr_outcomejoin can silently break before anything fleet-derived (e.g. auto-tune) is built on it.This adds one integration test that drives the whole pipeline on a shared key:
review_auditledger (nativegate_decision+ realizedpr_outcome+ an optional reversal),exportOrbBatchwith a capturingfetchmock,handleOrbIngest,computeFleetAnalytics: 5 clean merges → a 100%-precision fleet of one, and a reverted merge propagatesreversal_flagend-to-end into the fleet's reversal + false-positive rates.The env is set so the export gate is satisfied for both the current (
ORB_ENABLED) and the hardwired (GITHUB_APP_PRIVATE_KEY, #1257) export paths, andORB_ANONYMIZE=falsekeepsrepo_hash/pr_hashreadable for assertions.Scope
src/**change, so nocodecov/patchexposurewantedPaths(test/), narrow (1 file), no secretsValidation
npm run typecheckclean;vitest run test/integration/orb-fleet-e2e.test.ts— 2 passednpm run test:cigreen locallySafety
Advances #1255.