Repository navigation
fix(nunchi): stop charging the constraint block against the assemble fact budget (#2500) - #2501
Merged
Merged
Conversation
…fact budget (#2500) Since #2216 the constraint block has its own byte budget (12000 by default), but assemble() still subtracted those bytes from --budget (3000) before filling facts. On every live node budget - used went negative: the fact block collapsed to the one guaranteed line and the auto-distill share was 0 bytes (#2186 stage-4 measurement: 0 of 1,531 sessions carried a ·auto line). - assemble: charge the fact budget for the header only - doctor: nunchi always-on ceiling is assemble + constraint, not max() - tests: live-regime regression (constraint block > fact budget) — fails on main, passes here; doctor expectations updated for the new ceiling Closes #2500 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seoseo-ai
approved these changes
Oct 23, 2026
seoseo-ai
left a comment
Collaborator
There was a problem hiding this comment.
Approved after exact-head validation and fresh operator authorization using the relay-held seoseo-ai credential.
This was referenced Oct 24, 2026
Open
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.
Closes #2500
문제
nunchi.py assemble이 제약 블록 바이트(#2216 이후 자체 예산 12000B)를 사실 예산(CCC_NUNCHI_ASSEMBLE_BUDGET=3000)에서도 차감하고 있었습니다. 실측한 모든 노드에서budget - used < 0이었습니다. 그 결과 SessionStart 사실 블록이 1줄로 줄었고, auto-distill 몫은 0B였습니다. 공급을 켠 7개 노드에서 2026-10-09부터 10-24까지 주입된 세션 1,531개 중·auto줄이 실린 세션은 0개였습니다(#2186 판정).변경
claude/hooks/nunchi/nunchi.pyassemble(): 사실 예산에서는 헤더 바이트만 차감합니다. 제약 블록은 지금처럼 자체 예산으로 묶입니다. auto-distill 33% 몫은 사실 블록 안에서 계산합니다.scripts/ccc_doctor.py+docs/doctor.md: nunchi 항상-켜짐 상한 추정을max(assemble, constraint)에서assemble + constraint(기본 15000B)로 바꿨습니다.auto-distill-feed.test.sh에 운영 영역 회귀 3건을 추가했습니다(제약 블록 > 3000B일 때 사실 > 5줄, CONV 유지,·auto0 < x ≤ 990B). main 코드에서 2건 FAIL, 이 브랜치에서 42/42 PASS를 확인했습니다.ccc_doctor_always_on_test.py는 새 상한에 맞춰 기대값만 고쳤습니다(12,000→15,000 / 2,500→3,500 / cut 3,000→6,000).리스크: 항상-켜짐 상한 초과 (오너 판단 필요)
2026-10-24 06:12 KST 기준(현 main doctor, 읽기 전용 스윕), 11개 노드 중 8개가 이미 상한 24,000자를 넘고 있습니다. 육손 123%, 공융 113%, 진군 110%, 대교·방통 107%, 서서 104%, 소교 103%, 노숙 101%입니다. 상한에 못 미치는 노드는 순욱 99%, 등애 95%, 공명 50%, 곽가 85%입니다.
CCC_NUNCHI_CONSTRAINT_BUDGET기본값을 9000으로 내리면 됩니다(nunchi assemble: 제약 블록 바이트가 사실 예산을 다 써서 SessionStart 사실 1줄·auto-distill 0줄 (#2186 4단계 측정 무효) #2500 선택지 2). 대신 생략되는 제약이 늘어납니다.롤백
이 커밋을 revert합니다. 노드 반영은 self-update로 됩니다.
🤖 Generated with Claude Code