diff --git a/docs/releases/evidence/rel-012_20260717_execution-evidence.md b/docs/releases/evidence/rel-012_20260717_execution-evidence.md new file mode 100644 index 0000000..2d767dd --- /dev/null +++ b/docs/releases/evidence/rel-012_20260717_execution-evidence.md @@ -0,0 +1,79 @@ +# REL-012 운영 실행 증적 및 `confirm-release` 기록 + +- Release: `REL-012` +- Batch: `BAT-058` / `REQ-123` +- Service: `trex-core` — 기존 `trex-core` daemon 1개 +- Evidence received: 2026-07-17 13:42:37 KST, `trex-op`의 M5 common evidence 보정본 +- Canonical source payload: [`81a853a314391da7a8bc9df5517013c7fd296d61`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) +- Canonical release manifest: [`869e07fb34bd8a65d330da58a28cbcb1505b9625`](https://github.com/fourblocks2020/trex-core/commit/869e07fb34bd8a65d330da58a28cbcb1505b9625) +- Evidence status: **complete for REL-012 release scope** + +> 이 문서는 운영팀이 반환한 secret-free 실행 증적을 REL-012 전용 canonical release record로 전사한 것이다. M5 공통 handoff는 supporting evidence이며, 이 문서가 REL-012의 release-specific primary record다. credential, token, account number, DSN, raw broker/portfolio response는 기록하지 않는다. + +## 1. 승인 및 preflight + +| Gate | Result | Recorded evidence | +| --- | --- | --- | +| Production execution approval | PASS | 사용자 명시 지시: `지금 실행` | +| Execution window | PASS | 승인 시각부터 완료 시까지의 off-market window | +| Initial checkout | PASS | detached `6d90f895...` | +| Release refresh | PASS | `deploy-trex-core.sh --update-only`; refreshed main `869e07f` | +| Pre-deploy / rollback revision | PASS | `ROLLBACK_REVISION = 869e07fb34bd8a65d330da58a28cbcb1505b9625` | +| Checkout cleanliness | PASS | clean | +| Payload publication | PASS | `81a853a` verified on origin feature ref before execution | +| Dependency / migration delta | PASS | none | +| Configuration / credential / break-glass change | PASS | none | +| Approved activation method | PASS | approved supervisor; program `trex-core:trex-admin-daily-trading` | + +## 2. Daemon activation + +| Check | Result | Recorded evidence | +| --- | --- | --- | +| Pinned payload checkout | PASS | `81a853a314391da7a8bc9df5517013c7fd296d61` | +| Existing daemon stop | PASS | old daemon stopped through approved supervisor | +| New daemon start | PASS | same approved configuration | +| Supervisor state | PASS | `RUNNING` | +| Startup log interval | PASS | error / critical / traceback count `0` | +| RabbitMQ / application connectivity | PASS | startup connection accepted | +| Rollback | Not required | no stop condition observed | + +## 3. Read-only / dry-run acceptance + +| Command / check | Result | Sanitized evidence | +| --- | --- | --- | +| `sync --all --dry-run --config trex-admin-daily-trading --json` | PASS | exit `0`; results `145`; skipped `145`; write indications `0`; classification `broker_qty_zero` | +| `verify --config trex-admin-daily-trading --json` | PASS | exit `0`; result count `0`; `no C-warned slots found` | +| Prohibited rollout actions | PASS | no `sync --live`, no `--yes` live write, no order action during REL-012 deployment scope | + +The deployment evidence satisfies the REL-012 runbook's restart and read/dry-run-only acceptance contract. No DB migration, DB edit, dependency/configuration/credential change, AMQP topology change, or strategy daemon deployment was recorded. + +## 4. Separate post-release operational action + +After the REL-012 daemon rollout, a **separately user-approved** single-target remediation was performed for `genichin-longterm` / symbol `005930`. It is not deployment smoke and does not enlarge REL-012's deployment scope. + +- Prior dry-run: projected `holding`, broker qty `5`, projected avg price `124580.0`, `seeded_avg_price=true`, no write. +- Separately authorized action: `sync --live --yes` for that single target; exit `0`. +- Readback: `holding`, qty `5.0`, avg price `124580.0`, no warning / reconcile warning; `verify` PASS. +- Rollback: not required. + +## 5. `confirm-release` decision + +- **Decision:** `Released` +- **Lead rationale:** immutable deployed payload and manifest are identified; approval, preflight, activation, startup observation, rollback disposition, and permitted read-only/dry-run smoke are complete and PASS. No release-scope stop condition was observed. +- **Released scope:** existing `trex-core` daemon only. +- **Excluded services / changes:** `portfolio-hub`, `kis-data-hub`, `trex-orb-v1`, `trex-tsl-v1`, strategy daemons, DB schema, credentials/configuration, and AMQP topology. +- **Remaining boundary:** any future `sync --live` remains independently authorized per target and is not a daemon rollout shortcut. + +## 6. Feedback and train boundary + +- The no-write dry-run and `verify` acceptance checks passed after restart; no new release blocker was observed. +- This record confirms **REL-012 only**. It does not reclassify the M5 release train as `Train Released`. +- `trex-core REL-011` still lacks its own release-specific execution evidence in the received M5 handoff and remains `draft`; therefore the M5 train remains **not fully released** pending a separate REL-011 evidence decision. + +## 7. Evidence sources + +- [REL-012 release draft](../rel-012_20260717_cost-basis-safe-sync-seed-hotfix.md) +- [REL-012 deployment runbook](../../runbooks/rel-012-cost-basis-safe-sync-seed-deployment.md) +- [REL-012 operations handoff](../../runbooks/rel-012-cost-basis-safe-sync-seed-ops-handoff.md) +- [BAT-058 verification](../../batches/bat-058_20260716_cost-basis-safe-sync-seed/verification.md) +- Operations supporting handoff: `M5-common-evidence-handoff-revised-20260717-134237-ozxbxkeaybgzpgzmgt3aqshcba.md` (received by lead, 2026-07-17) diff --git a/docs/releases/index.md b/docs/releases/index.md index 63f9efa..37e8aec 100644 --- a/docs/releases/index.md +++ b/docs/releases/index.md @@ -19,4 +19,4 @@ | REL-009 | app-service | feedback-captured | BAT-047, BAT-048, BAT-049 | dcy-031/OPS-005 (이벤트 발행 신뢰성 — idle keepalive·재시도·DLQ 경보) + dcy-032 (체결가 0/None 백필 가드·WARN 로깅) + dcy-033 (알람 emitter + trex.alerts exchange 1단계) + dcy-017 후속(무데이터/죽은 종목 위생 런북 docs-only) — M2 통합 릴리즈. 환류: OPS-005 해소 확인, slot_filled NO_ROUTE/DLQ 신규 발견(M3 Discovery 입력) | [rel-009](rel-009_20260625_event-reliability-fill-guard-alarm-runbook.md) | | REL-010 | app-service | released | BAT-050, BAT-051, BAT-052, BAT-053, BAT-054 | dcy-034 (차단형 reconcile + sync/verify cold-start) + dcy-035 (WAC 실현손익 운영리포트) + dcy-036 (KIS 인증정보 휴면 배포 — credential_fetch_enabled=OFF) — M3 통합 릴리즈. 배포 revision `314047b`(2026-06-30). verify ImportError 핫픽스 `51cc3cc` 포함. | [rel-010](rel-010_20260629_reconcile-coldstart-wac-report-credential-dormant.md) | | REL-011 | app-service | draft | BAT-057 | dcy-037 (operator broker truth / managed non-holding divergence hotfix) — **M5 trex-core P0 release**. Source pin `6d90f89`; production daemon restart와 read/dry-run smoke만 대상이며 `sync --live`, config activation, DB migration은 별도 gate. | [rel-011](rel-011_20260716_m5_operator-broker-truth-hotfix.md) | -| REL-012 | app-service | draft / release-pending | BAT-058 | dcy-038 / REQ-123 (cost-basis canonical parse + unavailable WAC safe sync seed) — **긴급 consumer hotfix**. Immutable source pin은 commit/push 후 확정하며, daemon restart와 read/dry-run smoke만 release scope; `sync --live`, config activation, DB migration은 별도 gate. | [rel-012](rel-012_20260717_cost-basis-safe-sync-seed-hotfix.md) | +| REL-012 | app-service | released | BAT-058 | dcy-038 / REQ-123 (cost-basis canonical parse + unavailable WAC safe sync seed) — **긴급 consumer hotfix**. Immutable daemon payload `81a853a` deployed; manifest `869e07f`; restart and read-only/dry-run acceptance PASS. `sync --live`, config activation, DB migration remain outside rollout scope. | [rel-012](rel-012_20260717_cost-basis-safe-sync-seed-hotfix.md) | diff --git a/docs/releases/rel-012_20260717_cost-basis-safe-sync-seed-hotfix.md b/docs/releases/rel-012_20260717_cost-basis-safe-sync-seed-hotfix.md index 762d290..f8df760 100644 --- a/docs/releases/rel-012_20260717_cost-basis-safe-sync-seed-hotfix.md +++ b/docs/releases/rel-012_20260717_cost-basis-safe-sync-seed-hotfix.md @@ -1,6 +1,6 @@ # REL-012: cost-basis canonical parse 및 안전 sync seed 긴급 핫픽스 -- Status: **Draft / Release-Pending** +- Status: **Released** - Profile: `app-service` - Priority: **urgent** - Owner: 팀장 / 운영팀 @@ -17,12 +17,12 @@ portfolio-hub의 기존 cost-basis 응답에서 canonical `cost_basis_per_unit` | Item | Current evidence | Release constraint | | --- | --- | --- | -| Remote `origin/main` | `18bd8d9f0b7bb76b08303bbf8743e6ddf916de89` (2026-07-17 fetch) | BAT-058 source is **not included** in this remote revision. | -| BAT-058 candidate | [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) on `origin/feat/dcy-038-cost-basis-safe-sync-seed` | Reviewed code + BAT/REL/runbook source is published; target remains subject to production approval. | -| Immutable deploy payload | [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) | Published and remote-ref verified 2026-07-17; this is the immutable **code/test payload** used for the daemon checkout. | -| Authoritative release manifest | This REL-012/runbook revision on PR #43 | A docs-only successor of `81a853a`; it is **not** the daemon payload. Before execution, operations records both the immutable payload SHA and the exact manifest commit URL used for the approved runbook. | +| Remote `origin/main` | [`869e07f`](https://github.com/fourblocks2020/trex-core/commit/869e07fb34bd8a65d330da58a28cbcb1505b9625) | BAT-058 source and immutable REL/runbook manifest are included; this is the recorded release-manifest revision. | +| BAT-058 candidate | [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61), reachable from `origin/main` | Reviewed code payload was deployed; operational evidence is recorded in the REL-012 execution record. | +| Immutable deploy payload | [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) | Immutable **code/test payload** checked out for the daemon rollout. | +| Authoritative release manifest | [`869e07f`](https://github.com/fourblocks2020/trex-core/commit/869e07fb34bd8a65d330da58a28cbcb1505b9625) | Immutable REL/runbook manifest recorded with the operational evidence. | -The immutable daemon deploy payload and the release manifest have distinct roles: `81a853a` is the verified code/test payload; the REL-012/runbook document is an immutable docs-only successor on the same PR. Operations must record both revisions in its evidence. This document is a release draft and preflight request only. It does **not** authorize deployment, daemon restart, broker/portfolio access, `sync --live`, database writes, configuration activation, or credential access. +The immutable daemon deploy payload and the release manifest have distinct roles: `81a853a` is the verified code/test payload; `869e07f` is the immutable release/runbook manifest. Operations recorded both revisions in the [REL-012 execution evidence](evidence/rel-012_20260717_execution-evidence.md). The pre-execution authorization boundary is historical: the approved daemon restart and read/dry-run smoke completed without a release-scope stop condition. `sync --live` remains a separately authorized per-target operational action and is not deployment smoke. ## Included scope @@ -48,19 +48,19 @@ A single-target `sync --live --yes` remains a separately approved post-release a | Release-prep full regression | **PASS** | 2026-07-17 delivery worktree: `833 passed, 47 skipped in 1.88s`. | | Focused Ruff | **PASS** | Changed adapter/reconcile/CLI and relevant tests: `All checks passed!`. | | Focused compile check | **PASS** | Six changed source/test paths, `compileall -q`, exit `0`. | -| Live broker, live PostgreSQL, production deploy | **NOT EXECUTED** | Outside batch verification and this draft; no claim is made. | -| Source publication | **PUBLISHED** | Immutable daemon payload [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) is remote-ref verified on `origin/feat/dcy-038-cost-basis-safe-sync-seed`; authoritative REL/runbook is a docs-only successor in PR #43. Operations records both revisions before execution. | +| Live broker, live PostgreSQL, production deploy | **PASS** | Operations returned secret-free primary evidence: pinned daemon rollout, startup acceptance, and permitted dry-run / verify smoke all PASS; see [execution evidence](evidence/rel-012_20260717_execution-evidence.md). | +| Source publication | **PUBLISHED / DEPLOYED** | Immutable daemon payload [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) is reachable from `origin/main`; manifest [`869e07f`](https://github.com/fourblocks2020/trex-core/commit/869e07fb34bd8a65d330da58a28cbcb1505b9625) and both revisions are recorded in the execution evidence. | ## Release approval gates -All items must be satisfied before operations executes the runbook: +All release gates are recorded as satisfied in the [REL-012 execution evidence](evidence/rel-012_20260717_execution-evidence.md): -- [x] Git-ops published the reviewed source and initial REL/runbook draft; target `81a853a` is remote-ref verified on `origin/feat/dcy-038-cost-basis-safe-sync-seed`. -- [ ] Operations verifies the exact immutable daemon payload SHA **and** records the exact immutable REL/runbook manifest commit URL used for the run; captures the actual deployed revision as `ROLLBACK_REVISION`. -- [ ] User/approver explicitly authorizes production execution and the approved off-market window is recorded. -- [ ] Operations confirms the source checkout is clean; existing runtime configuration and credential/break-glass modes will not change. -- [ ] Operations confirms no dependency or migration delta exists between `ROLLBACK_REVISION` and the exact target SHA. -- [ ] Operations records the approved supervisor method, instance key (redacted as necessary), and post-deploy observation owner. +- [x] Reviewed source and REL/runbook manifest are published and immutable. +- [x] Operations verified payload `81a853a`, recorded manifest `869e07f`, and captured `ROLLBACK_REVISION`. +- [x] User explicitly authorized production execution; off-market window is recorded. +- [x] Operations confirmed clean checkout and unchanged runtime configuration / credential / break-glass modes. +- [x] Operations confirmed no dependency or migration delta. +- [x] Operations used the approved supervisor, recorded startup acceptance, and completed permitted dry-run / verify smoke with no write indication. ## Rollout and rollback policy @@ -69,6 +69,16 @@ All items must be satisfied before operations executes the runbook: 3. Stop and roll back on startup failure, traceback/error regression, unexpected credential/source-mode behavior, unexpected mutation indication, or smoke output that violates the no-write/fail-closed contract. 4. Roll back by restoring the actual captured `ROLLBACK_REVISION` and restarting with unchanged configuration. Do not run database rollback commands, direct DB edits, or live sync. -## Evidence required for `confirm-release` +## Release Decision Evidence -Operations returns a secret-free record containing: approver/window/operator; `ROLLBACK_REVISION` and target SHA; clean-checkout/preflight result; restart/startup result; dry-run smoke and `verify` exit/status summaries; observed no-write/fail-closed classifications; and rollback disposition. The lead then reviews that evidence before changing REL-012 from Draft / Release-Pending. +- **Released Decision:** `Released` — lead `confirm-release` recorded after reviewing the release-specific execution record. +- **Rationale:** immutable payload `81a853a` was deployed with manifest `869e07f`; clean preflight, unchanged safety-sensitive configuration, daemon restart/startup, read-only dry-run/verify acceptance, and no rollback trigger are all documented as PASS. +- **Recorded by:** 팀장, based on secret-free `trex-op` evidence received 2026-07-17 13:42:37 KST. +- **Primary record:** [REL-012 execution evidence](evidence/rel-012_20260717_execution-evidence.md). +- **Boundary:** `sync --live` is not daemon rollout smoke; any later per-target use remains an independent approved operational action. + +## Feedback Handoff + +- **Observation summary:** post-restart `sync --all --dry-run` exited `0` with `145` skipped `broker_qty_zero` results and no write indication; `verify` exited `0` with no C-warned slots. No release-scope failure was reported. +- **Discovery / REQ input:** none from this rollout evidence. +- **Train boundary:** REL-012 is released, but M5 is not reclassified as Train Released because REL-011 still lacks a separate execution-evidence decision. diff --git a/docs/runbooks/rel-012-cost-basis-safe-sync-seed-ops-handoff.md b/docs/runbooks/rel-012-cost-basis-safe-sync-seed-ops-handoff.md index 39e9771..c6fadae 100644 --- a/docs/runbooks/rel-012-cost-basis-safe-sync-seed-ops-handoff.md +++ b/docs/runbooks/rel-012-cost-basis-safe-sync-seed-ops-handoff.md @@ -2,19 +2,19 @@ - 대상: 운영팀 (`trex-op`) - 작성일: 2026-07-17 -- 상태: **긴급 배포 사전 근거 완료 — explicit production execution approval / window / host preflight 대기** +- 상태: **REL-012 Released — 운영 실행 증적 수령 및 lead `confirm-release` 기록 완료** -> 이 문서는 운영팀용 요약이다. 실제 실행은 immutable remote source에 존재하는 REL-012 및 deployment runbook만 따른다. 이 문서는 deployment approval 또는 execution completion이 아니다. +> 이 문서는 사전 운영 요청의 historical handoff와 완료 상태를 함께 보존한다. 실행의 primary record와 release decision은 [REL-012 execution evidence](../releases/evidence/rel-012_20260717_execution-evidence.md)를 따른다. ## 1. 결론 -BAT-058은 independent QC-7 `PASS-WITH-NOTES`를 수용해 batch verification을 완료했고, REL-012 긴급 릴리즈 초안을 준비했다. 배포 후보 [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61)는 `origin/feat/dcy-038-cost-basis-safe-sync-seed`에 게시·원격 ref 검증됐다. 운영팀은 explicit production execution approval이 확인되기 전에는 배포를 시작하지 말고, 승인된 window에서 host preflight를 완료한 뒤에만 실행한다. +BAT-058은 independent QC를 통과했고, REL-012 daemon rollout은 immutable payload [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61)로 완료됐다. 운영팀은 승인된 off-market window에서 preflight, clean checkout, approved supervisor restart, startup acceptance, `sync --all --dry-run`, `verify`를 완료했고 모두 PASS를 반환했다. 팀장은 release-specific primary record를 검토하여 `confirm-release`를 기록했다. 상세 결과는 [execution evidence](../releases/evidence/rel-012_20260717_execution-evidence.md)를 참조한다. ## 2. 배포 전 근거와 원본 | 순서 | Release | 배포 대상 source/artifact | 비운영 근거 | 실행 전 남은 gate | immutable 원본 링크 | | --- | --- | --- | --- | --- | --- | -| 1 | REL-012 / BAT-058 | [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) | QC-7: focused `113 passed`, full `833 passed, 47 skipped`; release-prep full regression `833 passed, 47 skipped`; focused Ruff/compileall PASS | production execution approval·window·host preflight (운영팀은 target SHA를 독립 재확인) | [commit 81a853a](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) | +| 1 | REL-012 / BAT-058 | [`81a853a`](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) | QC: focused `113 passed`, full `833 passed, 47 skipped`; release-prep full regression and Ruff/compileall PASS | **Completed:** production approval/window, host preflight, approved restart, dry-run/verify acceptance, and `confirm-release`; see execution evidence | [commit 81a853a](https://github.com/fourblocks2020/trex-core/commit/81a853a314391da7a8bc9df5517013c7fd296d61) | 원본 문서(현재 release candidate worktree):