Skip to content

feat(nunchi): managed gotgan refresh lane + Codex harness-prompt exclusion + per-run index budget (#2331 P3-2) - #2377

Merged
seoseo-ai merged 1 commit into
mainfrom
agent/seoseo/2331-p3-2-gotgan-lane
Oct 22, 2026
Merged

seoseo-ai merged 1 commit into
mainfrom
agent/seoseo/2331-p3-2-gotgan-lane

Conversation

@jinon86

@jinon86 jinon86 commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

요약

#2331 P3-2 — 서서 shadow에서 손설치로 돌던 gotgan 레인을 설치기 관리 레인으로 편입하고, 색인 품질(Codex 자기프롬프트 제외)과 메모리 상한(Termux RSS 2.0GB)을 함께 처리.

변경

  • install-nunchi.sh --verbatim-backend mempalace|gotgan|both (CCC_NUNCHI_VERBATIM_BACKEND도 동일): gotgan|both면 :27 관리 크론(# nunchi:#816 gen=…)으로 새 hooks/nunchi/gotgan-refresh.sh <provider> <dir> 실행. MemPalace :17과 어긋나게 배치. 손설치 # nunchi:gotgan-shadow 라인은 관리 라인 설치 시 제거(--remove·플래그 없는 재적용은 손라인 불간섭). 설치 기록 argv에 플래그 materialize(self-update 재생 시 레인 유지), $NUNCHI_HOME/verbatim-backend 파일 기록, bench 라인에 CCC_NUNCHI_VERBATIM_BACKEND 스탬프, status에 verbatim_backend: 줄. gotgan은 MemPalace sweep 미설치. 기본 mempalace는 동작 불변. gotgan 훅/디렉터리 없으면 exit 2(조용한 mempalace-only 전락 방지). danso는 gotgan 파서가 없어 거부.
  • gotgan-refresh.sh(신규): mempalace-refresh.sh와 같은 규율 — nunchi.mode 게이트, flock 단일 실행, timeout(기본 1500s), 0600 body-free 상태 gotgan-refresh.status.json(chunks_added/bytes_read/files_pending 포함). CCC_NUNCHI_GOTGAN_PYTHON으로 venv 인터프리터 핀 가능.
  • nunchi.py verbatim_backend(): env → $NUNCHI_HOME/verbatim-backend → mempalace. SessionStart 훅 경로가 노드 선택을 따름.
  • gotgan.py
    • Codex 하네스 주입문 제외: 라이브 실측(shadow 노드 2026-10-18) codex USER 청크 상위 4종이 전부 하네스 주입 — # AGENTS.md instructions 419 · <codex_internal_context> 324 · <recommended_plugins> 170 · <environment_context> 55 (codex 17,487 청크 중). USER 턴이 해당 접두로 시작하면 통째로 드롭(세션은 유지).
    • gotgan.py prune: 구 인덱서가 넣은 하네스/자기프롬프트 행 제거(멱등).
    • GOTGAN_RUN_BYTES 1회 실행 읽기 예산(기본 64MiB, 하한 1MiB) — 파일 오프셋으로 다음 실행에 이어서 처리, bytes_read/run_bytes/files_pending 보고. 예산보다 큰 단일 줄도 진행 보장.
  • docs/memory.md "Managed gotgan refresh" 절, changelog.d 조각.

검증

  • gotgan.test.sh 61/61 (+18) · install-nunchi.test.sh 155 pass / 1 fail — 실패 1건("auto provider fallback recognizes a Codex-only transcript tree")은 main에서도 동일 실패(이 노드 환경 의존, 본 PR 무관; CI 결과로 확인)
  • nunchi.test.sh 194/194 · ruff check . clean · shellcheck warning-level clean · validate-harness.sh static PASS · changelog fragments ok · canon-node-name-scan ok

배포(별도)

머지 후 shadow 노드에서 install-nunchi.sh --apply --verbatim-backend both 재적용(손설치 라인 교체) + gotgan.py prune 1회 — 노드 변경이라 별도 승인.

남김

Refs #2331

🤖 Generated with Claude Code

…sion, per-run index budget (#2331 P3-2)

- install-nunchi.sh --verbatim-backend mempalace|gotgan|both (or
  CCC_NUNCHI_VERBATIM_BACKEND): managed :27 cron for the new
  hooks/nunchi/gotgan-refresh.sh (mode gate, flock, timeout, owner-only
  body-free status), retires the hand-installed `# nunchi:gotgan-shadow`
  line, materializes the flag in the install record, writes
  $NUNCHI_HOME/verbatim-backend for the SessionStart path, stamps the bench
  line. `gotgan` skips the MemPalace sweep; default unchanged.
- nunchi.py verbatim_backend(): env -> file -> mempalace.
- gotgan.py: drop Codex harness preambles written as user turns
  (# AGENTS.md instructions, <codex_internal_context>, <recommended_plugins>,
  <environment_context>, ...), `prune` for rows an older indexer admitted,
  GOTGAN_RUN_BYTES per-run read budget (default 64 MiB, floor 1 MiB) with
  bytes_read/files_pending reporting; single oversize line still progresses.
- tests: gotgan.test.sh +18, install-nunchi.test.sh +22; docs/memory.md
  section; changelog fragment.

Refs #2331

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jinon86
jinon86 requested a review from seoseo-ai as a code owner October 18, 2026 12:33

@seoseo-ai seoseo-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after exact-head validation and fresh operator authorization using the relay-held seoseo-ai credential.

@seoseo-ai
seoseo-ai added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit a163e17 Oct 22, 2026
14 checks passed
@seoseo-ai
seoseo-ai deleted the agent/seoseo/2331-p3-2-gotgan-lane branch October 22, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants