mirror of
https://github.com/stablyai/orca.git
synced 2026-11-06 12:07:58 +00:00
[CI] Reuse costly test setup and report an explicit full result (#29228)
* ci: publish an explicit result from the PR aggregate * test(codex): preserve review text across OSC terminators * perf(ci): reuse worker fixtures and validated launcher output * fix(test): use typed orchestration database access * fix(ci): exclude test fixtures from focus ratchet
This commit is contained in:
+12
-86
@@ -51,7 +51,6 @@ jobs:
|
||||
package: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.package }}
|
||||
package_windows: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.package_windows }}
|
||||
layout_oracle: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.layout_oracle }}
|
||||
verify_fast_path: ${{ steps.verify_fast_path.outputs.canonical }}
|
||||
e2e_should_run: ${{ steps.e2e_filter.outputs.should_run }}
|
||||
test_files: ${{ steps.e2e_filter.outputs.test_files }}
|
||||
e2e_run_changed: ${{ steps.e2e_filter.outputs.e2e_run_changed }}
|
||||
@@ -137,33 +136,6 @@ jobs:
|
||||
fi
|
||||
printf '%s\n' "$CHANGED" | node config/scripts/pr-code-change-scope.mjs "${MOBILE_CI_ARGS[@]}" | tee -a "$GITHUB_OUTPUT"
|
||||
|
||||
# Actions comparisons ignore case; validate exact routing before allowing a skipped gate.
|
||||
- name: Validate aggregate routing
|
||||
id: verify_fast_path
|
||||
env:
|
||||
STATIC_ANALYSIS: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.static_analysis }}
|
||||
TYPECHECK: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.typecheck }}
|
||||
GIT_COMPATIBILITY: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.git_compatibility }}
|
||||
CODEX_INDEX_HEAL_CONTRACT: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.codex_index_heal_contract }}
|
||||
XTERM_PATCH_SYNC: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.xterm_patch_sync }}
|
||||
SHELL_CONTRACTS: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.shell_contracts }}
|
||||
TEST: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.test }}
|
||||
MOBILE_WEB_APP: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.mobile_web_app }}
|
||||
CROSS_VERSION_WIRE: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.cross-version-wire }}
|
||||
MANAGED_HOOK_NODE18: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.managed_hook_node18 }}
|
||||
PACKAGE: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.package }}
|
||||
PACKAGE_WINDOWS: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.package_windows }}
|
||||
LAYOUT_ORACLE: ${{ steps.readiness.outputs.reused != 'true' && steps.filter.outputs.layout_oracle }}
|
||||
run: |
|
||||
canonical=1
|
||||
for selected in "$STATIC_ANALYSIS" "$TYPECHECK" "$GIT_COMPATIBILITY" "$CODEX_INDEX_HEAL_CONTRACT" "$XTERM_PATCH_SYNC" "$SHELL_CONTRACTS" "$TEST" "$MOBILE_WEB_APP" "$CROSS_VERSION_WIRE" "$MANAGED_HOOK_NODE18" "$PACKAGE" "$PACKAGE_WINDOWS" "$LAYOUT_ORACLE"; do
|
||||
case "$selected" in
|
||||
true|false) ;;
|
||||
*) canonical=0 ;;
|
||||
esac
|
||||
done
|
||||
echo "canonical=$canonical" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Reuse the path-detector checkout instead of queuing another runner.
|
||||
- name: Filter changed E2E specs
|
||||
id: e2e_filter
|
||||
@@ -1528,62 +1500,8 @@ jobs:
|
||||
|
||||
verify:
|
||||
name: PR checks passed
|
||||
# GitHub accepts skipped required jobs; only mismatches need a runner to fail with details.
|
||||
if: >-
|
||||
!cancelled() && !(
|
||||
needs.code_paths.result == 'success' &&
|
||||
needs.code_paths.outputs.verify_fast_path == '1' &&
|
||||
(needs.code_paths.outputs.static_analysis == 'true' || needs.code_paths.outputs.static_analysis == 'false') &&
|
||||
(needs.code_paths.outputs.typecheck == 'true' || needs.code_paths.outputs.typecheck == 'false') &&
|
||||
(
|
||||
((needs.code_paths.outputs.static_analysis == 'true' || needs.code_paths.outputs.typecheck == 'true') && needs.preflight.result == 'success') ||
|
||||
(needs.code_paths.outputs.static_analysis == 'false' && needs.code_paths.outputs.typecheck == 'false' && needs.preflight.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.git_compatibility == 'true' && needs.git_compatibility.result == 'success') ||
|
||||
(needs.code_paths.outputs.git_compatibility == 'false' && needs.git_compatibility.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.codex_index_heal_contract == 'true' && needs.codex_index_heal_contract.result == 'success') ||
|
||||
(needs.code_paths.outputs.codex_index_heal_contract == 'false' && needs.codex_index_heal_contract.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.xterm_patch_sync == 'true' && needs.xterm_patch_sync.result == 'success') ||
|
||||
(needs.code_paths.outputs.xterm_patch_sync == 'false' && needs.xterm_patch_sync.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.shell_contracts == 'true' && needs.shell_contracts.result == 'success') ||
|
||||
(needs.code_paths.outputs.shell_contracts == 'false' && needs.shell_contracts.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.test == 'true' && needs.test.result == 'success') ||
|
||||
(needs.code_paths.outputs.test == 'false' && needs.test.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.mobile_web_app == 'true' && needs.mobile_web_app.result == 'success') ||
|
||||
(needs.code_paths.outputs.mobile_web_app == 'false' && needs.mobile_web_app.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs['cross-version-wire'] == 'true' && needs['cross-version-wire'].result == 'success') ||
|
||||
(needs.code_paths.outputs['cross-version-wire'] == 'false' && needs['cross-version-wire'].result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.managed_hook_node18 == 'true' && needs.managed_hook_node18.result == 'success') ||
|
||||
(needs.code_paths.outputs.managed_hook_node18 == 'false' && needs.managed_hook_node18.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.package == 'true' && needs.package.result == 'success') ||
|
||||
(needs.code_paths.outputs.package == 'false' && needs.package.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.package_windows == 'true' && needs.package_windows.result == 'success') ||
|
||||
(needs.code_paths.outputs.package_windows == 'false' && needs.package_windows.result == 'skipped')
|
||||
) &&
|
||||
(
|
||||
(needs.code_paths.outputs.layout_oracle == 'true' && needs.layout_oracle.result == 'success') ||
|
||||
(needs.code_paths.outputs.layout_oracle == 'false' && needs.layout_oracle.result == 'skipped')
|
||||
)
|
||||
)
|
||||
# Publish an explicit result after every required dependency settles.
|
||||
if: ${{ !cancelled() }}
|
||||
needs:
|
||||
- code_paths
|
||||
- preflight
|
||||
@@ -1598,7 +1516,6 @@ jobs:
|
||||
- package
|
||||
- package_windows
|
||||
- layout_oracle
|
||||
# Only failures and noncanonical routing allocate this runner.
|
||||
runs-on: ubuntu-slim
|
||||
timeout-minutes: 5
|
||||
|
||||
@@ -1616,6 +1533,8 @@ jobs:
|
||||
CODE_PATHS: ${{ needs.code_paths.result }}
|
||||
SHOULD_RUN: ${{ needs.code_paths.outputs.should_run }}
|
||||
PREFLIGHT: ${{ needs.preflight.result }}
|
||||
STATIC_ANALYSIS_SHOULD_RUN: ${{ needs.code_paths.outputs.static_analysis }}
|
||||
TYPECHECK_SHOULD_RUN: ${{ needs.code_paths.outputs.typecheck }}
|
||||
PREFLIGHT_SHOULD_RUN: ${{ needs.code_paths.outputs.static_analysis == 'true' || needs.code_paths.outputs.typecheck == 'true' }}
|
||||
GIT_COMPATIBILITY: ${{ needs.git_compatibility.result }}
|
||||
GIT_COMPATIBILITY_SHOULD_RUN: ${{ needs.code_paths.outputs.git_compatibility }}
|
||||
@@ -1643,6 +1562,10 @@ jobs:
|
||||
if [ "$CODE_PATHS" != "success" ]; then
|
||||
exit 1
|
||||
fi
|
||||
case "$STATIC_ANALYSIS_SHOULD_RUN:$TYPECHECK_SHOULD_RUN" in
|
||||
true:true|true:false|false:true|false:false) ;;
|
||||
*) echo "preflight: missing or invalid selection"; exit 1 ;;
|
||||
esac
|
||||
if [ "$SHOULD_RUN" != "true" ]; then
|
||||
echo "Docs-only change; expensive PR checks skipped."
|
||||
fi
|
||||
@@ -1654,11 +1577,14 @@ jobs:
|
||||
echo "$name: expected success, got $result"
|
||||
failed=1
|
||||
fi
|
||||
else
|
||||
elif [ "$should" = "false" ]; then
|
||||
if [ "$result" != "skipped" ]; then
|
||||
echo "$name: expected skipped, got $result"
|
||||
failed=1
|
||||
fi
|
||||
else
|
||||
echo "$name: missing or invalid selection"
|
||||
failed=1
|
||||
fi
|
||||
}
|
||||
# Require success when the PR has code-relevant changes
|
||||
|
||||
Reference in New Issue
Block a user