hikoutei 0.4.2 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +20 -0
  2. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.d.ts +2 -2
  3. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmMappedObservation.js +2 -2
  4. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.js +1 -0
  5. package/dist/adapter/persistence/providers/mikro-orm/observation/MikroOrmUserInputPolling.js.map +1 -1
  6. package/dist/api/Hikoutei.d.ts +56 -10
  7. package/dist/api/Hikoutei.d.ts.map +1 -1
  8. package/dist/api/Hikoutei.js +84 -13
  9. package/dist/api/Hikoutei.js.map +1 -1
  10. package/dist/api/entity.d.ts +17 -1
  11. package/dist/api/entity.d.ts.map +1 -1
  12. package/dist/api/entity.js +34 -2
  13. package/dist/api/entity.js.map +1 -1
  14. package/dist/api/errors.d.ts +24 -0
  15. package/dist/api/errors.d.ts.map +1 -1
  16. package/dist/api/errors.js +24 -0
  17. package/dist/api/errors.js.map +1 -1
  18. package/dist/application/orm/api/contracts.d.ts +1 -1
  19. package/dist/application/orm/api/contracts.d.ts.map +1 -1
  20. package/dist/application/orm/persistence/flush/flushCoordinator.d.ts.map +1 -1
  21. package/dist/application/orm/persistence/flush/flushCoordinator.js +2 -0
  22. package/dist/application/orm/persistence/flush/flushCoordinator.js.map +1 -1
  23. package/dist/application/sync/inbound/autoSystemConflictResolution.d.ts.map +1 -1
  24. package/dist/application/sync/inbound/autoSystemConflictResolution.js +3 -0
  25. package/dist/application/sync/inbound/autoSystemConflictResolution.js.map +1 -1
  26. package/dist/application/sync/outbound/SheetsEffectDispatcher.d.ts +64 -0
  27. package/dist/application/sync/outbound/SheetsEffectDispatcher.d.ts.map +1 -0
  28. package/dist/application/sync/outbound/SheetsEffectDispatcher.js +440 -0
  29. package/dist/application/sync/outbound/SheetsEffectDispatcher.js.map +1 -0
  30. package/dist/application/sync/service/SyncServiceBootstrap.d.ts +3 -4
  31. package/dist/application/sync/service/SyncServiceBootstrap.d.ts.map +1 -1
  32. package/dist/application/sync/service/SyncServiceBootstrap.js +91 -6
  33. package/dist/application/sync/service/SyncServiceBootstrap.js.map +1 -1
  34. package/dist/application/sync/service/syncAutoStart.d.ts +127 -0
  35. package/dist/application/sync/service/syncAutoStart.d.ts.map +1 -0
  36. package/dist/application/sync/service/syncAutoStart.js +280 -0
  37. package/dist/application/sync/service/syncAutoStart.js.map +1 -0
  38. package/dist/application/sync/sheets/conflictProjectionRegistration.d.ts.map +1 -1
  39. package/dist/application/sync/sheets/conflictProjectionRegistration.js +1 -0
  40. package/dist/application/sync/sheets/conflictProjectionRegistration.js.map +1 -1
  41. package/dist/application/sync/telemetry/syncTiming.d.ts +20 -33
  42. package/dist/application/sync/telemetry/syncTiming.d.ts.map +1 -1
  43. package/dist/application/sync/telemetry/syncTiming.js +14 -12
  44. package/dist/application/sync/telemetry/syncTiming.js.map +1 -1
  45. package/dist/infrastructure/storage/errors.d.ts +10 -5
  46. package/dist/infrastructure/storage/errors.d.ts.map +1 -1
  47. package/dist/infrastructure/storage/errors.js +10 -7
  48. package/dist/infrastructure/storage/errors.js.map +1 -1
  49. package/dist/infrastructure/storage/index.d.ts +6 -4
  50. package/dist/infrastructure/storage/index.d.ts.map +1 -1
  51. package/dist/infrastructure/storage/index.js +3 -2
  52. package/dist/infrastructure/storage/index.js.map +1 -1
  53. package/dist/infrastructure/storage/sqlite/schema.d.ts +12 -11
  54. package/dist/infrastructure/storage/sqlite/schema.d.ts.map +1 -1
  55. package/dist/infrastructure/storage/sqlite/schema.js +17 -109
  56. package/dist/infrastructure/storage/sqlite/schema.js.map +1 -1
  57. package/dist/infrastructure/storage/state/canonical/canonicalCommit.d.ts +2 -2
  58. package/dist/infrastructure/storage/state/canonical/canonicalCommit.d.ts.map +1 -1
  59. package/dist/infrastructure/storage/state/canonical/canonicalCommit.js +2 -2
  60. package/dist/infrastructure/storage/state/canonical/canonicalCommit.js.map +1 -1
  61. package/dist/infrastructure/storage/state/mapped/mappedPersistenceContext.d.ts +1 -2
  62. package/dist/infrastructure/storage/state/mapped/mappedPersistenceContext.d.ts.map +1 -1
  63. package/dist/infrastructure/storage/state/mapped/mappedPersistenceContext.js +2 -2
  64. package/dist/infrastructure/storage/state/mapped/mappedPersistenceContext.js.map +1 -1
  65. package/dist/infrastructure/storage/state/observation/observationCanonical.d.ts +1 -1
  66. package/dist/infrastructure/storage/state/observation/observationCanonical.d.ts.map +1 -1
  67. package/dist/infrastructure/storage/state/observation/observationQuarantine.d.ts +1 -1
  68. package/dist/infrastructure/storage/state/observation/observationQuarantine.d.ts.map +1 -1
  69. package/dist/infrastructure/storage/state/observation/observationQuarantine.js +1 -1
  70. package/dist/infrastructure/storage/state/observation/observationQuarantine.js.map +1 -1
  71. package/dist/infrastructure/storage/state/observation/observationTypes.d.ts +1 -1
  72. package/dist/infrastructure/storage/state/observation/observationTypes.d.ts.map +1 -1
  73. package/dist/infrastructure/storage/state/observation/observationValidation.d.ts +1 -1
  74. package/dist/infrastructure/storage/state/observation/observationValidation.d.ts.map +1 -1
  75. package/dist/infrastructure/storage/state/observation/observationWriter.d.ts +1 -1
  76. package/dist/infrastructure/storage/state/observation/observationWriter.d.ts.map +1 -1
  77. package/dist/infrastructure/storage/state/observation/observationWriter.js +1 -2
  78. package/dist/infrastructure/storage/state/observation/observationWriter.js.map +1 -1
  79. package/dist/infrastructure/storage/state/resolution/resolutionWriter.d.ts +1 -2
  80. package/dist/infrastructure/storage/state/resolution/resolutionWriter.d.ts.map +1 -1
  81. package/dist/infrastructure/storage/state/resolution/resolutionWriter.js +1 -2
  82. package/dist/infrastructure/storage/state/resolution/resolutionWriter.js.map +1 -1
  83. package/dist/infrastructure/storage/state/resolution/resolutionWriterContracts.d.ts +1 -1
  84. package/dist/infrastructure/storage/state/resolution/resolutionWriterContracts.d.ts.map +1 -1
  85. package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.d.ts +1 -1
  86. package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.d.ts.map +1 -1
  87. package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.js +1 -1
  88. package/dist/infrastructure/storage/state/resolution/resolutionWriterHelpers.js.map +1 -1
  89. package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.d.ts +1 -1
  90. package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.d.ts.map +1 -1
  91. package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.js +2 -2
  92. package/dist/infrastructure/storage/state/resolution/resolutionWriterSql.js.map +1 -1
  93. package/dist/infrastructure/storage/sync/shared/spreadsheetAuthority.d.ts +1 -1
  94. package/dist/infrastructure/storage/sync/shared/spreadsheetAuthority.d.ts.map +1 -1
  95. package/dist/infrastructure/storage/sync/shared/spreadsheetAuthority.js +1 -1
  96. package/dist/infrastructure/storage/sync/shared/spreadsheetAuthority.js.map +1 -1
  97. package/dist/infrastructure/storage/sync/shared/syncRegistry.d.ts +1 -1
  98. package/dist/infrastructure/storage/sync/shared/syncRegistry.js +1 -1
  99. package/package.json +13 -7
  100. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.d.ts +0 -66
  101. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.d.ts.map +0 -1
  102. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.js +0 -123
  103. package/dist/application/sync/outbound/effects/AdaptiveEffectBatchController.js.map +0 -1
  104. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts +0 -111
  105. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.d.ts.map +0 -1
  106. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js +0 -369
  107. package/dist/application/sync/outbound/effects/SyncEffectSupervisor.js.map +0 -1
  108. package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts +0 -127
  109. package/dist/application/sync/outbound/effects/SyncEffectWorker.d.ts.map +0 -1
  110. package/dist/application/sync/outbound/effects/SyncEffectWorker.js +0 -552
  111. package/dist/application/sync/outbound/effects/SyncEffectWorker.js.map +0 -1
  112. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts +0 -85
  113. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.d.ts.map +0 -1
  114. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js +0 -74
  115. package/dist/application/sync/outbound/effects/SyncEffectWorkerConstants.js.map +0 -1
  116. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts +0 -31
  117. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.d.ts.map +0 -1
  118. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js +0 -222
  119. package/dist/application/sync/outbound/effects/SyncEffectWorkerDispatch.js.map +0 -1
  120. package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.d.ts +0 -14
  121. package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.d.ts.map +0 -1
  122. package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.js +0 -25
  123. package/dist/application/sync/outbound/effects/SyncEffectWorkerHelpers.js.map +0 -1
  124. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts +0 -61
  125. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.d.ts.map +0 -1
  126. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js +0 -296
  127. package/dist/application/sync/outbound/effects/SyncEffectWorkerRouting.js.map +0 -1
  128. package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.d.ts +0 -17
  129. package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.d.ts.map +0 -1
  130. package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.js +0 -80
  131. package/dist/application/sync/outbound/effects/SyncEffectWorkerTiming.js.map +0 -1
  132. package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.d.ts +0 -13
  133. package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.d.ts.map +0 -1
  134. package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.js +0 -248
  135. package/dist/application/sync/outbound/effects/SyncEffectWorkerTransitions.js.map +0 -1
  136. package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts +0 -141
  137. package/dist/infrastructure/storage/sync/outbound/effectOutbox.d.ts.map +0 -1
  138. package/dist/infrastructure/storage/sync/outbound/effectOutbox.js +0 -318
  139. package/dist/infrastructure/storage/sync/outbound/effectOutbox.js.map +0 -1
  140. package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.d.ts +0 -143
  141. package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.d.ts.map +0 -1
  142. package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.js +0 -16
  143. package/dist/infrastructure/storage/sync/outbound/effectOutboxContracts.js.map +0 -1
  144. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts +0 -33
  145. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.d.ts.map +0 -1
  146. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js +0 -259
  147. package/dist/infrastructure/storage/sync/outbound/effectOutboxSql.js.map +0 -1
  148. package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.d.ts +0 -27
  149. package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.d.ts.map +0 -1
  150. package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.js +0 -316
  151. package/dist/infrastructure/storage/sync/outbound/effectOutboxSupport.js.map +0 -1
  152. package/dist/infrastructure/storage/sync/shared/writerLease.d.ts +0 -76
  153. package/dist/infrastructure/storage/sync/shared/writerLease.d.ts.map +0 -1
  154. package/dist/infrastructure/storage/sync/shared/writerLease.js +0 -189
  155. package/dist/infrastructure/storage/sync/shared/writerLease.js.map +0 -1
  156. package/docs/advanced-sheets-gateway-concurrency-problem.md +0 -434
  157. package/docs/architecture.md +0 -224
  158. package/docs/ci.md +0 -293
  159. package/docs/code-guidelines.md +0 -248
  160. package/docs/development.md +0 -74
  161. package/docs/gateway-removal-inventory.md +0 -147
  162. package/docs/git-workflow.md +0 -224
  163. package/docs/google-sheets-sync-scaling-strategy.md +0 -459
  164. package/docs/mikro-orm-adapter-spike.md +0 -89
  165. package/docs/quick-start.md +0 -137
  166. package/docs/sql-layer-plan.md +0 -59
  167. package/docs/sync-bulk-write-benchmark.md +0 -2117
  168. package/docs/sync-observability.md +0 -100
  169. package/docs/task-queue-write-model.md +0 -640
  170. package/docs/typed-sheets-mvp-scope-2026-06-29.md +0 -490
  171. package/docs/typed-sheets-plan.md +0 -417
  172. package/docs/write-and-synchronization-flow.md +0 -179
@@ -1,147 +0,0 @@
1
- # Gateway 제거 인벤토리 (Apps Script gateway 완전 철수)
2
-
3
- > 브랜치: `chore/post-merge-cleanup` · 기준: develop 8ecce3c (PR #161+#162 머지 후)
4
- > 원칙: `src/` 내부의 gateway 사용 코드를 전부 제거 — 파일, 인터페이스 파라미터, 타입
5
- > 파라미터, 상수명, 문자열까지 포함. 이 과정에서 실패하는 테스트는 무시한다 (승인됨).
6
- > **단, scripts/ci/run-api-scenario.mjs(릴리스 CI 검증 경로)는 깨지지 않게 수정**해야 한다.
7
-
8
- ## Tier 1 — 파일 완전 삭제
9
-
10
- ### 1-1. Apps Script provider (18 파일)
11
- `src/adapter/sheets/providers/apps-script-gateway/` 전체 삭제:
12
- - `errors.ts`, `index.ts`, `validation.ts`
13
- - `operations/effect/effectOperation.ts`, `effectOperationScript.ts`
14
- - `operations/observation/observationOperation.ts`
15
- - `operations/read/tableReadOperation.ts`
16
- - `operations/shared/appsScriptStableCodecSource.ts`
17
- - `operations/write/batchAppendOperation.ts`, `fastAppendOperation.ts`
18
- - `protocol/codeGsProtocol.ts`, `constants.ts`, `syncProtocol.ts`, `timing.ts`, `types.ts`, `validation.ts`
19
- - `transport/operationClient.ts`, `transport/operationSyncGateway.ts`
20
-
21
- ### 1-2. 배포용 Apps Script
22
- - `apps-script/gateway/Code.gs`, `apps-script/gateway/appsscript.json`
23
- - `package.json` `files`에서 `apps-script/gateway/*` 항목 제거
24
-
25
- ### 1-3. 혼합 모드/구버전 전용 src 파일
26
- - `src/application/sync/gateway/RoutedSyncGateway.ts` (deprecated mixed-mode 라우터)
27
- - `src/adapter/sheets/providers/google-sheets-api/GoogleSheetsApiEffectGateway.ts` (deprecated alias)
28
- - `src/application/sync/gateway/syncGateway.ts` 내 `SplitSyncGateway` 클래스 + `SyncEffectWorkerGateway`(fast-only 인터페이스) — 사용처가 Split 테스트뿐이면 삭제
29
-
30
- ### 1-4. 삭제할 테스트 (실패 무시 승인 범위)
31
- - `test/apps-script-batch-append-operation.test.ts`
32
- - `test/apps-script-fast-append-operation.test.ts`
33
- - `test/apps-script-operation-client.test.ts`
34
- - `test/apps-script-operation-sync-gateway.test.ts`
35
- - `test/coordinated-sync-gateway.test.ts`
36
- - `test/fake-sync-gateway.test.ts`
37
- - `test/split-sync-gateway.test.ts`
38
- - `test/sync-gateway.test.ts`
39
- - `test/support/FakeSyncSheetGateway.ts` (stub transport 기반으로 대체하거나 삭제)
40
-
41
- ## Tier 2 — 계약 레이어 재명명 (`src/application/sync/gateway/`)
42
-
43
- 디렉터리 제안: `src/application/sync/gateway/` → `src/application/sync/sheets/`
44
-
45
- | 기존 | 제안 |
46
- | --- | --- |
47
- | `syncGateway.ts` | `syncSheets.ts` |
48
- | `SyncGatewayBootstrap.ts` | `sheetsProvisioning.ts` |
49
- | `transportClassification.ts` | `transportOutcome.ts` |
50
- | `conflictProjectionRegistration.ts` | `conflictProjection.ts` |
51
- | `coordinator/` | `mutationCoordinator/` |
52
- | `CoordinatedSyncGateway` | `CoordinatedSheetsProvider` |
53
- | `coordinatorTelemetry.ts` | `laneTelemetry.ts` |
54
-
55
- ### 핵심 타입 재명명 (gateway 단어 제거)
56
- - `SyncSheetGateway` → `SyncSheetsProvider`
57
- - `SyncEffectWorkerFullGateway` → `SyncEffectWorkerProvider`
58
- - `SyncSheetObservationGateway` → `SyncSheetsObservationProvider`
59
- - `SyncSheetObservationBatchGateway` → `SyncSheetsObservationBatchProvider`
60
- - `SyncSheetTableReaderGateway` → `SyncSheetsTableReader`
61
- - `SyncGatewayProvisioner` → `SyncSheetsProvisioner`
62
- - `SyncGatewaySnapshot` → `SyncSheetsSnapshot`
63
- - `SyncGatewayEffect` → `SyncProjectionEffect`
64
- - `SyncGatewayEffectResult` → `SyncEffectResult`
65
- - `SyncGatewayEffectPostconditionResult` → `SyncEffectPostconditionResult`
66
- - `SyncGatewayTiming` → `SyncSheetsTiming` (syncTiming.ts)
67
- - `SyncGatewayContractError` → `SyncSheetsContractError`
68
- - `SYNC_GATEWAY_ERROR_CODES` → `SYNC_SHEETS_ERROR_CODES` (또는 `SYNC_CONTRACT_ERROR_CODES`)
69
-
70
- ### 상수 재명명 (`src/application/sync/gateway/constants.ts`)
71
- - `SYNC_GATEWAY_PROJECTIONS` → `SYNC_PROJECTIONS`
72
- - `SYNC_GATEWAY_PROTOCOL_VERSIONS` → `SYNC_PROTOCOL_VERSIONS`
73
- - `SYNC_GATEWAY_SNAPSHOT_READ_MODES` → `SYNC_SNAPSHOT_READ_MODES`
74
- - `SYNC_GATEWAY_EFFECT_RESULT_STATUSES` → `SYNC_EFFECT_RESULT_STATUSES`
75
- - `SYNC_GATEWAY_FAST_APPEND_STATUSES` → `SYNC_FAST_APPEND_STATUSES`
76
- - `SYNC_GATEWAY_POSTCONDITION_MODES/STATUSES/DISPOSITIONS` → `SYNC_POSTCONDITION_*`
77
- - `SYNC_GATEWAY_EFFECT_KINDS` → `SYNC_EFFECT_KINDS`
78
-
79
- ### 워커 상수/타입
80
- - `GATEWAY_EFFECT_BATCH_LIMIT` → `EFFECT_BATCH_LIMIT`
81
- - `WORKER_ERROR_CODES.GATEWAY_SUPERSEDED/SCHEMA_ERROR/REMOTE_ERROR/CAPABILITY_MISSING` → `PROVIDER_*` (⚠️ `last_error_code`로 SQLite에 저장되는 값 — 재명명 시 과거 데이터 코드 의미 변경. dev 단계라 저위험, 문서에 명시)
82
- - `gatewayTimeoutMs` 옵션 → `requestTimeoutMs` (SyncEffectWorker/SyncEffectSupervisor/SyncServiceBootstrap)
83
- - `gateway` 파라미터명 → `provider` (runSyncEffectWorkerWithAdapter 등)
84
- - `item.gatewayEffect` → `item.providerEffect` (또는 `sheetEffect`)
85
-
86
- ## Tier 3 — 파라미터/타입 단위 제거 (사소한 부분)
87
-
88
- - **`SyncGatewayAuthority` + `authority` 요청 파라미터 삭제**
89
- - 전달 지점은 `SyncEffectWorkerRouting.ts:292` 1곳뿐이며 워커는 값을 넣지 않음(항상 undefined)
90
- - 대상: `ApplySyncEffectsRequest.authority`, `FastAppendRowsRequest.authority`, `EnsureSyncRowAnchorsRequest.authority`, `ReadSyncSnapshotRequest.authority`, `ReadSyncEffectPostconditionsRequest.authority`
91
- - `GoogleSheetsApiSyncProvider`의 `validateAuthority` 삭제
92
- - SQLite `spreadsheet_authority`(infrastructure/storage/sync/shared/spreadsheetAuthority.ts)는 **유지** — 로컬 fence
93
- - **Bootstrap 옵션 삭제**: `gateway`(injected), `provisioner`, `appsScript`, `googleApiWorker`
94
- - `InternalSyncGateway`/`InternalSyncGatewayControl` → `InternalSyncProvider`/삭제
95
- - `runGatewayControl` → `runSerializedControl` (coordinator 기존 메서드로 통합)
96
- - `createAppsScriptObservationGateway`, `asProvisioner`, `isSyncGatewayProvisioner`, `wrapInCoordinator` 정리
97
- - 남는 모드: `googleSheetsApi` 단일 경로
98
- - **워커 내부 네이밍**: `groupByGatewayRequest` → `groupByProviderRequest`, `gatewayRouteKey` → `routeKey`, "gateway is fast-only" 메시지 정리
99
- - **텔레메트리**: `SYNC_TIMING_SCOPES.GATEWAY = "gateway"` → `"provider"` (scope 값 — 텔레메트리 계약, 테스트 갱신 필요)
100
- - **워커 타이밍 phase 이름**: `*_gateway_dispatch` 등 gateway 포함 phase 문자열 확인 후 `*_provider_dispatch`로 (sync-effect-outbound-performance.test.ts 등이 참조)
101
-
102
- ## Tier 4 — 주석/문자열 정리 (gateway 언급 제거)
103
-
104
- - `src/index.ts`, `src/api/index.ts`, `src/api/Hikoutei.ts` (주석)
105
- - `src/domain/model/types.ts`, `src/shared/encoding/types.ts` ("observation/gateway path" 주석)
106
- - `src/infrastructure/storage/sync/outbound/effectOutbox*.ts` (주석)
107
- - `src/application/sync/inbound/*`, `reconciliation/*`, `outbound/projection/*` 주석
108
- - `src/adapter/persistence/providers/mikro-orm/**` 주석
109
- - `domain/evaluate/contracts.ts`, `application/orm/**` 주석 (SYNC_GATEWAY_ import는 재명명 반영)
110
-
111
- ## Tier 5 — 테스트 영향
112
-
113
- ### 삭제: Tier 1-4 목록 (8 파일 + FakeSyncSheetGateway)
114
- ### 수정 필요 (재명명 따라가기 — 실패 시 무시 OK, 단 시나리오 제외):
115
- - `test/google-sheets-api-effect-gateway.test.ts` → `test/google-sheets-api-provider.test.ts`로 병합/이름 변경 (deprecated alias 테스트 제거, 나머지는 sync-provider 테스트로)
116
- - `test/sync-service.test.ts` (gateway/appsScript/googleApiWorker 모드 테스트 제거, googleSheetsApi 모드 유지)
117
- - `test/google-sheets-api-sync-provider.test.ts`, `test/transport-classification.test.ts`
118
- - `test/simple-sheet-polling.test.ts`, `test/mapped-typed-sheets-orm.test.ts`, `test/mapped-user-input-*.test.ts`
119
- - `test/reconciliation-scanner.test.ts`, `test/sync-effect-*.test.ts`, `test/sync-polling-supervisor.test.ts`
120
- - `test/hikoutei-*.test.ts`, `test/type-contracts.test.ts`, `test/kohkai-compatibility.test.ts` (apps-script codec 참조 확인)
121
- - `test/root-api-options.test.ts` (options에 gateway 포함 여부 확인)
122
-
123
- ## Tier 6 — CI/스크립트 (깨지면 안 되는 경로)
124
-
125
- - `scripts/ci/run-api-scenario.mjs`
126
- - `FakeSyncGateway` 클래스 → 재명명된 계약 구현(또는 StubSheetsTransport 기반으로 교체) — **fake 모드는 CI(ci.yml, develop/stable-publish)가 사용하므로 유지 필수**
127
- - `LiveSyncBackend` gateway 모드, `mutateRowSource`/`cleanupSource`(Apps Script 소스), `AppsScriptOperationClient` import 제거
128
- - direct 모드만 남도록 정리
129
- - `.github/workflows/` — live-integration.yml은 이미 direct-only; 나머지 확인
130
- - `.env.example`, `docs/` — `TYPED_SHEETS_GATEWAY_*`, `GOOGLE_APPS_SCRIPT_*` 정리 (후속)
131
-
132
- ## 유지 목록 (혼동 방지)
133
-
134
- - `src/infrastructure/storage/sync/shared/spreadsheetAuthority.ts` — SQLite authority (gateway 아님, 유지)
135
- - `@hikoutei/kohkai` — stable codec (유지)
136
- - `src/adapter/sheets/providers/google-sheets-api/**` — 유일 provider (유지, 계약 재명명 반영)
137
- - `scripts/ci/release-version.mjs`, `read-npm-dist-tag.mjs` — 무관
138
-
139
- ## 실행 순서 제안
140
-
141
- 1. Tier 2 재명명 (디렉터리+타입+상수) — 순수 기계적 변경, 중간 커밋
142
- 2. Tier 1 삭제 (apps-script-gateway, alias, 혼합 모드, 배포 파일, 전용 테스트)
143
- 3. Tier 3 파라미터/옵션 제거 (authority, bootstrap 옵션, 워커 네이밍)
144
- 4. Tier 6 시나리오/워크플로 정리 (direct-only, fake 유지)
145
- 5. Tier 5 수정 테스트 + 실패 무시 목록 확정
146
- 6. Tier 4 주석/문자열 + 문서 정리
147
- 7. 검증: typecheck/build는 통과 목표, 단위 테스트는 실패 허용 목록 외 통과
@@ -1,224 +0,0 @@
1
- # Git Workflow
2
-
3
- ## Branch Model
4
-
5
- Use a simple branch model.
6
-
7
- ```txt
8
- main stable releases
9
- next integration branch, optional
10
- feature/* feature work
11
- fix/* bug fixes
12
- chore/* maintenance
13
- ```
14
-
15
- If the project is still early, `main` plus short-lived feature branches is enough.
16
-
17
- Do not commit directly to `main` once the first usable version is published.
18
-
19
- ## Branch Naming
20
-
21
- Use English kebab-case branch names.
22
-
23
- Examples:
24
-
25
- ```txt
26
- feature/core-schema
27
- feature/memory-adapter
28
- feature/version-locking
29
- feature/google-sheets-adapter
30
- feature/readme-quickstart
31
- fix/conflict-error-message
32
- chore/node-version-matrix
33
- ```
34
-
35
- ## Commit Messages
36
-
37
- Use Conventional Commits.
38
-
39
- Format:
40
-
41
- ```txt
42
- <type>(<scope>): <summary>
43
- ```
44
-
45
- Common types:
46
-
47
- ```txt
48
- feat
49
- fix
50
- docs
51
- test
52
- refactor
53
- build
54
- ci
55
- chore
56
- ```
57
-
58
- Examples:
59
-
60
- ```txt
61
- feat(core): add schema definition API
62
- feat(core): add version-based stale write protection
63
- feat(adapter): add in-memory sheet adapter
64
- test(core): cover duplicate header detection
65
- docs(readme): clarify Google Sheets limitations
66
- ci(node): add Node version matrix
67
- ```
68
-
69
- ## PR Size
70
-
71
- Keep PRs reviewable.
72
-
73
- Target size:
74
-
75
- ```txt
76
- 300-1,000 changed lines
77
- ```
78
-
79
- Split larger changes by responsibility.
80
-
81
- Good PR sequence:
82
-
83
- 1. project scaffold
84
- 2. core schema and column parsers
85
- 3. memory adapter
86
- 4. repository read methods
87
- 5. insert/update methods
88
- 6. optimistic locking
89
- 7. README and examples
90
- 8. Google Sheets adapter
91
-
92
- ## First Milestone PR Plan
93
-
94
- Recommended first milestone:
95
-
96
- ```txt
97
- PR 1: project scaffold
98
- PR 2: schema and parser core
99
- PR 3: memory adapter and read repository
100
- PR 4: insert/update with version conflict
101
- PR 5: README quickstart and limitations
102
- ```
103
-
104
- Do not start with Google OAuth or Apps Script. Those belong after the core model is stable.
105
-
106
- ## Release Policy
107
-
108
- Use semantic versioning.
109
-
110
- Before `1.0.0`, breaking changes are allowed but should be documented.
111
-
112
- Suggested early versions:
113
-
114
- ```txt
115
- 0.1.0 core schema + memory adapter
116
- 0.2.0 repository CRUD + optimistic locking
117
- 0.3.0 Google Sheets adapter
118
- 0.4.0 README, examples, CI hardening
119
- ```
120
-
121
- ## Pull Request Template
122
-
123
- Each PR should include:
124
-
125
- ```md
126
- ## Summary
127
-
128
- ## Why
129
-
130
- ## Changes
131
-
132
- ## Tests
133
-
134
- ## Limitations
135
- ```
136
-
137
- ## Labels
138
-
139
- Use lowercase labels matching commit types where possible.
140
-
141
- ```txt
142
- feat
143
- fix
144
- docs
145
- test
146
- refactor
147
- build
148
- ci
149
- chore
150
- ```
151
-
152
- Additional useful labels:
153
-
154
- ```txt
155
- core
156
- adapter
157
- docs
158
- release
159
- ```
160
-
161
- ## CI Expectations
162
-
163
- Minimum CI before first release:
164
-
165
- - install
166
- - typecheck
167
- - test
168
- - build
169
-
170
- Recommended Node matrix:
171
-
172
- ```txt
173
- Node 18
174
- Node 20
175
- Node 22
176
- Node 24
177
- ```
178
-
179
- Google integration tests should not run by default unless credentials are available.
180
-
181
- ## Release Checklist
182
-
183
- Before publishing:
184
-
185
- - README quickstart works
186
- - package exports are correct
187
- - `npm pack` contents are checked
188
- - tests pass
189
- - typecheck passes
190
- - build output is verified
191
- - package name availability is checked
192
- - limitations are documented
193
- - no credentials or local files are included
194
-
195
- ## Issue Strategy
196
-
197
- Initial issues should be small and implementation-oriented.
198
-
199
- Examples:
200
-
201
- ```txt
202
- Add duplicate header detection
203
- Add missing key column error
204
- Add number parser
205
- Add memory adapter
206
- Add version conflict test
207
- Add README limitations section
208
- ```
209
-
210
- Avoid opening vague issues such as:
211
-
212
- ```txt
213
- Build ORM
214
- Add transactions
215
- Support everything
216
- ```
217
-
218
- ## Project Narrative
219
-
220
- The public project story should be:
221
-
222
- > Google Sheets is practical for early MVPs and internal tools, but manual edits introduce schema drift and stale writes. This library provides a typed repository layer that fails fast on schema drift and protects writes with version-based conflict detection.
223
-
224
- Do not claim full database semantics.