Skip to content

feat(service): add durable autonomous conversation participation V2 - #129

Open
changeroa wants to merge 18 commits into
codex/hent-ai-service-hardeningfrom
fix/ambient-batch-high-watermark
Open

feat(service): add durable autonomous conversation participation V2#129
changeroa wants to merge 18 commits into
codex/hent-ai-service-hardeningfrom
fix/ambient-batch-high-watermark

Conversation

@changeroa

@changeroa changeroa commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements the owner-approved autonomous conversation-participant V2 for playground-ko while preserving the service-owned runtime boundary.

  • evaluates the whole queued canonical conversation batch at a fixed tick boundary
  • defers messages arriving after the decision boundary to the next tick
  • removes active-user count from participation judgment
  • uses the canonical Iyen persona with deterministic persisted snapshots
  • adds fenced tick/claim/recovery, validator/prior, atomic budget and delivery-plan lifecycle
  • adds source-qualified newest-97 selection with bounded anchor-first reply ancestry
  • adds safe V6→V7 status migration and FK-safe cleanup
  • keeps OpenClaw thin and keeps rollout in shadow until the canary gate passes

Approved-plan provenance:

  • Deep Interview spec: deep-interview-hent-conversation-participant-design.md
  • Ralplan consensus: session 019fa6f1-1db2-7000-97ba-4ebea71e8742
  • Current head: 47008cf

Closes #128.

Verification

  • node scripts/release-gate.mjs
  • service focused: 49 passed
  • adaptive ambient participant: 135 passed
  • shared: 49 passed
  • generate: 5 passed
  • Hermes: 357 passed
  • OpenClaw: 458 passed
  • OpenClaw/service/generate typechecks passed
  • final bounded architecture review: CLEAR / APPROVE

Deployment and rollout gate

Deployed to the macmini worker with:

  • poll interval: 300000 ms
  • profile: gothic-v1 (Iyen)
  • primary: gpt-5.3-codex-spark
  • validator: gpt-4.1-mini
  • mode: shadow

Current canary: 0/30 terminal shadow validations because no eligible human message has arrived since deployment. Do not promote to apply until at least 30 terminal shadow validations span 24 hours and the required recovery/redaction/counter readbacks are clean.

Historical review reconciliation

The earlier CHANGES_REQUESTED reviews correctly rejected unplanned speech-first changes mixed into the original #128 patch. Those reviews targeted pre-V2 commits (b8f80e1 through b1c5b00). The current branch was subsequently governed by the explicit owner-approved Deep Interview + Ralplan design, rebuilt around the durable service-owned V2 state machine, and verified at head 47008cf. The rollout remains shadow-only pending the canary gate.

@github-actions github-actions Bot added the docs label Jul 28, 2026

@IYENTeam IYENTeam left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

병합 보류합니다. #128의 starvation 수정 자체와 관련 회귀 테스트는 방향이 맞고 로컬 검증도 통과했지만, 이 PR에는 owner-gated 계약 변경이 함께 섞여 있습니다.

Blocking:

  • service/src/adaptive-ambient-provider.ts, conversation-ambient.ts, adaptive-ambient-runtime.ts: 기본 참여 정책을 speech-first로 바꾸고(1명부터 speak 기본), participation prior를 추가하며 initial drive 0.5→0.7, confidence floor 0.7→0.6, evidence weight를 상향했습니다. 이는 #128의 stale-backfill/batch-boundary 수정 범위를 넘어서는 사용자 체감 runtime/identity 정책 변경입니다.
  • service/src/discord-ambient-worker.ts: provider endpoint 계약을 HTTPS-only에서 loopback HTTP 허용으로 변경했습니다. 별도 보안/운영 계약 변경입니다.
  • adaptive-ambient-runtime.ts: Discord nonce 길이 32→24 변경도 별도 외부 통합 수정입니다.

요청:

  1. #128 PR에는 fixed high-watermark, 최신 actionable 우선 claim, older work batch-close, post-boundary delivery 보존, bot context-only ingestion과 해당 회귀 테스트만 남겨 주세요.
  2. speech defaults/participation prior, loopback HTTP, nonce 수정은 각각 근거 이슈와 별도 PR로 분리해 주세요. 특히 speech 정책은 owner 승인 후 진행해야 합니다.
  3. #128의 원래 acceptance에 있던 “large stale backlog + one fresh message + long poll interval에서 다음 cycle에 fresh가 평가됨”을 직접 재현하는 테스트를 추가해 주세요. 현재 store 단위 테스트는 old/latest/next 3건이라 대량 backlog/long-poll 회귀를 직접 증명하지 않습니다.

