Files
hakorune/.github/workflows/box_first_guard.yml
Moe Charm 53d88157aa Phase 12: 統一TypeBox ABI実装開始 - ChatGPT5による極小コアABI基盤構築
- TypeBox ABI雛形: メソッドスロット管理システム追加
- Type Registry: Array/Map/StringBoxの基本メソッド定義
- Host API: C ABI逆呼び出しシステム実装
- Phase 12ドキュメント整理: 設計文書統合・アーカイブ化
- MIR Builder: クリーンアップと分離実装完了

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 05:04:56 +09:00

64 lines
2.3 KiB
YAML

name: Box-First Guard (Advisory)
on:
pull_request:
push:
jobs:
advisory-guards:
name: Advisory Box-First Checks
runs-on: ubuntu-latest
continue-on-error: true # informational for now
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y ripgrep
- name: Disallow direct env reads in jit (except config/runtime)
run: |
set -e
echo "Checking for std::env::var direct reads under src/jit (excluding config.rs and rt.rs)"
# find occurrences outside config.rs and rt.rs
if rg -n "std::env::var\(" src/jit | rg -v 'src/jit/(config|rt)\.rs'; then
echo "[GUARD] Found direct env reads outside jit::config/rt (advisory)."
exit 1
else
echo "[OK] No direct env reads outside jit::config/rt"
fi
- name: Report direct env reads (global advisory)
run: |
echo "[ADVISORY] Listing direct std::env::var reads outside config aggregators..."
rg -n "std::env::var\(" src \
| rg -v 'src/jit/config\.rs|src/config/env\.rs' \
|| true
echo "[NOTE] Above is advisory; prefer using config::env or jit::config for critical flags."
- name: Prevent reintroducing removed modular builder feature (advisory)
run: |
set -e
if rg -n "mir_modular_builder" Cargo.toml src || true; then
echo "[GUARD] Found 'mir_modular_builder' mention (advisory). This feature was removed."
exit 1
else
echo "[OK] No 'mir_modular_builder' mentions found"
fi
- name: Enforce single B1 ABI switch point (advisory)
run: |
set -e
echo "Checking unexpected B1 mentions"
# allow occurrences in known switch points
if rg -n "B1" src | rg -v 'abi_param_for_kind|returns.*types::B1|jit-b1-abi'; then
echo "[GUARD] Found unexpected B1 usage (advisory)."
exit 1
else
echo "[OK] No unexpected B1 usage"
fi
- name: Print reminder for stats.jsonl (advisory)
run: |
echo "[NOTE] Consider emitting stats.jsonl with {function, abi_mode, reason} at least once per run."