Skip to content

test(session-manifest): debounce検証をwall-clock非依存化しserial quarantineを解消する #1141

Closed

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "test_session_manifest_debounce の wall-clock 依存 timing flake を決定論化し、PR #1151 による serial lane 隔離を解消する"
change_kind: code
closure_mode: pr_merged

Parent Issue

none

Parent Goal Ref

Current Validated Scope

  • .claude/hooks/tests/test_session_manifest_debounce.py の wall-clock 依存を除去し、Layer A の決定論的 integration test へ書き直す
  • .claude/hooks/tests/session_manifest_debounce.test.mjs を新規作成し、Layer B の scheduler/state machine unit test を実装する
  • .claude/hooks/session_manifest_debounce.mjs の flushLoop 判断部分を注入可能な core として抽出する(Layer B 実装に必要な最小限の変更のみ。本番の 400ms window・payload schema・producer 動作は変更しない)
  • .github/workflows/ci.yml の parallel_exclude から test_session_manifest_debounce.py を解除するか残存 serial 対象を process smoke のみに限定し(AC7)、Node 依存テスト用の Node 22 固定 lane を追加する(AC6)

Remaining Parent Gaps

なし(parent issue なし)

Outcome

連続イベントの aggregation と quiet-window 境界を決定論的に検証する。
本番の 400ms window、payload schema、producer 動作は変更しない。
PR #1151 による serial lane 隔離は暫定策とし、修正後に解除または process smoke のみに縮小する。

背景

