fix(extension): diff_review steps=[] race condition — in-memory metadata cache (v0.3.13)

Root cause: Collector deletes pending file before Extension reads edit_step_indices.
Fix: diffReviewMetadata Map caches step indices in Extension memory.
Known issue added. Devlog entry 003.
This commit is contained in:
Variet Worker
2026-03-16 16:09:04 +09:00
parent 12a1cf8692
commit 9ef2c3f07c
9 changed files with 163 additions and 43 deletions

25
tests/test_diff_review.py Normal file
View File

@@ -0,0 +1,25 @@
"""
diff_review E2E 테스트용 임시 파일
생성: 2026-03-16 14:44
"""
def hello(name: str = "World"):
"""인사 메시지를 반환합니다."""
return f"Hello, {name}!"
def add(a: int, b: int) -> int:
"""두 숫자를 더합니다."""
return a + b
def multiply(a: int, b: int) -> int:
"""두 숫자를 곱합니다."""
return a * b
if __name__ == "__main__":
print(hello("User"))
print(add(1, 2))
print(multiply(3, 4))

View File

@@ -0,0 +1,25 @@
"""
Diff Review E2E Test File
Created to trigger diff_review flow in AG extension.
This file write should be tracked by DIFF-TRACK in the extension.
"""
def test_diff_review():
"""Test that diff review Accept/Reject works via Discord."""
# This is a dummy test file to verify the diff_review pipeline:
# 1. Extension detects this file write via step probe
# 2. On RUNNING→IDLE transition, creates diff_review pending
# 3. Discord shows Accept all / Reject all buttons
# 4. User clicks Accept → AcknowledgeCascadeCodeEdit RPC fires
assert True, "Diff review E2E test passed"
def test_multi_file_tracking():
"""Verify multiple file modifications are tracked together."""
results = {
"files_tracked": 0,
"pending_created": False,
"rpc_called": False,
}
return results