GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(guardrails): standaloneを末端コマンドへ渡す by terisuke · Pull Request #369 · Cor-Incorporated/opencode

Conversation

@terisuke

@terisuke terisuke commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Issue for this PR

Closes #360

Type of change

  • Bug fix

What does this PR do?

auth export などの末端コマンドが所有する --standalone を親へ挿入し、認証・セッション管理が構文エラーになる問題を修正します。例えば auth --standalone export は auth export --standalone になります。

ローカル処理のコマンドは引数を維持し、グローバルオプションの値や -- 以降をコマンド名と誤認しません。旧版と新版で異なる debug の構文は選択済みCLIのヘルプで判定し、確認に失敗したら起動を止めます。レビュー注目点は末端ごとの挿入位置と、ヘルプ検査に最終起動と同じ環境を渡す点です。

How did you verify your code works?

packages/guardrails で下記を実行し、36 pass / 0 failを確認しました。実ランチャーを厳密な引数スタブへ接続し、旧版・新版の構文、明示オプションの維持、ヘルプ確認失敗時の停止を検査しています。認証情報や外部モデルAPIは使っていません。

H5-E2E: mise exec [email protected] [email protected] -- bun test profile/src/standalone-args.test.ts --only-failures
H5-E2E-OUT: 36 pass, 0 fail, 57 expect() calls; actual launcher exercised with strict leaf-command stubs
H5-PAIR: N/A

Screenshots / recordings

UIの変更なし。

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

先行する上流同期 #362 / #373 がdevへ入るまで、比較差分には同期側workflow変更を含みます。以下は先行同期で実測した構造変更の検証です。本PR固有の変更で制御の緩和は行いません。

H5-guard: yes
H5-NEGATIVE: 実YAMLのfork lint共通祖先でCor GUI警告fixtureは1 warning/exit1、削除後exit0。共通祖先なしもexit1。release-process-daemonのrepo guard無し元YAMLで追加検査1 fail/exit1、guard後14 pass。Windowsのcache変数を除く対照はETIMEDOUT、単独復元は4処理成功。FileWrite.targetのpathを/incorrectへ片側変異しPAIR test exit 1、復元後成功。Blacksmith-only runner変異もexit1
H5-LEDGER: 既存scripts/h5-admission-check.shの不足マーカー入力がguard-ledger.jsonlへcomponent=H5,event=blockを記録する経路を一時台帳で実測
H5-RETIRE: 全writer入口を同じFileAccess経路へ結ぶ型または動作テストが片側変異の全件を検出できた時点で文字列PAIR検査を撤去。runner fallbackは専用fork runnerの同一SHA対象job20回連続成功または上流の標準runner移行時に撤去
H5-SUBTRACTION: N/A
H5-PAIR: release-process-daemon.release.if ↔ GitHub job gateとfork-ci.testのrepo評価; mutation=if削除相当の元YAMLで1fail。adapter.test.tsのFileWrite到達検査 ↔ core/file-write.tsのaccess.resolve; mutation=/incorrectでexit1

追加 commit(2026-11-05、独立レビューへの対応)

d535639900: 独立レビューで HIGH が 1 件出ました。インストール済みの 2.0.32 は、mcp list/auth/logout と plugin list/check/update で --standalone を受理しません(Unrecognized flag: --standalone in command opencode mcp list、実測)。2.2.5 はすべて受理します。これらの末端コマンドも、debug config/agents と同じく、選択したバイナリの --help で判定するようにしました。

  • 実バイナリでの確認: 2.0.32 では mcp list・plugin check・debug config は変更しません。auth export・run には付けます。2.2.5 ではすべてに付けます。
  • テスト: 修正前のコードで 6 fail、修正後は standalone-args で 42 pass、guardrails 全体で 217 pass / 0 fail。pre-push の bun run check は 35/35 successful。

