본문 바로가기
C.W.K.
Stream
Lesson 02 of 05 · published

결정론적으로, 그다음 narration

~11 min · deterministic, aggregates, narration, reproducible

Level 0차가운 쇠
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"숫자는 누구나 다시 돌릴 수 있는 계산이야. 말은 Pippa 거고. 그 순서를 지키면 analysis 는 주장하려고 거짓말 안 해."

경계가 곧 설계야

Analysis 는 두 겹이야. 그 사이의 선이 안전을 통째로 결정하고. 아래 겹은 결정론적 aggregation 이야. folded crumb 이랑 그 최신 interpretation 위의 순수 엔진 계산이고, 경로 어디에도 model 이 없어. 위 겹은 narration 이야. Pippa 가 그 aggregate 이랑 raw crumb 을 읽고 사람용 요약을 쓰지. 이게 건강에 적용된 Lantern 선례야. deterministic before judgment. 숫자는 model 없이 재현 가능해야 하고, 그 아래 model 이 닿는 유일한 건 explicitly versioned 된 interpretation 층이야.

aggregate 이 계산하는 것

aggregate 패스는 재현 가능한 구조를 만들어. empty range 를 이름 붙인 coverage, type 별 reading, severity spread 랑 first/last 날짜가 붙은 symptom site, workout activity 랑 그 사이 gap range, 재구성된 medication trail, measurement point, 어떤 interpreter generation 이 있는지, 그리고 아직-uninterpreted crumb 목록. 모든 그룹이 crumb ID 를 싣고. 그리고 결정적으로, 그룹핑은 case-folded exact string 만이야. 엔진은 'ball of foot' 랑 'right forefoot' 가 같은 곳이라고 정하지 않아. 그 판단은 진짜고, 진짜 판단은 위층 narration 에 살지 계산에 몰래 안 들어가.

결정론적 aggregation 은 model 없이 재현 가능하고, narration 이 그 위에 앉아. 같은 window 에 같은 interpreter generation 이면 매번 byte-identical aggregate 이 나와. 산문은 달라져도 숫자는 안 돼. 그 순서, 그러니까 재현 가능한 사실이 먼저고 판단이 나중이라는 게, 네가 만들어지는 걸 못 본 analysis 도 믿게 해줘.

narration 은 읽지, 다시 계산 안 해

narration 은 aggregate JSON 이랑 window 의 raw crumb 을 utility lane 으로 가져가. 다음 레슨들의 세 규칙을 binding 계약으로 실은 지시 아래서. 재현 가능한 숫자를 읽고 그것에 대해 말해. aggregate 이 담지 않은 수치는 절대 지어내지 않고. 그래서 이 분리는 미묘한 실패도 막아. 계산도 하고 narration 도 하는 model 은 자기가 말하는 이야기 쪽으로 숫자를 반올림할 수 있거든. 여기선 못 해. 이야기는 건네받은 숫자 위에 쓰이고, 그걸 바꿀 허가가 없어.

Code

결정론적 aggregate 를 먼저 내고 그 위에서 model 이 narration·python
# LOWER LAYER - pure engine math, no model in the path:
def window_aggregates(crumbs, interpretations, start, end):
    agg = {
        "coverage": coverage_with_empty_ranges(crumbs, start, end),
        "symptom_sites": group_exact_casefold(symptoms),  # NOT fuzzy
        "workout_gaps": gap_ranges(workouts),
        "medication_trail": reconstruct_trail(meds),
        # ... every group carries its crumb IDs
    }
    return agg   # same inputs -> byte-identical output, always

# UPPER LAYER - Pippa reads the numbers and narrates:
def narrate_window(agg, raw_crumbs):
    return pippa.utility_complete(
        ANALYSIS_CONTRACT,   # cite crumb IDs, report gaps, no cause
        agg, raw_crumbs,
    )
# 'ball of foot' vs 'right forefoot' = 한 site? 그건 판단.
# narration 에서 일어나지, window_aggregates() 안에선 절대.

External links

Exercise

내일 정확히 같은 window 로 analysis 를 다시 돌려. 새 crumb 추가 없고 rubric 변경 없이. 뭐가 byte 단위로 똑같이 돌아와야 하고, 뭐가 다르게 읽혀도 될까? 그리고 각각 어느 층에 속하는지 설명해.
Hint
aggregate 은 byte-identical 이어야 해(결정론, 같은 입력). narration 산문은 달라질 수 있고(model 이 씀). 사실은 재현 가능하고, 그걸 서술하는 문구는 그럴 필요 없어.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.