# REQ-023: Daemon Registry 관리 경로 - Status: Approved - Type: Interface - Priority: High - Owner: repository-maintainers ## Intent - service-token issue/rotate가 기존 daemon에만 binding할 수 있으려면, daemon을 사전에 생성·수정할 수 있는 별도 관리 경로(daemon registry CRUD)가 필요하다. - daemon provisioning은 service-token issuance와 분리된 경로에서 수행되어야 하며, REQ-005(issuance binding)와 REQ-012(rotate daemon_id 유지)의 전제 조건이 된다. ## Requirement - 시스템은 daemon을 생성·수정할 수 있는 별도 관리 경로를 제공해야 한다. - daemon은 owner user 내에서 unique한 `daemon_slug`(lowercase kebab-case)와 `daemon_display_name`(non-empty human-readable label)을 가진다. - 동일 owner user 내에서 중복 `daemon_slug`로 생성 시 명시적으로 거부한다. - daemon list 조회는 owner user 범위로 제한된다. ## Acceptance Criteria 1. Given admin context에서 유효한 `daemon_slug`와 `daemon_display_name`으로 daemon create를 호출할 때, Then 새 daemon entry가 registry에 생성되고 `daemon_id`가 반환된다. 2. Given 기존 daemon에 대해 `daemon_display_name` 수정을 요청할 때, Then daemon entry가 갱신된다. 3. Given 동일 owner user 내에 이미 존재하는 `daemon_slug`로 daemon create를 요청할 때, Then 명시적 오류로 거부되고 중복 entry가 생성되지 않는다. 4. Given daemon list 조회를 요청할 때, Then 인증된 user 소유의 daemon만 반환된다. ## Impacted Area - Docs: `docs/interface-contract.md`, `docs/runtime-flows.md` - Modules: `app/domain/models.py`, `app/repositories/postgres.py`, `app/api/auth_routes.py` 또는 별도 daemon management route, `app/cli/commands/` (daemon subcommand 신규) - Tests: 신규 `tests/test_daemon_registry.py` ## Notes - service-token issuance의 unknown daemon 거부(REQ-005 AC-6), rotate daemon_id 유지 불변식(REQ-012 CHG-20260513-01)은 이 REQ의 daemon registry가 사전 구축된 상태를 전제한다. - daemon registry CRUD의 구체적인 transport 형태(HTTP endpoint vs CLI subcommand)는 구현 시 결정한다. - canonical 운영 표기: `/` ## Change Log ### CHG-20260513-02 - Date: 2026-05-13 - Author: repository-maintainers #### Change Summary - Status: Proposed → Approved (confirm-req 게이트 통과) #### Intent - 필수 필드, AC, blocker 없음 확인 후 승인 전환 #### Acceptance Criteria Delta - Added: 없음 - Updated: 없음 - Removed: 없음 #### Impacted Area Delta - Docs: 없음 - Modules: 없음 - Tests: 없음 #### Delivery Trace Delta - Batches: 미정 - Releases: 미정 #### Revalidation Impact - Reverification Needed: no - Existing Implementation Invalidated: no - Status Recommendation: keep-current - Follow-up Action: 없음 #### Validation Plan - 없음 (상태 전환만) ### CHG-20260513-01 - Date: 2026-05-13 - Author: repository-maintainers #### Change Summary - dcy-006 FR-1의 daemon provisioning 관리 경로 부분만 추출해 신규 생성 (issuance binding·rotate invariant·fail-closed는 REQ-005/012/006/008에 이미 반영) #### Intent - service-token issuance(REQ-005)와 rotate(REQ-012)의 전제가 되는 daemon registry CRUD 경로를 별도 REQ로 정의 #### Acceptance Criteria Delta - Added: - AC-1~4 전체 신규 추가 - Updated: 없음 - Removed: 없음 #### Impacted Area Delta - Docs: `docs/interface-contract.md`, `docs/runtime-flows.md` - Modules: daemon registry route, CLI subcommand - Tests: `tests/test_daemon_registry.py` #### Delivery Trace Delta - Batches: 미정 - Releases: 미정 #### Revalidation Impact - Reverification Needed: no - Existing Implementation Invalidated: no - Status Recommendation: keep-current - Follow-up Action: 없음 (신규 REQ) #### Validation Plan - pytest로 daemon create/duplicate reject/update/list 시나리오 통과 확인