767382a4bb: 再レビューで MEDIUM が 1 件ありました。help に --standalone が無い CLI(2.0.32)では、mcp・plugin の末端コマンドが背景 service に対して動いてしまいます(plugin update なら service 側の設定を変える)。そこで起動を止め、OPENCODE_GUARDRAILS_ALLOW_SERVICE=1 を案内するようにしました。2.0.32 の debug config/agents はローカル処理なので、そのまま通します。

  • 実バイナリでの確認: 2.0.32 の mcp list・plugin update は止まり、debug config はそのまま、auth export には付けます。2.2.5 ではすべてに付けます。
  • 止める処理を外す変異を当てると 6 fail します。修正後は guardrails 全体で 217 pass / 0 fail、pre-push は 35/35 successful。

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
joe-ieta and others added 30 commits October 30, 2026 16:33
@joe-ieta
fix(app): keep models with unknown release dates visible (anomalyco#6…
986221a
…0496)
@arvsrn
fix(app): keep settings nav scroll inside the list (anomalyco#60504)
fa96f42
@Tarquinen
feat(core): add Claude Agent provider (anomalyco#58782)
f29e281
@Hona
fix(session-ui): compute highlight styles once per subtree in Chromium (
66c278b
anomalyco#60513)
@opencode-agent @MrMushrooooom
docs(go): raise DeepSeek V4.1 Flash limits to $100/$200/$105 (anomaly…
34aaa90
…co#60515)

Co-authored-by: MrMushrooooom <[email protected]>
@opencode-agent @MrMushrooooom
docs(go): revert DeepSeek V4.1 Flash limits to $80/$160/$85 (anomalyc…
ca68fde
…o#60532)

Co-authored-by: MrMushrooooom <[email protected]>
@Hona
fix(ui): watch the toast portal instead of the whole page (anomalyco#…
5ff0ede
…60537)
@Hona
fix(session-ui): relabel code copy buttons only when the language cha…
1e03c36
…nges (anomalyco#60538)
@Hona
fix(app): stop :has() rules restyling every ancestor on DOM insertion (…
92b2ca0
…anomalyco#60521)
@Hona
fix(session-ui): send and render only the markdown blocks a delta cha…
56880cb
…nged (anomalyco#60562)
@Hona
fix(session-ui): allocate less per streamed markdown delta (anomalyco…
cfdb9da
…#60549)
@github-actions
release: v2.2.3 (anomalyco#60564)
b44b716
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@neriousy
fix(tui): span vertical session tab pulse across full tab width (anom…
c6c5d36
…alyco#60338)
@neriousy
test(tui): drop PHP highlighting test (anomalyco#60408)
ad2e082
@arvsrn
fix(app): simplify the session location popover (anomalyco#60492)
eeb3c19
@Hona
fix(session-ui): stop re-checking the timeline projection on every st…
eff7264
…reamed delta (anomalyco#60577)
@arvsrn
fix(session-ui): copy user messages from the actions menu (anomalyco#…
95fc3c8
…60576)
@Tarquinen
fix(core): drop Claude Code's /login hint from login errors (anomalyc…
ef3a7f1
…o#60592)
@usrnk1
feat(app): guide Claude Agent setup before connecting (anomalyco#60603)
8505041
@usrnk1
feat(app): add base branch picker shortcut (anomalyco#60579)
1e28374
@kitlangton
feat(core): add experimental artifacts with pluggable providers (anom…
8f0fc21
…alyco#60351)
@jlongster
feat(core): rename persistent terminals (anomalyco#60329)
65c0d83
@opencode-agent @Tarquinen
fix(tui): add right padding to edit and patch diffs (anomalyco#60614)
6b4329c
Co-authored-by: Tarquinen <[email protected]>
@opencode-agent @jlongster
fix(app): list commands above sessions in command palette search (ano…
df39a70
…malyco#60616)

Co-authored-by: jlongster <[email protected]>
@opencode-agent @Tarquinen
fix(tui): keep plugin-set prompt cursor styles (anomalyco#60599)
bb6769c
Co-authored-by: Tarquinen <[email protected]>
@jlongster
chore(core): use @opencode/pty 0.4.0 (anomalyco#60387)
4e7d369
@kitlangton
feat(core,server): enable schedules by default and run loop in openco…
e76c67a
…de serve (anomalyco#60478)
@opencode-agent @MrMushrooooom
docs(go): raise DeepSeek V4.1 Flash limits to $100/$200/$105 (anomaly…
4fdea64
…co#60625)

Co-authored-by: MrMushrooooom <[email protected]>
@rekram1-node
refactor(ai): one ai object for Promise and Effect (anomalyco#60516)
f0944f0
@rekram1-node
chore(release): leave AI package changes out of the changelog (anomal…
fed4cfc
…yco#60631)
terisuke and others added 19 commits November 4, 2026 15:25
@terisuke
test(guardrails): Windows環境を群で切り分ける
e8bb2db
2変数の復元では原因を説明できなかったため、既知の非秘密Windows環境群を一度戻してから適応的に最小集合へ絞る。Get-Aclは最大30回・各5秒・全体170秒で制限し、全群復元も失敗する場合はそこで停止する。

値はowner-onlyの一時JSONに限定し、ログは既知の存在有無・選択名・終了結果だけとする。production、実ACL制約、full unitのstrict実行は変更しない。

Refs: #366

Agent-Lane: codex
@Hona
perf(ui): run the spinner and the text shimmer on the compositor (ano…
ba084e6
…malyco#61562)
@Hona
perf(app): stop restyling the side panel on every move of a resize dr…
59e95cc
…ag (anomalyco#61560)
@terisuke
test(guardrails): Windowsの検査環境を引き継ぐ
b0b67e7
実Windowsの18回の対照実験で、既存PSModuleAnalysisCachePathだけの継承がACL検査に必要十分と分かった。Turbo strictと隔離したCLI childでその既存値を維持する。

権限と5秒上限を保持し、目的を果たした一時診断コードを撤去する。

Refs: #366

Agent-Lane: codex
@terisuke
chore: Windows検証環境の修正を同期へ保持
7cb3c4e
@terisuke
test(ci): Windowsの同時実行数を制限する
03a9511
4vCPUのfork runnerでACL subprocessを含む追加suiteと他Bun suiteが並列に走ると、初回の検査だけ既存5秒枠に収まらない。forkのWindows package実行数を1へ絞り、fresh VMで容量条件を検証する。

Linuxと上流の同時実行数3を保持し、全テスト・strict環境・5秒上限は変更しない。事前のPowerShell起動やテスト除外は加えない。

Refs: #366

Agent-Lane: codex
@terisuke
ci(guardrails): 上流専用の配布をforkで抑止
f62576a
process-daemonタグからの配布は上流だけが実行し、forkではOIDCとrelease書込みを持つjobへ入らないようにする。秘密情報を使わないchecksとbuildはforkのPRでも維持する。

Refs: #357

Agent-Lane: codex
@terisuke
chore: Windows検証の同時実行数を同期へ保持
1085d27
@terisuke
chore: 同期元とstandalone引数修正を統合
1d5770e
@rekram1-node
fix(cli): wait for background jobs in opencode run (anomalyco#60699)
ffe6fed
@terisuke
ci: forkのGUI検査基準を上流祖先へ統一
9f1e63e
上流同期の未変更GUIまでforkの変更と判定していた。ローカルと同じ公式上流の共通祖先をCIでも解決し、fork側のファイル全体検査は維持する。取得失敗や共通祖先不明は拒否する。

Refs: #357

Agent-Lane: codex
@terisuke
chore: 上流のCLI待機とUI描画修正を同期
e77c08e
@terisuke
ci(gitleaks): 上流の既知検出を履歴位置に限定
9d07826
メッセージ識別子とloopbackの認証設定例が上流同期の履歴で再検出されるため、除外をcommit・path・rule・行へ固定する。同じ設定で新commitの同pathと別pathに置く非機能候補は検出される。

Refs: #357

Agent-Lane: codex
@adamdotdevin
feat(core): add a websearch.use policy action (anomalyco#61557)
baeebc2
@adamdotdevin
feat(server): let embedders supply the fetch for OpenCode's HTTP and …
ce53f18
…MCP requests (anomalyco#61582)
@terisuke
chore: 上流同期の履歴検査資料を保持
42fc801
@terisuke
chore: 同期元のCI検証更新を統合
e250252
@terisuke
chore: 上流の検索権限とHTTP注入修正を同期
f01d09f
@terisuke
chore: 公開同期候補をランチャーへ統合
5e6f420
@terisuke
terisuke marked this pull request as ready for review November 4, 2026 10:48
@terisuke terisuke mentioned this pull request Nov 4, 2026
chore(guardrails): 実CLIとAIDDの発火を検査 #372
Closed
3 tasks done
@terisuke terisuke closed this Nov 5, 2026
@terisuke terisuke reopened this Nov 5, 2026
@terisuke terisuke mentioned this pull request Nov 5, 2026
fix(guardrails): モデル許可集合を上流2.2.5のカタログへ揃える #374
Merged
3 tasks done
terisuke and others added 2 commits November 5, 2026 17:50
@terisuke @claude
fix(guardrails): mcp と plugin の standalone も対象CLIのhelpで判定する
d535639
#369 の独立レビュー(HIGH 1件)への対応。インストール済みの 2.0.32 は mcp と plugin の
末端コマンドで --standalone を受理しない(`opencode mcp list --standalone` は
"Unrecognized flag: --standalone in command opencode mcp list"、2026-11-05 実測)。
2.2.5 はすべて受理する。debug config / agents と同じく、選択済みバイナリの --help が
フラグを宣言する場合だけ付ける。確認に失敗したら起動を止める動作も同じ。

テストのスタブは、mcp / plugin でも 2.0.32 型の help では --standalone を拒否する。
文書の「auth --standalone export は構文エラー」も 2.0.32 に限る旨へ直す。

Agent-Lane: claude-code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@terisuke @claude
fix(guardrails): 2.0.32のmcpとpluginは背景serviceへ流さず止める
767382a
#369 の再レビュー(MEDIUM 1件)への対応。help が --standalone を宣言しない CLI
(2.0.32)で mcp / plugin の末端コマンドをそのまま通すと、背景 service に対して動き、
`plugin update` は guardrails のプロファイルではなく service 側の設定を変える。
launcher がまさに防ぐはずの経路なので、起動を止めて OPENCODE_GUARDRAILS_ALLOW_SERVICE=1
を案内する。2.0.32 でローカル処理の debug config / agents は従来どおりそのまま通す。

Agent-Lane: claude-code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 6, 2026
fix(guardrails): stop run hanging on a socket stdin nobody closes #377
Merged
Windows の unit で PowerShell を起動する鍵ファイルのテストが 5 秒を超えて落ちる #379
Closed
test(guardrails): give the PowerShell key-file tests time on Windows #380
Merged
@terisuke
terisuke merged commit 7b840bb into dev Nov 6, 2026
26 of 30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2系CLIの階層に合わせてstandaloneオプションを挿入する

Uh oh!

There was an error while loading. Please reload this page.

20 participants

@terisuke @joe-ieta @arvsrn @Tarquinen @Hona @neriousy @usrnk1 @kitlangton @jlongster @rekram1-node @thdxr @cheapredwine @simonklee @nexxeln @richardharnisch @adamdotdevin @renatomoselli @heimoshuiyu @ludvigrask @la55u
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.