fix(config,extension): BRAIN_PATH 빈문자열 버그 + 크로스프로젝트 DEDUP MERGE 수정
- config.py: os.getenv BRAIN_PATH 빈값 시 CWD 해석 → or 패턴으로 수정 - extension.ts: writePendingApproval DEDUP에 project_name 가드 3곳 추가 - extension.ts: HTTP /pending file_permission dedup에도 project_name 가드 - known-issues: 2건 추가 (BRAIN_PATH, DEDUP MERGE) - devlog: 2026-03-11 생성
This commit is contained in:
@@ -652,7 +652,8 @@ function startObserverHttpBridge() {
|
||||
const existingFiles = fs.readdirSync(pendingDir).filter((f) => f.endsWith('.json'));
|
||||
for (const ef of existingFiles) {
|
||||
const existing = JSON.parse(fs.readFileSync(path.join(pendingDir, ef), 'utf-8'));
|
||||
if (existing.step_type === 'file_permission' && existing.status === 'pending') {
|
||||
if (existing.step_type === 'file_permission' && existing.status === 'pending'
|
||||
&& existing.project_name === projectName) {
|
||||
const age = nowMs - (existing.timestamp * 1000);
|
||||
if (age < 10_000 && age >= 0) {
|
||||
logToFile(`[HTTP] filtered duplicate file_permission (${age}ms old): ${ef}`);
|
||||
@@ -2557,7 +2558,8 @@ function writePendingApproval(data) {
|
||||
for (const ef of existingFiles) {
|
||||
const efPath = path.join(pendingDir, ef);
|
||||
const existing = JSON.parse(fs.readFileSync(efPath, 'utf-8'));
|
||||
if (existing.source === 'dom_observer' && existing.status === 'pending') {
|
||||
if (existing.source === 'dom_observer' && existing.status === 'pending'
|
||||
&& existing.project_name === projectName) { // CRITICAL: same project only
|
||||
const age = nowMs - (existing.timestamp * 1000);
|
||||
if (age < DEDUP_WINDOW_MS && age >= 0) {
|
||||
// MERGE: update DOM observer pending with detailed step_probe info
|
||||
@@ -2574,7 +2576,8 @@ function writePendingApproval(data) {
|
||||
}
|
||||
}
|
||||
// Dedup: skip if step_probe already created pending for same step_index (within window)
|
||||
if (existing.status === 'pending' && data.step_index !== undefined && existing.step_index === data.step_index) {
|
||||
if (existing.status === 'pending' && existing.project_name === projectName
|
||||
&& data.step_index !== undefined && existing.step_index === data.step_index) {
|
||||
const age = nowMs - (existing.timestamp * 1000);
|
||||
if (age < DEDUP_WINDOW_MS && age >= 0) {
|
||||
logToFile(`[DEDUP] skip: step_index ${data.step_index} already pending in ${ef}`);
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user