Skip to content

Fix primary model detection and add advisory hook - #26

Open
cri5Castro wants to merge 1 commit into
DannyMac180:mainfrom
cri5Castro:fix-primary-model-detection
Open

Fix primary model detection and add advisory hook#26
cri5Castro wants to merge 1 commit into
DannyMac180:mainfrom
cri5Castro:fix-primary-model-detection

Conversation

@cri5Castro

Copy link
Copy Markdown

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

  • Add backward-compatible --primary inspection for one exact root rollout while preserving auxiliary validation.
  • Apply the primary evidence order: complete host metadata, local runtime inspection, then explicit same-thread confirmation after remediation.
  • Require SELECTIVE ROUTE before local inspection and disclose when the gate relies on user attestation.
  • Add the experimental $sol-advisor:configure-model-hook command and a model-only UserPromptSubmit advisory hook.
  • Keep the hook non-blocking: it does not change models, prove reasoning effort, or authorize orchestration.
  • Document TUI, CLI startup, and App Server model-selection paths.
  • Bump the plugin release to 0.6.1 while preserving unrelated skill and manifest wording.

Verification

  • sh plugins/sol-advisor/scripts/verify.sh
  • Validate both Sol Advisor skills with quick_validate.py
  • Validate the plugin manifest with validate_plugin.py
  • git diff --check

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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant