Skip to content

ADR-009 Week 1 Convergence Pack ​

Status: Working guidance (non-normative)
Window: 2026-03-02 ~ 2026-03-06 (KST)
Normative source: ADR-009, Core/Host/World/Compiler/Runtime/SDK latest SPEC
Scope: Gap freeze + ticket freeze only (no code mutation in Week 1)

This pack locks the Week 1 deliverables required to start Week 2 implementation immediately.

Historical Note: Dynamic target evaluator items in this Week 1 pack are non-current planning history. ADR-028 supersedes the Compiler/runtime evaluateConditionalPatchOps() path and the invalid dynamic target skip-warning policy; current v5 behavior resolves dynamic Flow patch targets in Core.

1. Baseline Freeze ​

1.1 Governance Baseline ​

  • Docs hard-cut baseline commit: 00fa09b
  • ADR-009 status: Accepted
  • Normative doc line: implementation convergence remains pending by design

1.2 Runtime Baseline (Planning-time observation) ​

CheckResultNote
pnpm --filter @manifesto-ai/core testPassCore tests currently green on planning baseline
pnpm --filter @manifesto-ai/host testFail@manifesto-ai/core entry resolve failure
pnpm --filter @manifesto-ai/compiler testFail@manifesto-ai/core entry resolve failure
Node engineWarningRequired >=22.12.0, observed 22.11.0

2. ADR-009 항목(1~7) 패키지 영향 관계표 ​

Legend: C = Critical, H = High, M = Medium, - = N/A

ADR-009 ContractCoreHostCompilerRuntimeWorldSDK
1. Patch.path -> PatchPathCCCCMC
2. PatchSegment kind 제한CHCHMH
3. Patch root = snapshot.data onlyCCHCMC
4. SystemDelta + applySystemDelta() onlyCC-HMH
5. ComputeResult = patches + systemDelta + trace + statusCC-H-M
6. Compiler IRPatchPath -> PatchPath resolutionMHCH-M
7. Persistence _patchFormat:2 + legacy hard reject + genesis reset-M-CCH

3. 패키지별 갭-ID 목록 (Frozen) ​

Gap IDRequirementEvidenceSeverityTarget Ticket
C-G01Core Patch 타입이 string path 사용 중packages/core/src/schema/patch.ts:11CriticalADR009-C-01
C-G02core.apply()가 system/input/computed/meta patch 경로를 분기 처리packages/core/src/core/apply.ts:134, :196CriticalADR009-C-02
C-G03SystemDelta/applySystemDelta API 부재packages/core/src/index.ts:54CriticalADR009-C-03
C-G04ComputeResult가 snapshot/requirements 중심 계약packages/core/src/schema/result.ts:24, packages/core/src/core/compute.ts:198CriticalADR009-C-04
H-G01Start/Continue interlock가 문서상 2단계 apply를 구조적으로 보장하지 않음packages/host/src/job-handlers/start-intent.ts:88, continue-compute.ts:71HighADR009-H-01
H-G02requirement clear가 system.pendingRequirements 직접 patchpackages/host/src/execution-context.ts:231CriticalADR009-H-02
H-G03Host trace/HCTS에 core:applySystemDelta 타입 이벤트 부재packages/host/src/types/trace.ts:39, packages/host/src/__tests__/compliance/hcts-types.ts:38HighADR009-H-03
M-G01Runtime conditional patch path가 stringpackages/compiler/src/lowering/lower-runtime-patch.ts:83CriticalADR009-M-01
M-G02lowering에서 path flatten(string) 의존packages/compiler/src/api/compile-mel-patch-collector.ts:495CriticalADR009-M-02
M-G03evaluate가 string path 기반, TOTAL resolveIRPath 규칙 부재packages/compiler/src/evaluation/evaluate-runtime-patch.ts:225HighADR009-M-03
RW-G01Runtime/World persistence에 _patchFormat:2 envelope 미강제packages/runtime/src/storage/world-store/in-memory.ts:342, packages/world/src/persistence/memory.ts:548CriticalADR009-RW-01
RW-G02restore ingress에서 legacy/missing format hard reject 부재packages/runtime/src/storage/world-store/in-memory.ts:152, packages/world/src/persistence/memory.ts:574CriticalADR009-RW-02
RW-G03reject 시 genesis reset 정책 미구현packages/runtime/src/execution/pipeline/execute.ts:43CriticalADR009-RW-03
RW-G04delta generator가 string path + system.* patch 생성packages/runtime/src/storage/world-store/delta-generator.ts:74, :341CriticalADR009-RW-04
S-G01SDK typed ops가 string path API 중심packages/sdk/src/typed-ops.ts:221HighADR009-S-01
S-G02SDK system.lastError convenience 제공packages/sdk/src/typed-ops.ts:241HighADR009-S-02