当該テストは以下の非決定的な挙動を示す:

  • ローカル及び base commit では複数回安定 pass(10 passed×複数回)
  • CI runner(高負荷下)では AssertionError: assert 2 == 1 で flake
    • debounce が bash burst を十分に coalesce できず、session_manifest producer が 2 回起動
    • 予期される挙動: burst 内の複数実行が debounce で 1 回に統合される
  • 実害: PR ci: add Ruff fast-static gate before pytest #1129 マージ前 CI を 1 度落とし、gh run rerun --failed による手動再実行で green 化
  • 既存の暫定 mitigation: PR 実装: python-test を pytest-xdist 並列化(plan SSOT / serial 統合 / generator fail-close)(#1064) #1151 により test_session_manifest_debounce.py ファイル全体が parallel_exclude に追加され、serial lane(-n 0)で実行されている。これは CPU contention による timing 変動を減らす暫定策であり、wall-clock 依存を除去したわけではない

burst 境界の定義:

  • 隣接する enqueue 時刻の差が WINDOW_MS 未満 → 同一 burst
  • 差が WINDOW_MS 以上 → 新しい burst

debounce ロジックはイベントファイル名の Date.now() を基準に最新イベントからの静穏時間を計測し、quietForMs < WINDOW_MS の間だけ待機する。したがって「10 回呼んだ」ことと「1 burst だった」ことは同義ではない。

fake clock の適用制約:
現行テストは Python 親プロセス・10 個の独立 Node front-gate プロセス・detached: true で起動される別 Node worker という構成である。MockTimers を Python 側や 1 つの Node テストに導入しても、別 OS プロセスの Date.now() と timer には届かない。

対応方針として以下を実装する:

  1. Layer A: 決定論的 black-box integration(推奨)

    • 有効な worker.lock を作成してworker を抑止し、10 イベントをキューする
    • lock 削除後に node session_manifest_debounce.mjs --flush を同期実行して exactly-once を検証
    • event queue・lock・child process が teardown 後に残らないことを確認
  2. Layer B: scheduler/state machine unit test(Layer A と組み合わせ)

    • flushLoop の判断部分を { now, sleep, listEvents, readEvents, runProducer, removeEvents } を受け取る小さな core へ抽出
    • 注入 fake clock(または Node 22 MockTimers)で quiet-window 境界をケース別に検証
    • Layer A だけでは timer 境界が検証されないため Layer B が必要

In Scope

  • .claude/hooks/tests/test_session_manifest_debounce.py の wall-clock 依存を除去し、Layer A の決定論的 integration test へ書き直す
  • .claude/hooks/tests/session_manifest_debounce.test.mjs を新規作成し、Layer B の scheduler/state machine unit test を実装する
  • .claude/hooks/session_manifest_debounce.mjs の flushLoop 判断部分を注入可能な core として抽出する(Layer B 実装に必要な最小限の変更のみ。本番の 400ms window・payload schema・producer 動作は変更しない)
  • .github/workflows/ci.yml の parallel_exclude から test_session_manifest_debounce.py を解除する、または残存 serial 対象を明示的な process smoke のみに限定する(AC7)
  • .github/workflows/ci.yml または既存 Node 22 lane に Node 依存テスト(session_manifest_debounce.test.mjs)を追加する(AC6)

Out of Scope

Runtime Verification Applicability

decision: not_applicable
rationale: >
  本 Issue はテストコード・CI lane の変更であり、ゲーム runtime(src/state・src/render・src/systems)
  の挙動には影響しない。手動プレイテストや runtime 観測による受け入れ確認は対象外。

Acceptance Criteria

  • AC1: burst 境界が < WINDOW_MS / >= WINDOW_MS と明文化されており、テストが同一 burst 内であることを制御された手段で保証している
  • AC2: 10 個の異なる event を worker 停止状態でキューでき、producer 呼び出しが 0 回であることを確認する
  • AC3: forced flush(--flush)で producer が正確に 1 回だけ起動し、debounce_event_count == 10 かつ全 delta が集約される
  • AC4: quiet-window 境界(窓内の deadline 延長・WINDOW_MS 到達時の 1 回 flush・gap >= WINDOW_MS での 2 バッチ)を仮想時計または注入 clock で検証する
  • AC5: テスト終了時に event ディレクトリが空・worker.lock が不存在・起動した foreground child がすべて終了・残存 detached worker がない
  • AC6: Node 依存テスト(session_manifest_debounce.test.mjs)は Node 22 固定 lane で実行される
  • AC7: parallel_exclude から test_session_manifest_debounce.py を解除するか、残存 serial 対象を明示的な process smoke のみに限定する
  • AC8: tolerance 拡大・xfail・実装: ci_failure_attribution.py で known infra failure を分類し fix_delta 汚染を防ぐ #965 登録・rerun-pass を完了条件にしない(これらによる green 化は不可)

Verification Commands

# AC1
# AC2
# AC3
# AC5
# preflight-scope: pr_review_only
$ uv run --locked pytest -q .claude/hooks/tests/test_session_manifest_debounce.py -x
# AC4
# preflight-scope: pr_review_only
$ node --test .claude/hooks/tests/test_session_manifest_debounce.mjs
# AC6
# preflight-scope: pr_review_only
$ node --test .claude/hooks/tests/test_session_manifest_debounce.mjs
# AC7
# preflight-scope: pr_review_only
$ uv run --locked pytest -q .claude/hooks/tests/test_session_manifest_debounce.py -x
# AC8
# preflight-scope: pr_review_only
$ uv run --locked pytest .claude/hooks/tests/test_session_manifest_debounce.py --collect-only -q

Allowed Paths

  • .claude/hooks/tests/test_session_manifest_debounce.py
  • .claude/hooks/tests/test_session_manifest_debounce.mjs(新規、旧名: session_manifest_debounce.test.mjs)
  • .claude/hooks/session_manifest_debounce.mjs(DI 抽出のみ)
  • .github/workflows/ci.yml(AC7: parallel_exclude 解除、AC6: Node lane 追加)
  • .github/ci/python-test-plan.json(Scope Delta: xdist SSOT の parallel_exclude: [] 更新)
  • scripts/ci/tests/test_python_test_plan.py(Scope Delta: parallel_exclude: [] 変更に伴うテストアサーション更新)

注意: .github/workflows/ci.yml 編集時は CI_TEST_PERFORMANCE_ADVISORY_V1 に従い、.claude/skills/ci-test-performance/SKILL.md を先読みし、PR 証跡に CI_TEST_PERFORMANCE_DECISION_V1 を出力すること。

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • session_manifest_debounce.mjs の DI 抽出以上の本番ロジック変更(仕様変更)が必要になった場合
  • Node 22 MockTimers 以外の外部依存追加が必要になった場合
  • 後続 Phase / 別スコープへの波及が判明した場合
  • CI 既存 required job の削除・名称変更が生じる場合
  • AC8 の禁止手段(tolerance 拡大・xfail・実装: ci_failure_attribution.py で known infra failure を分類し fix_delta 汚染を防ぐ #965 登録・rerun-pass)に頼らない解決策が存在しない場合

Required Skills

  • Python
  • Node.js / JavaScript(node:test MockTimers または fake clock injection)
  • pytest
  • .claude/skills/ci-test-performance/SKILL.md(.github/workflows/ 編集前に必読)

関連


Source: follow-up from post-merge-cleanup of #1129 / #1133
dedupe_key: follow-up:flaky-session-manifest-debounce

Activity

  1. added
    bug
    on Jun 23, 2026
  2. squne121 commented on Jun 25, 2026

    @squne121
    OwnerAuthor

    判定

    REQUEST_CHANGES。Issue #1141 は、現状の契約のまま実装開始すべきではありません。

    方向性は妥当ですが、現行テストが「同一debounce burst」を生成している保証がなく、assert 2 == 1 がテストflakeではなく正当な2バッチ処理だった可能性を排除できません。加えて、推奨案・代替案・検証コマンドにも実装不能または不整合があります。Issue #1141 自体には、現時点で補足コメントはありません。

    主要指摘

    1. BLOCKER — 「連続10回」が同一burstである保証がない

    テストはdebounce窓を80msに設定し、10回の node プロセスを subprocess.run() で直列起動しています。各起動は新規Nodeプロセスなので、CI負荷によって隣接イベントの間隔が80ms以上になれば、実装が2回flushするのは仕様どおりです。

    実装はイベントファイル名の Date.now() を基準に最新イベントからの静穏時間を計測し、quietForMs < WINDOW_MS の間だけ待機します。したがって「10回呼んだ」ことと「1 burstだった」ことは同義ではありません。

    Node.js自身も、setTimeout の実行時刻や順序を厳密には保証していません。(Node.js)

    必須修正

    Issue内でburstを次のように明示すべきです。

    隣接するenqueue時刻の差が WINDOW_MS 未満なら同一burst。
    差が WINDOW_MS 以上なら新しいburst。

    そのうえで、テストは実時間ではなく、制御されたイベント時刻またはworker停止状態を使う必要があります。


    2. BLOCKER — 推奨されているfake clockは現行テスト構造には適用できない

    Node 22の node:test MockTimersは、同一テストコンテキスト内の Date と setTimeout を共通の仮想時計で制御できます。([Node.js]2)

    しかし現行テストは、

    • Python親プロセス
    • 10個の独立したNode front-gateプロセス
    • detached: true で起動される別Node worker

    という構成です。MockTimersをPython側や1つのNodeテストに導入しても、別OSプロセスの Date.now() とtimerには届きません。workerは明示的にdetach・unrefされています。

    またNode 22ではMockTimers自体がexperimentalです。利用可能ではありますが、長期安定性を優先するなら、小さな依存注入型clockの方が堅牢です。([Node.js]2)

    Issueは次のどちらかを明示的に許可する必要があります。

    1. debounce判定部分を副作用のないcoreへ抽出し、now・sleep・producerを注入可能にする。
    2. 実装ファイルを変更しない場合、既存lockと --flush を使った決定論的integration testへ変更し、timer境界の検証は別テストに分離する。

    「本番実装は一切変更不可」のまま「fake clock推奨」は両立していません。


    3. BLOCKER — #965 はknown-flaky登録先ではない

    #965は、コンテナイメージ取得失敗などの既知インフラ障害を分類し、fix deltaへの誤帰属を防ぐためのIssueです。一般的なflaky testの登録・xfail・rerun-pass機構ではありません。したがって、#1141の「#965でknown flakyとして扱う」という代替案は実装契約として誤っています。

    pytest公式も、恒久的な非strict xfailは危険であり、可能なら低レベルテストへ書き換えて不確定性を除去する方針を示しています。([pytest ドキュメント]3)

    必須修正

    • #965へのfallbackを削除する。
    • xfail、失敗時rerunによるgreen化、許容回数の緩和をAC達成手段に含めない。
    • 現在のserial laneは一時的な隔離策と明記する。

    4. BLOCKER — Verification Commandがリポジトリ内で自己完結していない

    Issue記載の --count=5 はpytest標準オプションではなく、pytest-repeat が提供するものです。([GitHub]4)

    一方、現行dev依存には pytest と pytest-xdist はありますが、pytest-repeat はありません。

    したがって、Issue記載コマンドは開発者のグローバル環境に偶然プラグインがある場合しか動かない、非hermeticな検証です。

    推奨

    追加依存を増やさず、明示的なshell loopに置換します。

    for i in $(seq 1 100); do
      uv run --locked pytest -q \
        .claude/hooks/tests/test_session_manifest_debounce.py \
        -x || exit 1
    done

    ただし100回成功は補助的なstress evidenceです。決定論的テストの代替にはなりません。


    5. HIGH — 現行アサーションはfalse-greenになり得る

    テストは producer.log が作成された時点で待機を終了し、直ちに行数が1であることを確認します。これは「最初のproducerが動いた」ことしか示しません。2個目のdetached workerがその直後に追記すれば、テストは誤ってpassします。

    テスト終了条件には少なくとも次が必要です。

    • eventsディレクトリが空
    • worker.lock が存在しない
    • producer呼出回数が一定期間変化しない
    • テストが起動したforeground childはすべて終了済み
    • teardown後に残存workerがない

    pytest公式も、テスト自身が生成した非同期実行主体は終了時に待ち合わせる必要があるとしています。プロセスについても同じ原則を適用すべきです。([pytest ドキュメント]3)


    6. HIGH — Issueが現行mainの対策を反映していない

    現行mainでは、PR #1151によりこのテストファイル全体がxdist並列laneから除外され、専用serial laneで実行されています。計画ファイルにも80ms debounceのタイミング不安定性が理由として記録されています。

    CI workflow側も -n 0 のserial laneとして実行しています。

    これは競合負荷を減らす暫定策であって、実時間依存を除去したわけではありません。Issueにこの前提がないと、実装者が既存対策を重複させるか、serial隔離だけでIssueをcloseする可能性があります。

    必須修正

    • PR #1151を「既存の暫定mitigation」として記載する。
    • 決定論化後に parallel_exclude を解除するか、残すテストを個別に限定するACを追加する。
    • ファイル全体を恒久的にserial化したままcloseしない。

    7. HIGH — 本番の実行モデルとテスト・CI laneが一致していない

    本番設定ではPostToolUse hookが async: true で、Bash|Edit|Write ごとに node session_manifest_debounce.mjs を起動します。

    Claude Code公式仕様では、async hookは呼び出し元をブロックせず、PostToolUseはツールごとに発火し、parallel tool callでは並行して発火します。([Claude API Docs]5)

    対して現在のテストはfront gateを完全に直列実行します。本番の並行lock競合を検証できません。

    さらに、現在このファイルが走る python-test jobはPythonのみをsetupしており、Nodeを明示的にpinしていません。Node 22をpinする node-backed-hook-tests jobは存在しますが、このdebounceテストは対象外です。

    推奨

    • Node依存integration testはNode 22固定のnode-backed laneへ移す。
    • pure scheduler testは node --test で実行する。
    • process wiring smokeだけserialに残す。
    • 並行front-gate競合を1ケース追加する。

    推奨する実装構成

    Layer A: 決定論的black-box integration

    既存テスト群には、live lockでworkerを抑止する仕組みと、--flush を同期実行するテストが既にあります。

    これを利用して次の手順にします。

    1. pytestプロセスのPIDをownerとする有効な worker.lock を作成する。
    2. 内容の異なる10イベントをenqueueする。
    3. event fileが10個あり、producer呼出しが0回であることを確認する。
    4. lockを削除する。
    5. node session_manifest_debounce.mjs --flush を同期実行する。
    6. producer呼出しが正確に1回であることを確認する。
    7. payloadの debounce_event_count == 10 と全deltaの集約を確認する。
    8. event queueが空、lockが不存在、producer countが安定していることを確認する。

    これはqueue、lock、aggregation、forced flushのexactly-once性を実時間なしで検証します。ただしdebounce timer境界そのものは検証しないため、次のLayer Bが必要です。

    Layer B: scheduler/state machineのunit test

    flushLoop の判断部分を、例えば以下の依存を受け取る小さなcoreへ抽出します。

    {
      now,
      sleep,
      listEvents,
      readEvents,
      runProducer,
      removeEvents
    }

    検証ケースは最低限次です。

    • 10イベントが窓内なら、窓終了前にflushしない。
    • 最終イベントから WINDOW_MS 到達時に1回だけflushする。
    • WINDOW_MS - 1 のイベントでdeadlineが延長される。
    • gapが WINDOW_MS 以上なら2バッチになる。
    • snapshot取得後に到着したイベントは次loopで処理される。

    Node 22 MockTimersで Date と setTimeout を共通時計として進められますが、experimental APIであるため、単純な注入fake clockでも構いません。([Node.js]2)

    修正版Issue契約案

    Title

    test(session-manifest): debounce検証をwall-clock非依存化しserial quarantineを解消する

    Outcome

    連続イベントのaggregationとquiet-window境界を決定論的に検証する。
    本番の400ms window、payload schema、producer動作は変更しない。
    PR #1151によるserial lane隔離は暫定策とし、修正後に解除またはprocess smokeのみに縮小する。

    Acceptance Criteria

    1. burst境界が < WINDOW_MS / >= WINDOW_MS と明文化されている。
    2. 10個の異なるeventをworker停止状態でqueueできる。
    3. forced flushでproducerが正確に1回だけ起動し、debounce_event_count == 10 となる。
    4. quiet-window境界を仮想時計または注入clockで検証する。
    5. テスト終了時にevent、lock、child processが残らない。
    6. Node依存テストはNode 22固定laneで実行される。
    7. parallel_exclude を解除するか、残存serial対象を明示的なprocess smokeだけに限定する。
    8. tolerance拡大、xfail、#965登録、rerun-passを完了条件にしない。

    Verification Commands

    uv run --locked pytest -q \
      .claude/hooks/tests/test_session_manifest_debounce.py \
      -x
    
    node --test \
      .claude/hooks/tests/session_manifest_debounce.test.mjs
    
    for i in $(seq 1 100); do
      uv run --locked pytest -q \
        .claude/hooks/tests/test_session_manifest_debounce.py \
        -x || exit 1
    done

    別Issueとして起票すべき実装リスク

    今回のテスト修正に混ぜるべきではありませんが、実装コードから次の競合リスクも確認できます。

    • lock公開がatomicではない。 openSync(..., 'wx') で空ファイルを作成して閉じた後、別操作でJSON metadataを書いています。その間に別プロセスが空ファイルを不正metadata=staleと判定してunlinkできるため、複数ownerが同時にacquire成功し得ます。これはコードから導ける競合可能性であり、今回報告された直列テスト失敗の原因と断定はできません。
    • state directoryがrepository単位で共有される。 複数sessionのeventが同じディレクトリへ入り、aggregation後の session_id と issue_number は最新eventの値だけを使用します。同一repoで複数sessionが並行すると、別sessionのdeltaを混ぜる可能性があります。

    以上から、#1141は「flakeを許容するIssue」ではなく、aggregation integrationとtimer state machineを分離して決定論化するIssueへ改訂するのが妥当です。なお、assert 2 == 1 の発生自体は#1141本文の報告に基づくもので、元の失敗attemptのartifactまでは独立に確認できていません。

  3. changed the title [-]flaky test_session_manifest_debounce — CI python-test の timing flake を決定論化する[/-] [+]test(session-manifest): debounce検証をwall-clock非依存化しserial quarantineを解消する[/+] on Jun 25, 2026
  4. squne121 commented on Jun 25, 2026

    @squne121
    OwnerAuthor

    Refinement Loop: Approved

    The issue has been approved and is ready for implementation.

  5. squne121 commented on Jun 25, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-25T13:13:18Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1141
      body_sha256: "sha256:c4d5e0cb185c2ee636c72968ba8f70ddc42de74f8244ae17a08d091aa3b17cc5"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      source: ensure_contract_snapshot_auto
  6. squne121 commented on Jun 25, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-06-25T13:34:00Z)

    検証結果

    • uv run --locked pytest -q .claude/hooks/tests/test_session_manifest_debounce.py -x → 6 passed (wall-clock-independent, AC1/AC2/AC3/AC5)
    • node --test .claude/hooks/tests/session_manifest_debounce.test.mjs → 6 pass (virtual clock, AC4)

    AC達成状況

    • AC1: wall-clock非依存burst制御(lock所有でworker抑止) ✅
    • AC2: 10イベントキュー、プロデューサー0回確認 ✅
    • AC3: forced flush → exactly-once、debounce_event_count==10 ✅
    • AC4: quiet-window境界を仮想クロックで検証(node:test 6 pass) ✅
    • AC5: event dir空・lock不在・child終了確認 ✅
    • AC6: Node 22固定lane (ci.yml追加) → CI実行時確認
    • AC7: parallel_exclude解除済み(python-test-plan.json変更) ✅
    • AC8: tolerance拡大・xfail・rerun-passなし ✅

    後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup

  7. squne121 commented on Jun 25, 2026

    @squne121
    OwnerAuthor

    Contract Review Result

    CONTRACT_REVIEW_RESULT_V1:
      status: go
      generated_at: "2026-06-25T14:00:00Z"
      generated_by: issue-contract-review
      issue_url: https://github.com/squne121/loop-protocol/issues/1141
      body_sha256: "sha256:9e50a687e91e9a9f3d7521678af8905595d7777911eb1d445daf02f51ba269b6"
      checks:
        readiness: go
        blockers: pass
        product_spec: pass
        vc_preflight: pass
      vc_preflight_classifications:
        - ac: AC4
          classification: skipped
          category: preflight_scope_pr_review_only
          decision: go
          verification_owner: pr-review-judge
        - ac: AC5
          classification: skipped
          category: preflight_scope_pr_review_only
          decision: go
          verification_owner: pr-review-judge
        - ac: AC6
          classification: skipped
          category: preflight_scope_pr_review_only
          decision: go
          verification_owner: pr-review-judge
        - ac: AC7
          classification: skipped
          category: preflight_scope_pr_review_only
          decision: go
          verification_owner: pr-review-judge
        - ac: AC8
          classification: skipped
          category: preflight_scope_pr_review_only
          decision: go
          verification_owner: pr-review-judge
      mode: static
      source: all_checks_pass
      skip_idempotency_check: true
      supersedes: "https://github.com/squne121/loop-protocol/issues/1141#issuecomment-4799636961"
  8. added 3 commits that reference this issue on Jun 25, 2026
  9. squne121 commented on Jun 25, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-06-25T15:55:56Z)

    検証結果

    • uv run --locked pytest -q .claude/hooks/tests/test_session_manifest_debounce.py -x → 6 passed (wall-clock-independent, AC1/AC2/AC3/AC5)
    • node --test .claude/hooks/tests/session_manifest_debounce.test.mjs → 6 pass (virtual clock, AC4)

    AC達成状況

    • AC1: wall-clock非依存burst制御(lock所有でworker抑止) ✅
    • AC2: 10イベントキュー、プロデューサー0回確認 ✅
    • AC3: forced flush → exactly-once、debounce_event_count==10 ✅
    • AC4: quiet-window境界を仮想クロックで検証(node:test 6 pass) ✅
    • AC5: event dir空・lock不在・child終了確認 ✅
    • AC6: Node 22固定lane (ci.yml追加) → CI実行時確認
    • AC7: parallel_exclude解除済み(python-test-plan.json変更) ✅
    • AC8: tolerance拡大・xfail・rerun-passなし ✅

    後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup

  10. squne121 commented on Jun 25, 2026

    @squne121
    OwnerAuthor

    implement-issue: 実装完了 (2026-06-25T16:12:26Z)

    検証結果

    • uv run --locked pytest -q .claude/hooks/tests/test_session_manifest_debounce.py -x → 6 passed (wall-clock-independent, AC1/AC2/AC3/AC5)
    • node --test .claude/hooks/tests/session_manifest_debounce.test.mjs → 6 pass (virtual clock, AC4)

    AC達成状況

    • AC1: wall-clock非依存burst制御(lock所有でworker抑止) ✅
    • AC2: 10イベントキュー、プロデューサー0回確認 ✅
    • AC3: forced flush → exactly-once、debounce_event_count==10 ✅
    • AC4: quiet-window境界を仮想クロックで検証(node:test 6 pass) ✅
    • AC5: event dir空・lock不在・child終了確認 ✅
    • AC6: Node 22固定lane (ci.yml追加) → CI実行時確認
    • AC7: parallel_exclude解除済み(python-test-plan.json変更) ✅
    • AC8: tolerance拡大・xfail・rerun-passなし ✅

    後続: PR レビュー(pr-review-judge)→ マージ → post-merge-cleanup

  11. added a commit that references this issue on Jun 25, 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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions