Fix primary model detection and add advisory hook - #26
Open
cri5Castro wants to merge 1 commit into
Open
Conversation
SanHsien
added a commit
to SanHsien/agent-advisor
that referenced
this pull request
Aug 23, 2026
…,CodeQL 加掃 python 上游 PR DannyMac180#26 四個部分逐一對照本 fork:root rollout 的 --primary 檢查不適用 (本 fork 的 inspector 只服務 auxiliary,primary 走 attestation);「改讀最新 一筆 turn context」刻意不引用——委派期間宣告的 route 必須整段成立,中途換 model 是證據矛盾,取最新一筆會讓矛盾靜默通過;configure-model-hook skill 不 引用;advisory hook 引用。 hook 改寫成 Python:上游用 jq,但預設 Windows 主機沒有 jq(dev_check 的 POSIX verifier 正因此 SKIP),python3 已是 verify.sh 的既有依賴。13 條測試 釘住永不阻擋、永不聲稱 reasoning effort、永不授權 orchestration。 CodeQL 原本只掃 actions,理由是「沒有應用程式碼」。四種 edition 落地後不再 成立:fix_hook_quoting.py 會改寫使用者的 hooks.json、session-start-activation.py 進使用者啟動路徑、check_upstream_updates.py 處理外部 API 回應。 dev_check.ps1 全綠(23 tests)。reviewed_pr_through 24 → 26。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome
Sol Advisor now verifies the active primary thread as exact gpt-5.6-sol / high before orchestration without sending valid root sessions through the subagent-only metadata path. The inspector reads the latest turn context, so an in-thread model change takes effect. Configured defaults alone do not count as active-session proof.
What changed
Verification
The verifier covers latest-turn selection, exact mismatch reporting, malformed or ambiguous runtime metadata, unchanged auxiliary-role validation, hook allowlisting, unrelated prompts, and absence of reasoning-effort claims.
Trade-off
The bundled hook remains experimental and advisory because stable hook input exposes the active model but not reasoning effort. The primary runtime inspector remains the automatic authority for both fields, with same-thread user confirmation retained as the explicit fallback.