직접 검증:

  • diff: 17 files, +122/-62
  • git diff --check: pass
  • service TypeScript tsc --noEmit: pass
  • 관련 Vitest: 63 tests 중 wire evidence 디렉터리 부재로 1건 환경 실패; 디렉터리 생성 후 해당 wire 2/2 pass, 나머지 61/61 pass
  • GitHub checks: 3/3 pass (Auto-label, Changeset Validation, PR Size Check)
  • PR 본문 production Discord delivery 기록은 확인했지만, nonce/API 변경의 재현 가능한 integration evidence는 PR에 기록되어 있지 않습니다.

@IYENTeam IYENTeam left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

최신 SHA 865efaac 재확인했습니다. 이전 blocking review는 해소되지 않았습니다.

이번 커밋은 activeHumanCount를 appraisal/evidence에서 제거하고, fresh complete roster만 있으면 실제 활성 사용자가 0명이어도 evidence weight 0.8participationPrior.speak=0.9를 적용합니다. 즉 #128의 batch starvation 수정과 무관한 speech-first 계약 변경을 제거한 것이 아니라 더 광범위하게 만들었습니다.

따라서 CHANGES_REQUESTED 유지합니다. 앞선 요청대로 #128의 batch-boundary/starvation 수정만 남기고 speech 정책, loopback HTTP, nonce 변경을 별도 이슈/PR로 분리해 주세요. 대량 stale backlog + fresh event + long-poll 회귀 테스트도 아직 필요합니다.

@IYENTeam IYENTeam left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

최신 SHA 32d5d894 재확인했습니다. CI 3/3 통과와 무관하게 blocking review는 더 강해졌습니다.

이번 커밋은 provider가 speak를 반환하면 확률/drive/pressure/pity/draw를 모두 무시하고 probability=1, shouldSpeak=true로 강제합니다 (conversation-ambient.ts). 이는 #128의 starvation/batch-boundary 수정이 아니라 핵심 runtime 발화 계약을 확률형에서 결정형으로 바꾸는 owner-gated 변경입니다. 기존 ADR의 “continuous and probabilistic” 계약과도 충돌합니다.

따라서 CHANGES_REQUESTED 유지합니다. #128 PR에는 batch high-watermark와 starvation 회귀 수정만 남겨 주세요. speech 결정권/확률 제거는 별도 설계 이슈와 owner 승인 없이는 병합할 수 없습니다. 이전에 요청한 loopback HTTP, nonce 변경 분리와 대량 backlog long-poll 회귀 테스트도 여전히 미해결입니다.

@IYENTeam IYENTeam left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

최신 SHA b1c5b00c 확인했습니다. 이 커밋은 speech prior를 0.90→0.98로 더 올렸으며 #128의 starvation/batch-boundary 수정과 무관합니다. 기존 owner-gated 발화 정책 변경 범위를 더 확대했으므로 CHANGES_REQUESTED를 유지합니다.

CI 3/3은 형식 체크 통과일 뿐 이 계약 변경을 승인하지 않습니다. 앞선 리뷰대로 #128 수정만 남기고 speech 정책 변경은 별도 설계 이슈/PR로 분리해 주세요.

@changeroa changeroa changed the title fix(service): appraise ambient messages by tick batch feat(service): add durable autonomous conversation participation V2 Jul 29, 2026
@changeroa

Copy link
Copy Markdown
Collaborator Author

Current-head review requested for 47008cf. The four historical CHANGES_REQUESTED reviews applied to pre-plan commits and are reconciled in the updated PR description against the later owner-approved Deep Interview/Ralplan contract. Please review the current V2 implementation and shadow-only rollout state; no apply promotion is requested.

@changeroa
changeroa requested a review from IYENTeam July 29, 2026 05:13
@changeroa

Copy link
Copy Markdown
Collaborator Author

Added realistic Korean multi-person participation mocks at head 3ae487e: open-ended dinner/travel discussions produce grounded short interjections, while an already-settled meetup remains observe-only. Focused scenario suite: 3/3 passed; full service suite: 279 passed, 2 skipped; service typecheck passed. Current-head review request remains required.

@changeroa

Copy link
Copy Markdown
Collaborator Author

Head b5ba92a source-controls the deployed Hent-ai-only Iyen group-chat Soul plus a transactional profile deployment CLI. OpenClaw SOUL.md is untouched. Release gate passed (service 282/2 skipped; focused 49; adaptive 135; shared 49; generate 5; Hermes 357; OpenClaw 458; all typechecks). macmini readback: worker running, profile gothic-v1, soul 5173 bytes, mode shadow. Current-head review requested; apply promotion remains gated on 30 terminal shadow validations over 24h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants