Add native Codex hook support and harden install/test flows#47
Add native Codex hook support and harden install/test flows#47SihaoLiu merged 2 commits intoPolyArch:devfrom
Conversation
|
This works only on main branch, but not on current release (0.114.0). Don't merge until the stop hook is allowed to block the session for many times |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c35cd75c89
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| BITLESSON_MODEL="$(get_config_value "$MERGED_CONFIG" "bitlesson_model")" | ||
| BITLESSON_MODEL="${BITLESSON_MODEL:-haiku}" | ||
| CODEX_FALLBACK_MODEL="$(get_config_value "$MERGED_CONFIG" "codex_model")" | ||
| CODEX_FALLBACK_MODEL="${CODEX_FALLBACK_MODEL:-$DEFAULT_CODEX_MODEL}" |
There was a problem hiding this comment.
Initialize Codex fallback model before using nounset fallback
With set -u, this line dereferences DEFAULT_CODEX_MODEL before loop-common.sh is sourced, so a valid-but-empty codex_model in merged config ("codex_model": "") causes bitlesson-select.sh to abort with unbound variable before any routing logic runs. This blocks BitLesson selection (and therefore RLCR progress) for users with that config shape instead of falling back to the default model.
Useful? React with 👍 / 👎.
| if not isinstance(stop_groups, list): | ||
| raise SystemExit(f"existing hooks config has invalid Stop array: {hooks_file}") | ||
|
|
||
| managed_pattern = re.compile(r"(^|/)humanize/hooks/(loop-codex-stop-hook\.sh|pr-loop-stop-hook\.sh)$") |
There was a problem hiding this comment.
Match managed hooks by filename, not hardcoded humanize path
The cleanup regex only removes existing managed Stop hooks when the command contains /humanize/hooks/...; when --runtime-root points to a custom path (supported by this script), previously installed Humanize hooks are not recognized as managed and are kept, then appended again. Re-running install in that setup duplicates stop hooks, causing multiple executions per Stop event.
Useful? React with 👍 / 👎.
- add native Codex hook config and installer, wire RLCR/PR stop hooks, and document Codex setup and usage - fix BitLesson selector routing and update related skills/docs - simplify install-skill target handling and harden RLCR test mock argument parsing
|
This works on release (0.116.0). |
Add native Codex hook support and harden install/test flows