4. Week 1 일정 잠금 (Decision Complete) ​

Date (KST)GoalOutput
2026-03-02Gap 동결본 문서 §2~§3 기준선 잠금
2026-03-03Core 선행 티켓 세분화ADR009-C-01..06 상세 DoD/의존성 잠금
2026-03-04Host/Compiler 병렬 설계ADR009-H-01..03, ADR009-M-01..03 잠금
2026-03-05Runtime/World + SDK 설계ADR009-RW-01..04, ADR009-S-01..02 잠금
2026-03-06Week2 착수 패키지 조합PR Wave 계획(Wave-1/2/3) 잠금

5. Ticket Set (Implementation Ready) ​

5.1 Core (Critical Path) ​

TicketScope (대표 파일)Depends OnDone Criteria
ADR009-C-01packages/core/src/schema/patch.ts, schema/flow.ts, schema/index.ts-PatchSegment/PatchPath 도입, public export 정렬, public API에서 string patch path 제거
ADR009-C-02packages/core/src/core/apply.ts, utils/path.tsC-01core.apply()가 snapshot.data 루트만 patch 적용, system/input/computed/meta 구조적 거부
ADR009-C-03packages/core/src/schema/result.ts, core/system-delta.ts(신규), index.tsC-01SystemDelta 타입 + applySystemDelta() 순수함수/total/deterministic 구현
ADR009-C-04packages/core/src/core/compute.ts, schema/result.ts, index.tsC-01,C-03ComputeResult를 patches + systemDelta + trace + status로 변경, snapshot 직접 반환 제거
ADR009-C-05packages/core/src/utils/patch-path.ts(신규), index.tsC-01patchPathToDisplayString() 추가, parse 역변환 금지 규약 테스트 포함
ADR009-C-06packages/core/src/__tests__/*C-01..05ADR §9.1, §9.5, §9.6, §9.7 시나리오 테스트 통과

5.2 Host ​

TicketScope (대표 파일)Depends OnDone Criteria
ADR009-H-01job-handlers/start-intent.ts, continue-compute.ts, execution-context.tsC-03,C-04interlock를 apply(patches) -> applySystemDelta -> dispatch로 고정
ADR009-H-02execution-context.ts, job-handlers/fulfill-effect.tsC-03requirement clear를 removeRequirementIds 기반으로 전환, system.* patch 제거
ADR009-H-03types/trace.ts, __tests__/compliance/hcts-types.ts, suite/interlock.spec.tsH-01,H-02core:applySystemDelta 이벤트 추가, 순서 검증 테스트 강화

5.3 Compiler ​

TicketScope (대표 파일)Depends OnDone Criteria
ADR009-M-01lowering/lower-runtime-patch.ts, api/compile-mel.tsC-01RuntimeConditionalPatchOp.path를 IRPatchPath로 변경
ADR009-M-02api/compile-mel-patch-collector.ts, lowering/*M-01lowering에서 string flatten 제거 (PathNode -> IRPathSegment[])
ADR009-M-03evaluation/evaluate-runtime-patch.ts, evaluation/context.tsM-01,M-02,C-01resolveIRPath() TOTAL 구현, invalid expr segment는 op skip + warning

5.4 Runtime / World ​

TicketScope (대표 파일)Depends OnDone Criteria
ADR009-RW-01runtime/src/types/world-store.ts, runtime/src/storage/world-store/*, world/src/persistence/memory.tsC-01persisted delta envelope에 _patchFormat:2 반영
ADR009-RW-02runtime/src/storage/world-store/in-memory.ts, world/src/persistence/memory.tsRW-01restore ingress에서 _patchFormat:1/missing hard reject
ADR009-RW-03runtime/src/bootstrap/*, runtime/src/execution/*RW-02reject 시 genesis re-init(epoch reset) 정책 적용
ADR009-RW-04runtime/src/storage/world-store/delta-generator.ts, execution/state-converter.tsC-01,C-03delta generator segment path 전환, system.* patch 생성 제거

5.5 SDK ​

TicketScope (대표 파일)Depends OnDone Criteria
ADR009-S-01packages/sdk/src/typed-ops.ts, src/index.tsC-01typed ops를 segment path 기준으로 재설계
ADR009-S-02packages/sdk/src/typed-ops.ts, src/__tests__/typed-ops*.test.tsS-01,C-03system.lastError convenience 제거, 대체 가이드/API 반영

6. Week 2 PR Wave Plan (2026-03-09 start) ​

6.1 Dependency DAG ​

6.2 PR Waves ​

WaveBranch (prefix codex/)TicketsMerge Gate
Wave-1codex/adr009-wave1-core-contractC-01..C-05Core build/test green, public type export review 완료
Wave-2Acodex/adr009-wave2-host-interlockH-01..H-03Host compliance(interlock/fulfill) 통과
Wave-2Bcodex/adr009-wave2-compiler-irpathM-01..M-03Compiler eval/IR path tests 통과
Wave-3Acodex/adr009-wave3-runtime-world-persistenceRW-01..RW-04restore reject/genesis reset tests 통과
Wave-3Bcodex/adr009-wave3-sdk-typed-opsS-01..S-02SDK typed ops tests 및 API review 통과

7. Week 2 Entry Gates (Locked) ​

  1. Core unit: ADR §9.1, §9.5, §9.6, §9.7 시나리오 통과
  2. Compiler eval: ADR §9.8 (invalid expr segment skip+warning) 통과
  3. Host compliance: core:apply + core:applySystemDelta 순서 검증 통과
  4. Runtime/World restore: _patchFormat:1/missing hard reject 테스트 통과
  5. SDK typed ops: string-path API 제거 후 타입 테스트 통과
  6. Docs re-check: pnpm docs:governance-check and pnpm docs:build 통과

8. 운영 리스크와 기본 대응 ​

RiskImpactDefault Mitigation
Host/Compiler test가 core entry resolve 실패Week2 PR 검증 지연pnpm --filter @manifesto-ai/core build를 선행 공통 게이트로 고정
Node 엔진 버전 불일치 (>=22.12.0)로컬/CI 결과 불일치CI 기준 Node 고정 또는 로컬 Node 업그레이드
Cross-package breaking 변경 동시 발생병렬 작업 충돌Wave 단위 branch 격리 + Wave gate 엄수

9. Assumptions and Defaults ​

  1. 기준 규범은 Accepted ADR-009이며 현행 src는 수렴 대상이다.
  2. archive/ 문서는 수정 범위에서 제외한다.
  3. Week 1은 문서화/분해/우선순위 확정만 수행하며 코드 변경은 수행하지 않는다.
  4. 우선순위는 Core > Host/Compiler > Runtime/World > SDK로 고정한다.
  5. Week 2 기본 시작일은 2026-03-09 (KST)로 둔다.