Skip to content

fix(nunchi): per-scope collection status in audience-scoped mode (#985) - #986

Merged
seoseo-ai merged 1 commit into
mainfrom
fix/985-nunchi-status-per-scope
Aug 6, 2026
Merged

fix(nunchi): per-scope collection status in audience-scoped mode (#985)#986
seoseo-ai merged 1 commit into
mainfrom
fix/985-nunchi-status-per-scope

Conversation

@seoseo-ai

Copy link
Copy Markdown
Collaborator

What

install-nunchi.sh status의 collection: 행이 audience-scoped 모드에서 node-global mempalace-refresh.status.json만 읽어 전환 이후 stale해지는 결함 수정 (#985).

  • scoped 모드(env 명시 또는 managed cron에서 감지 — 기존 audience_scoped: 행과 동일 precedence)이면 audience root의 canonical child들을 순회해 스코프별 status를 집계
  • 스코프 경계 규칙은 mempalace-refresh.sh dispatcher walk와 동일: shared/private-[0-9a-f]{32} 이름, owner-only dir, symlink 배제, 64 scope cap (CCC_NUNCHI_MAX_SCOPES_PER_RUN)
  • 출력은 worst-state 우선 정렬 + per-scope finished_at, body-free (private 스코프는 private-a9d7… 형태로 절단, 최대 8개 표기 + (+N more))
  • 비활성 시 기존 global 경로 불변

Evidence

  • scripts/install-nunchi.test.sh: PASS=52 (main 대비 신규 4건 — scoped 집계/비정규 이름 배제/worst-first/global 불변), FAIL=2는 main에서도 동일한 환경성 기존 실패(codex materializer 계열, 본 변경과 무관)
  • bash -n + shellcheck: 신규 경고 0 (info 2건은 기존 라인)
  • 수동 스팟체크: error 상태 스코프가 ok보다 먼저 정렬됨 확인

Closes #985

install-nunchi.sh status read only the node-global
mempalace-refresh.status.json for its collection row, which goes stale
as soon as the audience dispatcher owns collection: scoped refresh
writes one status file per scope under
<audience-root>/<scope>/nunchi/ and never touches the global file.

When scoped mode is active (explicit env or detected from the managed
cron, same precedence as the existing audience_scoped row) the
collection row now walks the canonical opaque children with the same
boundary rules as the dispatcher (owner-only dirs, symlink rejection,
private-[0-9a-f]{32}/shared names, 64 scope cap) and prints a
worst-state-first per-scope aggregate. Scope labels stay body-free:
"shared" in full, private scopes truncated to private-a9d7… shape.
Non-scoped installs keep reading the global file unchanged.

Co-Authored-By: Kimi K3 <noreply@moonshot.cn>
@seoseo-ai
seoseo-ai requested a review from jinon86 as a code owner August 6, 2026 09:21

@jinon86 jinon86 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved after explicit operator authorization using the Seoseo-held jinon86 credential.

@seoseo-ai
seoseo-ai merged commit 49851d6 into main Aug 6, 2026
8 checks passed
@seoseo-ai
seoseo-ai deleted the fix/985-nunchi-status-per-scope branch August 6, 2026 09:32
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.

fix(nunchi): audience-scoped 모드에서 install-nunchi.sh status의 collection 행이 stale (per-scope status 집계 필요)

2 participants