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
9 changes: 7 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ try:
except Exception:
sys.exit(0)

notes = payload.get("verification", {}).get("notes", [])
verification = payload.get("verification")
notes = verification.get("notes", []) if isinstance(verification, dict) else []
if not isinstance(notes, list):
notes = []
for note in notes[:5]:
print(f"[ERROR] {note}")

Expand Down Expand Up @@ -254,4 +257,6 @@ main() {
echo ""
}

main "$@"
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then
main "$@"
fi
36 changes: 36 additions & 0 deletions tests/test_codex_port_contracts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import ast
import json
import re
import subprocess
import sys
from pathlib import Path


Expand Down Expand Up @@ -196,6 +198,40 @@ def test_installers_use_bootstrap_json_output_file():
assert "--json-output" in install_ps1


def test_unix_installer_handles_null_verification_diagnostics():
payload = json.dumps(
{
"verification": None,
"steps": [
{
"required": True,
"ok": False,
"group": "verification",
"stderr": "verification unavailable",
}
],
}
)
result = subprocess.run(
[
"bash",
"-c",
'source "$1"; PYTHON_BIN="$2"; print_bootstrap_diagnostics "$3"',
"bash",
str(ROOT / "install.sh"),
sys.executable,
payload,
],
check=False,
capture_output=True,
text=True,
)

assert result.returncode == 0, result.stderr
assert "[ERROR] Failed bootstrap step: verification." in result.stdout
assert "[ERROR] verification unavailable" in result.stdout


def test_api_readiness_matrix_covers_smoke_suite():
smoke_text = (ROOT / "scripts" / "run_api_smoke_suite.py").read_text(encoding="utf-8")
match = re.search(r"DEFAULT_SKILLS = (\[[\s\S]*?\])", smoke_text)
Expand Down