Skip to content

verify: Windows ownership の installDir 単位性を再検証(census が全 AfterFX.exe を数える件) #136

Open

Description

@rebuildup

背景

docs/verification.md の 2026-11-21 Windows 行は「ownership は installDir 単位: 別 version の AE(2027)が同時に動いていても installDir が指す install の owned session を確立できる」と記録している。

しかし ae-a8n origin/main のコードを確認すると、Windows の #hostProcessesFrom(src/driver/script-invocation.ts)は installDir/path に関係なく全ての AfterFX.exe をカウントする(-r launcher のみ除外)。つまり foreign AE が 1 プロセスでもいれば owned-session launch は census で refuse するはず。

2026-11-21 の device-windows 再実験(branch 134、ae-a8n 0.5.0 tarball)では、vidc pipeline の AE 2027(pid 52192)が常駐している間 HostNotOwnedError(kind attached)で refuse され、3 failed/blocked となった。これはコードの記述と一致する。

疑問

11-21 早朝の「foreign AE 2027 起動中に compare pass」記録と矛盾する。可能性:

  • 当時の foreign AE 2027 は launch 後に出現した(mid-test → HostLeftRunning で quit 拒否されるが compare は pass)— 記録の「起動中」が run 全体を覆っていたか要確認
  • census が session/user や executable path で実質フィルタしていた別条件があった
  • 記録自体の誤り

Tasks

Activity

  1. rebuildup commented on Nov 21, 2026

    @rebuildup
    ContributorAuthor

    調査結果(2026-11-21、branch 136 / PR #137)

    1. タイミング証拠 — 「foreign AE 2027 起動中」記録は誤りと確定

    C:\Users\rebui\ae-test-acceptance\consumer\.ae-test-results\real\real-host-smoke-spec-mjs-1\trace.jsonl は 3 run 分が append されている。run 3(foreign AE 2027 起動中と記録された回)の session イベント:

    • session.launch 16:54:26Z(op 開始 ~16:54:15Z)、ownership evidence: "pid 9924 is still the only instance"
    • session.close 16:54:35Z、ownership: owned、quit: true

    ownership() の owned 判定は再 census で now.length === 1 を要求するため、run 3 の session 全期間(約 20 秒)で AfterFX.exe は owned の 1 process のみだった。ae-a8n の Windows census(windowsProcesses = Win32_Process Name='AfterFX.exe'、path/session/user 無制限)から見て foreign AE 2027 は存在し得ない。run 途中で起動→終了した可能性も、close 直前の census(16:54:35Z)で 1 process のため排除される。観測誤認(起動途中・別マシンの AE 等)が最もありそう。

    2. コードとの整合

    • src/driver/host-processes.ts windowsProcesses(): AfterFX.exe を path を問わず全て 列挙(「Not filtered by path」と明記)
    • script-invocation.ts #hostProcessesFrom: win32 は launcher 由来の -r 子 process のみ除外し、他は全件カウント
    • launch 時の #preexisting が非空 → confirmLaunched で kind attached → ae-test は HostNotOwnedError で refuse。installDir が効くのは「どの install を起動・quit するか」であり、census の範囲ではない(macOS は executable path + uid で scoped されるが win32 は非対称)

    3. 再実験(本日 09:2x JST)

    前提の「vidc pipeline の AE 2027 常駐」は既に終了していたため、以下の状態で実施:

    • consumer C:\Users\rebui\ae-test-acceptance\consumer\(ae-test 1.2.0 tarball)+ ae-a8n 0.5.0 candidate tarball(origin/main 444665c 由来)を node_modules に適用
    • foreign AfterFX.exe 3 process 常駐: 検証用の偽 AfterFX.exe(ping.exe リネーム)2 + ae-a8n-verify/issue276 の別検証が起動した実 AE 2026 1
    • 結果: npm run test:real → 1 failed / 0 passed(~181 s)。spawn した AE 2026(pid 46580)は readiness probe に応答せず HostUnavailableError("no script was sent")。ownership 分類(attached)には到達しなかったが、owned session は確立できず fail-closed。foreign process は全て未接触・残留を確認

    attached → HostNotOwnedError の refusal 経路自体は、同日 07:5x の #134 / PR #135 の試行(vidc pipeline の AE 2027 pid 52192 常駐 → HostNotOwnedError "already running before launch")で実測済み。本日の結果は「foreign が probe に応答しない場合は readiness timeout で先に失敗する」という補足証拠。

    4. 後片付け

    • consumer の ae-a8n を 0.2.0 に復元、検証用ファイル・偽プロセスは全て除去。実 AE(別検証の pid 19404)には未接触
    • ※ 私のテストが spawn した AfterFX.exe(pid 46580)が、並行する ae-a8n-verify/issue276 検証の AE instance と single-instance handoff で干渉した可能性あり(向こうの pid 13108 が ~9:29 に消失)。親 agent 経由で該当検証の担当へ共有推奨

    結論

    「ownership は installDir 単位」は Windows では誤り。正しくは: launch 時 census は全 AfterFX.exe を数え、foreign がいれば refuse(fail-closed)。installDir は起動対象の選択であって census 範囲ではない。ドキュメント修正は PR #137(Draft、base release/1.2.1)。#135 とは同じファイルの近接行を変更するため merge 順に注意。

  2. added a commit that references this issue on Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions