Skip to content

feat: refuse each agent's integration below its declared minimum CLI version - #1720

Merged
yansfil merged 5 commits into
mainfrom
feat/agent-minimum-versions
Oct 27, 2026
Merged

yansfil merged 5 commits into
mainfrom
feat/agent-minimum-versions

Conversation

@yansfil

@yansfil yansfil commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Related: #1714 (the refusal shape this extends), #1717 (the canary record, which now shows the Minimum column)

Summary

Until now only Claude Code and Codex CLI had a minimum CLI version.
Grok, OpenCode, Pi, omp and Antigravity had none, so a too-old CLI still got Hide's hook, plugin or extension and some features broke without saying why.
Now each of the seven agents' declarations (hide-agent-adapter/src/declarations.rs) carries the oldest CLI version Hide's integration was proven on, plus where that proof lives, and nothing else keeps a copy.
Below that version, the kit puts down no hook, plugin or extension for any agent, and the row says why: Pi 1.0.3 at ~/.local/bin/pi is older than 1.0.4, which Hide's extension needs; update it.

Agent Minimum Proof
Claude Code 2.1.278 the Memory hook shape (unchanged)
Codex CLI 0.155.1 the oldest version Hide installs into, read from source at rust-v0.155.1 (unchanged)
Grok 1.0.52 the agent journey ran on 1.0.52 on all three systems (run 39152230964); the 1.0.50 source reading is kept as a note, since a reading is not a run
OpenCode 1.18.35 Windows: a windows-latest runner loaded Hide's plugin on 1.18.35 on 2026-10-11, and its helper spawn crossed stdin and stdout; macOS/Linux: 1.18.30 shapes, journey 2.0.29
Pi 1.0.4 extension shapes captured from 1.0.4 (fixtures/pi-extension/pi-1.0.4.json), journey 1.0.4
omp 18.7.0 fixtures/pi-extension/omp-18.7.0.json, journey 18.7.0
Antigravity 1.4.2 Windows: 1.4.2 runs hooks through cmd /c with Go escaping, and the encoded PowerShell guard was proven on it; journey 1.4.2 on all three systems (run 39152230964)

Review

  • 규칙 (운영자 결정 2026-10-27): minimum은 에이전트마다 하나입니다. macOS·Linux·Windows 모든 시스템에서 통합이 증명된 버전 중 가장 오래된 것을 씁니다. 한 시스템에서만 증명된 버전은 기준이 되지 않고, 시스템별 minimum도 두지 않습니다. 소스를 읽은 것은 실행이 아니므로 증명으로 치지 않습니다. 이 규칙은 MinimumVersion doc와 docs/agent-hooks.md에도 적었습니다. 그래서 OpenCode는 1.18.30에서 1.18.35로, agy는 1.4.0에서 1.4.2로, Grok은 1.0.50에서 1.0.52로 올렸습니다.
  • 조심해서 볼 파일: hide-agent-hooks/src/diagnosis.rs - program_version이 CLI의 --version 답을 파일의 경로·search·수정 시각·길이 단위로 기억합니다(최대 32개, 버전을 못 읽었을 때만 60초 뒤 다시 물음). docs/agent-hooks.md는 "파일 버전마다 한 번만 묻는다"고 적어 두었는데 763ca34 이후 코드에는 그 캐시가 없었습니다. 이 PR이 다시 넣습니다.
  • 조심해서 볼 파일: hide-kit/src/agent_kit.rs - guidance(Grok, agy)와 plugin(OpenCode, Pi, omp) 경로가 이미 current인 조각은 건드리지 않고, 새로 쓰거나 교체하려 할 때만 거부합니다. #1714의 hook part와 같은 순서입니다.
  • 비용 검토: kit 패스마다 프로그램 수만큼 stat 한 번이 늘고, --version 하위 프로세스는 CLI 파일이 바뀔 때만 한 번 돕니다. 기억은 32개로 상한을 두었고 넘치면 가장 오래된 것부터 지웁니다.

