Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 10 additions & 53 deletions .github/actions/noema-review/two_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,16 @@ def prepare_verdict(repo: str, number: int, expected_head: str, path: Path) -> i
changed_files = gate.fetch_changed_files(repo, number)
changed_paths = tuple(file_path for file_path, _status in changed_files)
review_context = gate.build_review_context(repo, number, pull_request, changed_files)
try:
verdict = gate.call_llm(
repo,
number,
pull_request,
diff,
truncated,
expected,
review_context,
changed_paths,
)
except gate.NoemaTransportError as exc:
_emit_transport_capacity_outputs(exc, expected_head=expected)
raise
verdict = gate.call_llm(
repo,
number,
pull_request,
diff,
truncated,
expected,
review_context,
changed_paths,
)

_write_envelope(
path,
Expand All @@ -200,45 +196,6 @@ def prepare_verdict(repo: str, number: int, expected_head: str, path: Path) -> i
return 0


def _emit_transport_capacity_outputs(
exc: gate.NoemaTransportError,
*,
expected_head: str,
) -> None:
"""Publish typed capacity evidence for the workflow's bounded re-dispatch step."""
retry_attempt = gate.current_transport_retry_attempt()
delay = gate.transport_redispatch_delay_seconds(
transport_retry_attempt=retry_attempt,
head_sha=expected_head,
retry_after_seconds=exc.retry_after_seconds,
)
eligible = bool(exc.capacity_unavailable and delay is not None)
outputs = {
"transport_capacity_unavailable": "true" if exc.capacity_unavailable else "false",
"transport_retry_eligible": "true" if eligible else "false",
"prepared": "false",
}
if type(exc.http_status) is int:
outputs["transport_http_status"] = str(exc.http_status)
if type(exc.provider_attempt_count) is int:
outputs["provider_attempt_count"] = str(exc.provider_attempt_count)
if delay is not None:
outputs["transport_retry_delay_seconds"] = str(delay)
outputs["transport_retry_next_attempt"] = str(retry_attempt + 1)
gate.append_github_output(outputs)
if eligible:
print(
"::notice::Noema provider capacity unavailable after gateway failover; "
f"bounded continuation re-dispatch is eligible in {delay}s "
f"(attempt {retry_attempt + 1}/{gate.MAX_TRANSPORT_REDISPATCH_ATTEMPTS})."
)
elif exc.capacity_unavailable:
print(
"::error::Noema provider capacity unavailable after gateway failover; "
"automatic re-dispatch budget is exhausted. Review remains required."
)


def publish_verdict(repo: str, number: int, expected_head: str, path: Path) -> int:
"""Publish a prepared verdict only with fresh exact-head/base reviewer authority."""
expected = _canonical_head(expected_head)
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/actions-queue-health.yml

This file was deleted.

11 changes: 1 addition & 10 deletions .github/workflows/agent-review-runtime-quality-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ on:
- "docs/doctoring/strix-legal-git-paths.md"
- "docs/doctoring/strix-model-behavior-error.md"
- "docs/doctoring/strix-quality-timeout-fixtures.md"
- "docs/doctoring/strix-evidence-binding-2159-2168.md"
- "scripts/ci/strix_quick_gate.sh"
- "scripts/ci/strix_evidence_binding.py"
- "scripts/ci/test_strix_quick_gate.sh"
- "tests/test_docs_only_pr_runner_admission.py"
- "tests/test_strix_changed_path_policy.py"
- "tests/test_strix_evidence_binding.py"
- "tests/test_strix_model_behavior_error.py"
- "tests/test_strix_nvidia_nim_not_found_fallback.py"
- "tests/test_strix_workflow_dependency_hashes.py"
Expand Down Expand Up @@ -213,13 +210,10 @@ jobs:
docs/doctoring/strix-legal-git-paths.md|\
docs/doctoring/strix-model-behavior-error.md|\
docs/doctoring/strix-quality-timeout-fixtures.md|\
docs/doctoring/strix-evidence-binding-2159-2168.md|\
scripts/ci/strix_quick_gate.sh|\
scripts/ci/strix_evidence_binding.py|\
scripts/ci/test_strix_quick_gate.sh|\
tests/test_docs_only_pr_runner_admission.py|\
tests/test_strix_changed_path_policy.py|\
tests/test_strix_evidence_binding.py|\
tests/test_strix_model_behavior_error.py|\
tests/test_strix_nvidia_nim_not_found_fallback.py|\
tests/test_strix_workflow_dependency_hashes.py|\
Expand Down Expand Up @@ -349,7 +343,7 @@ jobs:
if: steps.affected_suites.outputs.noema == 'true' || steps.affected_suites.outputs.opencode == 'true' || steps.affected_suites.outputs.review_repair == 'true' || steps.affected_suites.outputs.exact_artifact == 'true'
run: >-
python -m pip install --disable-pip-version-check --require-hashes
-r requirements-opencode-review-ci-hashes.txt -r requirements-noema-document-ci-hashes.txt
-r requirements-opencode-review-ci-hashes.txt

- name: Install exact Noema document dependencies
if: steps.affected_suites.outputs.noema == 'true'
Expand Down Expand Up @@ -400,16 +394,13 @@ jobs:
python -m pytest -q \
tests/test_docs_only_pr_runner_admission.py \
tests/test_strix_changed_path_policy.py \
tests/test_strix_evidence_binding.py \
tests/test_strix_model_behavior_error.py \
tests/test_strix_nvidia_nim_not_found_fallback.py \
tests/test_strix_workflow_dependency_hashes.py \
tests/test_strix_quality_timeout_fixture_budget.py
bash scripts/ci/test_strix_quick_gate.sh
python -m compileall -q \
scripts/ci/strix_evidence_binding.py \
tests/test_strix_changed_path_policy.py \
tests/test_strix_evidence_binding.py \
tests/test_strix_model_behavior_error.py \
tests/test_strix_nvidia_nim_not_found_fallback.py \
tests/test_strix_workflow_dependency_hashes.py \
Expand Down
36 changes: 9 additions & 27 deletions .github/workflows/codeql-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,35 +237,17 @@ jobs:
')"
if [[ "$run_id" =~ ^[1-9][0-9]*$ ]]; then
jobs_json="$(gh api --paginate --slurp "repos/ContextualWisdomLab/.github/actions/runs/${run_id}/jobs")"
dispatch_job="$(printf '%s' "$jobs_json" | jq -c --arg name "$expected_job" '
job_conclusion="$(printf '%s' "$jobs_json" | jq -r --arg name "$expected_job" '
[.[] | .jobs[] | select(.name == $name)]
| if length == 1 then .[0] else empty end
| if length == 1 then .[0].conclusion else empty end
')"
if [ -n "$dispatch_job" ]; then
gate_conclusion="$(printf '%s' "$dispatch_job" | jq -r '
(.steps[]? | select(.name == "Enforce CodeQL Medium+ SARIF gate") | .conclusion) // empty
')"
case "$gate_conclusion" in
success)
echo "verdict=success" >>"$GITHUB_OUTPUT"
echo "Found completed CodeQL dispatch scan gate for ${LANGUAGE}: success."
exit 0
;;
failure|cancelled|skipped)
echo "verdict=failure" >>"$GITHUB_OUTPUT"
echo "Found completed CodeQL dispatch scan gate for ${LANGUAGE}: failure."
exit 0
;;
esac
job_conclusion="$(printf '%s' "$dispatch_job" | jq -r '.conclusion // empty')"
case "$job_conclusion" in
success)
echo "verdict=success" >>"$GITHUB_OUTPUT"
echo "Found completed CodeQL dispatch scan job for ${LANGUAGE}: success."
exit 0
;;
esac
fi
case "$job_conclusion" in
success|failure)
echo "verdict=${job_conclusion}" >>"$GITHUB_OUTPUT"
echo "Found completed CodeQL dispatch scan job for ${LANGUAGE}: ${job_conclusion}."
exit 0
;;
esac
fi

if [ "$RUN_ATTEMPT" != "1" ]; then
Expand Down
Loading
Loading