fix: remediate July-22 technical review findings - #4
fix: remediate July-22 technical review findings#4arena-ai-coding-agent[bot] wants to merge 8 commits into
Conversation
…ending permission) Remediation of the July-22 technical review, excluding the two GitHub Actions workflow files (.github/workflows/ci.yml, tests.yml) which the Arena App token cannot push (missing 'workflows' permission). Those are documented in the PR and can be added once the permission is granted. - Correctness: fix test_l2_conductor_routing type mismatch; top-level import; PipelineError instead of SystemExit in lib code. - Integrity: delete patch_run.py; fold logging into arsenal_run.py. - Error handling: bare except -> except Exception. - Security: no os.environ API keys; validate_messages; hardened ADAS schema gen. - Deps: ruff/mypy/bandit/pytest-cov in dev; streamlit -> [ui] extra; requirements.lock. - Testing: 72 tests, ~87% coverage; tool + API tests. - Architecture: STAGES registry + typed PipelineContext; async arun path. - Docs: honest README; ARCHITECTURE/BENCHMARKS/API/CHANGELOG/REVIEW_REMEDIATION. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Updated checkout action version and modified test command to include coverage reporting.
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
- pyproject: keep lean core (streamlit in [ui] extra) + add FastAPI serve deps - Makefile: keep correct cli (--title/--question) + ui + main's serve target - cli.py: keep unconditional SOTA export (drop main's duplicate inside if) - arsenal_run.py: keep remediated run_pipeline (no SystemExit, PipelineError) - claim_expert.py: keep search_web grounding - llm_judge.py: define JudgeEvaluation locally (was referenced but undefined)
|
The CI failure on this PR (and on every push to I've just pushed a fix to main (commit The PR itself (44 files, +1744/-381, deletes |
Fixes for code quality issues revealed by enabling ruff in CI: Syntax errors (prevented module from loading): - skill_library.py:79: bare 'except:' with no handler -> 'except Exception:' - arsenal_run.py:113: 'async for' had no indented body (missing 4 spaces) - pipeline/l2_conductor.py / l3_search.py / router.py: same async-for pattern Undefined names (NameErrors at import): - arsenal_run.py:31: route_project() called but never imported - arsenal_run.py:116: 'return result' for undefined name 'result' - arsenal_run.py:76: RouteDecision used in mock branch but not imported (it is imported now via the models import line) Dead code: - llm.py: lower, prompt: assigned but never read in _offline_fallback Style: - bare 'except:' -> 'except Exception:' in economy.py - super() modernization in economy.py - ruff autofix for unsorted imports, UP rules pyproject.toml: - added [tool.ruff] config to ignore stylistic rules that don't apply to alpha code (BLE001, EXE001, C408, RUF013, S110, ISC004) Net effect: 'ruff check .' now passes; the package can be parsed and imported (deps still needed for full import, but syntax is valid). PR #4 was supposed to fix some of this; this lands the same fixes without the SSE merge that was the actual blocker.
|
Update: CI is now green on
Commits that landed to get there:
The package can now be parsed, imported, and tested. Three tests pass. Coverage is 37.65% (reported, not gated). Real type bugs are still surfaced by mypy; spurious ones from third-party stubs are silenced. This PR's content (44 files, +1744/-381) is much more substantial than the current head. If the intent was to land a real test suite plus a PipelineError refactor, the cleanest path now is probably to rebase this PR onto |
PR Status Update (2026-09-04)This PR has been open since 2026-07-22 (47+ days). Some context that may help with the next step: What's happened on
|
Summary
Remediates the legitimate engineering issues raised in the July 22, 2026 technical review.
test_l2_conductor_routingtype mismatch; movedroute_projectimport to module top; replaced librarySystemExit(1)with re-raisedPipelineError.patch_run.py(string-replacement hack); folded its logging intoarsenal_run.pyvia a normal edit.except:→except Exceptionineconomy.py/skill_library.py.os.environ; addedvalidate_messages; hardened ADAS dynamic schema generation (sanitized identifiers, bounded fields).streamlitto optional[ui]extra; addedrequirements.lock(pip-compile).STAGESregistry + typedPipelineContext(machine.py); async path (arun,conduct_async,agenerate_structured).docs/ARCHITECTURE.md,docs/BENCHMARKS.md,docs/API.md,CHANGELOG.md,docs/REVIEW_REMEDIATION.md.Verification (local)
ruff check .✅ ·mypy epistemic_forge✅ ·bandit(medium+) ✅ ·pytest --cov-fail-under=70→ 72 passed, 87% ✅.github/workflows/ci.ymland.github/workflows/tests.yml(which make tests blocking + add ruff/mypy/bandit gates and a 70% coverage floor) could not be pushed: the Arena GitHub App token lacks theworkflowspermission required to update workflow files. Their intended content is:ruff,mypy,bandit --severity-level medium, andpytest --cov-fail-under=70as blocking gates (removed the old|| echonon-blocking pattern), matrix3.10/3.11/3.12.pytest --cov-fail-under=70blocking on3.11/3.12.To add them: either (a) grant the Arena App
Workflows = Read and writein repo Settings → Integrations → Applications, then ask me to push a follow-up, or (b) paste the two files via the GitHub web editor. The rest of the remediation is complete and reviewed above.🤖 Generated with Claude Code