Evidence

  • 확인한 것: hide-kit 새 테스트 an_agent_older_than_its_minimum_version_gets_no_hook_plugin_or_extension - 다섯 에이전트에 각각 0.0.1이라고 답하는 CLI를 두면 Failed와 update_agent가 나오고, 이유에 라벨·버전·경로·minimum이 모두 들어가며 Hide 파일은 쓰이지 않습니다. 같은 CLI가 minimum으로 답하면 Installed가 됩니다.
  • 확인한 것: hide-agent-hooks 새 테스트 agent_version - Unix에서는 스크립트, Windows에서는 npm식 .cmd shim으로 같은 CLI를 만듭니다. 두 번 물어도 실행은 한 번이고, 파일이 바뀌면 다시 물어 새 버전을 읽습니다. Windows 레인에서 돕니다.
  • 확인한 것: hide-agent-adapter 계약 테스트 - 지원하는 모든 에이전트가 x.y.z 형식의 minimum과 저장소 안의 증거(파일, 그리고 문서면 heading)를 가지는지 봅니다. scripts/tests/test_agent_journey_contract.py - agent-clis.json의 CI pin이 모두 minimum 이상인지 봅니다.
  • 확인한 것: 로컬 macOS에서 nextest -p hide-kit(192), -p hide-agent-hooks(388), -p hide-agent-adapter(18), clippy -D warnings, fmt, scripts/tests 681개가 모두 통과했습니다. 나머지 레인은 CI에 맡겼습니다.
  • 확인한 것: fix: check and run each agent CLI as the operator's shell finds it #1714 테스트(the_hook_is_judged_by_the_copy_...)의 CLI 스텁을 이미 시작해 둔 stand_ins::program으로 바꿨습니다. 부하가 큰 상황(load 12)에서 새로 쓴 스크립트의 macOS 첫 실행 검사가 750 ms를 넘었고, 캐시가 그 실패를 그 패스 동안 유지해 테스트가 한 번 떨어졌습니다.
  • 확인한 것: canary record(scripts/agent-canary-record.py)에 Status와 Last passed 사이 Minimum 열을 추가했습니다. 값은 contracts/agent-journey.json의 minimum_version에서 읽습니다. test_agent_canary가 표의 머리줄과 행을 확인하고, 로컬 scripts/tests 673개가 main을 머지한 뒤에도 통과했습니다.
  • 확인하지 못한 것: 실제 오래된 CLI(예: Pi 1.0.3)로 직접 재본 적은 없습니다. 다섯 에이전트의 --version 출력 형식은 CI journey가 pin 버전과 맞추는 답을 근거로 삼았습니다.
  • 확인하지 못한 것: Windows에서 kit의 거부 판단 자체. hide-kit 테스트는 macOS·Linux에서만 돕니다(docs/INSTALL.md에 unverified 칸으로 적었습니다).
  • 확인하지 못한 것: 설치된 앱과 Settings 화면. 화면 코드는 바꾸지 않았고, 웹이 이미 update_agent 이유를 모든 조각에 대해 보여 줍니다.
  • 확인하지 못한 것: 브랜치 커밋 본문에 bare Codex's가 한 번 들어갔습니다. 로컬 attribution 검사가 이를 잡았지만, 이미 푸시된 히스토리라 고쳐 쓸 수 없었습니다. byline이 아니라 대상을 가리키는 표현입니다.
Verification record

…version

Every supported agent's declaration names the oldest CLI version its hook, plugin or extension was proven on, with the proof. The kit refuses Grok's and agy's hook, OpenCode's plugin and Pi's and omp's extension below it as it already did Claude Code's and Codex's hook, naming the agent, the version, the program's path and the minimum. The CLI's version is asked once per version of its file again, as docs/agent-hooks.md says, and the journey contract exports each minimum.
… system

OpenCode's minimum moves to 1.18.35 and agy's to 1.4.2, the oldest versions proven on Windows as well as macOS and Linux; one minimum per agent, none per system.
… 1.0.52

The canary record gains a Minimum column read from the journey contract. Grok's minimum moves to 1.0.52, where the journey ran on all three systems; the 1.0.50 source reading stays as a note, since a reading is not a run.
@yansfil
yansfil merged commit e22c924 into main Oct 27, 2026
56 checks passed
@yansfil
yansfil deleted the feat/agent-minimum-versions branch October 27, 2026 05:27
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