feat(triaging-feedback): 피드백 자동 트리아지 스킬(Plan B) — Codex-SDK 워커·게이트·needs-human 티켓 - #7
Merged
Conversation
… setup 워크트리 gitignore 안내
…웃·게이트/프롬프트 안전 - codexAdapter: process.env 통째 상속 제거, PATH/HOME만 통과하는 buildCodexOptions 순수함수 + makeCodexRunner 팩토리(F1). 매 턴 fresh thread로 전환해 resumeThread/CodexThread 제거(F2). AbortController로 timeoutMs 실배선(F3, 죽은 설정이던 것을 활성화). - dispatch: verdict.feedback_id가 요청 행과 다르면 실패 처리(행 id 참칭/혼동 방어, F2). fix 프롬프트는 검증된 verdict 필드만 전달하고 row.body는 배제. - config: TRIAGE_FIX_ENABLED 기본값을 안전한 false로(리터럴 'true'만 활성, F5), TRIAGE_RECLAIM_MS 기본값을 30분→90분으로(F3). - git.ts diffStat에 --no-renames 추가 — rename이 게이트 G4의 리스크 표면 정규식을 우회하던 문제 수정(F6). - prompt.ts의 모든 replaceAll을 함수 치환으로 전환 — 본문에 $&/$' 등이 있을 때 프롬프트가 왜곡되던 문제 수정(F7). - 테스트: codexAdapter 신규 3건, dispatch 1건 추가, config 기대값 갱신.
- SKILL.md/setup.md: "failed는 재시도된다"는 잘못된 문구를 코드 실제 동작(findActionable/claim이 pending·stale-claimed만 고르고 failed는 절대 재클레임하지 않음)에 맞게 교정 — 재시도하려면 운영자가 triage_state를 pending으로 리셋해야 함을 명시(F4). - setup.md: TRIAGE_RECLAIM_MS 기본값 스니펫을 90분(5400000)으로 갱신하고 reclaim > 최대 실행시간 조건 + launchd 단일 label 가정을 명문화(F3). - SKILL.md/setup.md: TRIAGE_FIX_ENABLED 기본값이 false(리터럴 'true'만 활성)임을 반영(F5). - 스펙 Decision Log에 write 턴 fresh-thread 전환(F2) 항목 추가 — resumeThread 폐기 이유와 "변경파일 ⊆ 인용파일" 검증 v1 보류 사유 기록.
Owner
Author
프리머지 외부 리뷰(3자, Codex/gpt-5.5 high) + 수정 웨이브 2머지 전 독립 리뷰를 돌렸고, Critical 2건 포함 7건을 수정했다(
보류(하드닝, Task 11 후보): "변경파일 ⊆ 인용파일" 검증, |
Owner
Author
⏪ 머지 리버트됨 (
|
Owner
Author
|
후속: 리버트 5분 뒤 main에 Reapply 커밋( |
2 tasks
Owner
Author
|
정정: Reapply( |
SSFSKIM
added a commit
that referenced
this pull request
Jul 10, 2026
Two-tier trust (review #1, human design call): developer feedback — the server-resolved role snapshot in TRIAGE_TRUSTED_ROLES (default admin), or a stripped .env #TRIAGE_DEV_CODE body prefix — is read as instruction (R1/R4 waived: dev ideas can be born ready-for-agent, labeled source:dev-feedback); user feedback keeps the conservative gate, residual risk explicitly accepted in the Decision Log. The dev code is stripped before the body reaches the prompt or ticket so it never leaks into a public issue. The rest of the review, all fixed: - #2 R2 requires a REAL file citation (path-shaped after :line strip; unknown:12 no longer counts) - #3 R3 scans risk SYMBOLS (assertStudentAccess, supabaseAdmin, RLS, generate-plan layout fns, past_exam_problems, SUPABASE_SERVICE_ROLE_KEY) in addition to paths - #4 claim issues a lease token; writeback is lease-conditional (late writeback after reclaim throws instead of clobbering); reclaim window validated at config load; second idempotency check right before registerTicket - #5 findExisting fails closed on gh search errors - #6 ticket body temp files: mkdtemp dir, mode 0600, removed in finally - #7 TRIAGE_ENABLED checked before config parsing - #8 spec drift fixed (feedback-dispatch.ts references, two-kill-switches) p86 DDL note gains triage_lease UUID. New src/trust.ts. 91 tests green, tsc clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
무엇 / 왜
인앱 피드백 자동 트리아지 CI의 Plan B —
skills/triaging-feedback/스킬입니다. 자체 호스팅 Mac cron이 ida-solution의 Supabasefeedback테이블을 폴링 → 새 행마다 Codex-SDK 스레드 하나로 진단 → 스코프 좁고 안전한 버그는 수정 PR(기존reviewing-prs --sweep루프가 리뷰), 그 외(아이디어·질문·진단불가·리스크 표면)는needs-human보드 티켓. doperpowers 플러그인의 첫 Node/TypeScript 서브시스템(자체package.json).설계 스펙:
docs/doperpowers/specs/2026-07-09-feedback-ci-triage-design.md· 구현 계획:docs/doperpowers/plans/2026-07-09-feedback-triage-skill-doperpowers.md안전 모델 — model-proposes / dispatcher-disposes
Codex 스레드는 일회용 git 워크트리 안의 코드만 읽기/수정한다. 자격증명·
gh토큰은 절대 갖지 않으며, 모든 특권 사이드이펙트(Supabase writeback·gh pr create·board-register.sh)는 디스패처 코드가 실행한다. 픽스 게이트는 모델의 자기보고가 아니라 실제 git diff로 강제한다(리스크 표면·크기·테스트·근본원인 인용).주요 결정 (스펙 Decision Log)
run()sandbox가 없음을 확인했으나,resumeThread(id,{sandboxMode})로 read-only 진단→workspace-write 수정 흐름을 무비용으로 얻음.tsc가 실@openai/codex-sdk@0.143.0타입에 통과.needs-human(v8 보드 어휘 확정) · 본문은--body-file· 모든gh/보드 호출은cwd=repoPath로 실행.reviewing-prs --sweep가 리뷰(중복 회피).검증
tsc --noEmitclean. 스파이크 + 9개 TDD/글루 태스크, 각 태스크 독립 리뷰 + Opus 전체-브랜치 리뷰.git diff --numstat가 tracked 수정 파일만 봐서 새로 추가된 파일(새sql/pNN.sql·app/api/cron/*= 리스크 표면)이 빈 diff로 게이트 통과 →add -A로 커밋될 뻔.git add -A+git diff --cached --numstat로 커밋될 형태 그대로 측정하게 수정.claim이pending만 가드해서findActionable이 회수 대상으로 고른 stale-claimed행을 영영 재클레임 못 함 →reclaimMs무력.findActionable과 동일 predicate로 수정.병합 전 필요 (⚠️ 무단 머지 금지 — 사람 리뷰 후)
p86마이그레이션이 라이브 + Mac에OPENAI_API_KEY/service-role 키가 있어야 함. 미검증 3개 seam(codexAdapter 2턴 흐름·git.ts 워크트리/빌드·poll.ts end-to-end)을 실인프라로 검증.triage_state/host컬럼이 존재해야 폴러가 claim/writeback 가능.findExisting의gh pr list가 fail-open(에러 시 중복 PR 여지) — 현재는 본문 마커 + 사람 리뷰가 백스톱.