Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DevGuard centralizes resource admission for development workloads while preserving the resources needed to inspect and stop them.

The repository implements **DG-0 contracts and a durable authority core** and **DG-1**, whose macOS SLO is qualified for release `0.1.0-5daee5d-b3fa569e` on the measured host and policy. C01 supplies canonical paths/bootstrap/storage checks; C02 supplies authenticated, bounded local communication with a small client and private credential-FD transfer; C03 supplies the native macOS boot clock, process identity and host pressure evidence that activate the service's journal; C04 supplies cooperative QoS/nice application with readback and observed process-group scope evidence; C05 supplies registration over the wire and the fenced `devguard-launch` helper; C06 supplies reconciliation, and with native evidence the service opens all three; C07 supplies the `devguard` command-line owner with doctor diagnostics, receipts and explicit bounded waits; C08 supplies the Cargo adapters, which fit compiler jobs to the reservation and share one jobserver; C09 installs a packaged release as the current user's LaunchAgent, selected only after launchd is verified to run it; C10 supplies parent leases, whose children are admitted only against the lease, and candidate authorities bounded by them; C11 supplies upgrade and repair that drain charged work, back up the journal and verify the new release before admission reopens; C12 supplies the SLO qualification harness: a control probe, bounded workloads and a foreground browser fixture measured under a fixed protocol, with promotion of a qualified release. PR and post-merge main delivery evidence is tracked separately from implementation. Linux cgroups are not yet available. Use the operating guide for actual command availability; the design also contains future interfaces.
The repository implements **DG-0 contracts and a durable authority core** and **DG-1**, whose macOS SLO is qualified for release `0.1.0-6e7e065-94d85365` on the measured host and policy. C01 supplies canonical paths/bootstrap/storage checks; C02 supplies authenticated, bounded local communication with a small client and private credential-FD transfer; C03 supplies the native macOS boot clock, process identity and host pressure evidence that activate the service's journal; C04 supplies cooperative QoS/nice application with readback and observed process-group scope evidence; C05 supplies registration over the wire and the fenced `devguard-launch` helper; C06 supplies reconciliation, and with native evidence the service opens all three; C07 supplies the `devguard` command-line owner with doctor diagnostics, receipts and explicit bounded waits; C08 supplies the Cargo adapters, which fit compiler jobs to the reservation and share one jobserver; C09 installs a packaged release as the current user's LaunchAgent, selected only after launchd is verified to run it; C10 supplies parent leases, whose children are admitted only against the lease, and candidate authorities bounded by them; C11 supplies upgrade and repair that drain charged work, back up the journal and verify the new release before admission reopens; C12 supplies the SLO qualification harness: a control probe, bounded workloads and a foreground browser fixture measured under a fixed protocol, with promotion of a qualified release. PR and post-merge main delivery evidence is tracked separately from implementation. Linux cgroups are not yet available. Use the operating guide for actual command availability; the design also contains future interfaces.

- [Authoritative design reference](docs/design.md) · [Korean translation](docs/ko/design.md)
- [Historical approved design (Korean, immutable)](docs/design.ko.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/ko/planning/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

문서 기준일: 2026-09-22, 설계 개정 1로 2026-09-27 개정, 설계 개정 2로 2026-09-30 개정. 기준 저장소: `/Volumes/DevData/Projects/IdeaProjects/DevGuard`. 이 문서 집합은 승인 설계를 구현 가능한 작업·도입 gate·시험·PR 경계로 구체화한다. 영문 문서가 편집 정본이며 이 문서는 검토된 한국어 번역이다. CodeSpace 소비 안내도 영어·한국어를 함께 유지한다.

**계약 기준은 DG-0 회계·영속성·fake backend 시험이다.** DG-1은 완료되었다. 여섯 구현 PR로 C01~C12를 전달했고, 측정한 호스트와 정책에서 release `0.1.0-5daee5d-b3fa569e`의 macOS SLO qualification을 마쳤다. Linux 강제 보호와 CodeSpace 결합은 아직 qualification하지 않았다. 실제 이행 기록은 [DG-0](milestones/DG-0.md), 선택 근거와 immutable source는 [결정 기록](decisions.md)에 있다.
**계약 기준은 DG-0 회계·영속성·fake backend 시험이다.** DG-1은 완료되었다. 여섯 구현 PR로 C01~C12를 전달했고, 측정한 호스트와 정책에서 release `0.1.0-6e7e065-94d85365`의 macOS SLO qualification을 마쳤다. Linux 강제 보호와 CodeSpace 결합은 아직 qualification하지 않았다. 실제 이행 기록은 [DG-0](milestones/DG-0.md), 선택 근거와 immutable source는 [결정 기록](decisions.md)에 있다.

## 읽는 순서와 문서 소유권

Expand Down Expand Up @@ -43,7 +43,7 @@ DG-1은 독립 CLI/daemon·개발 workload·자기 적용을 검증한다. CS-RG
| 마일스톤 | 소유 | 예정 작업 commit 수 | 예정 PR 묶음 수 | 현재 구현 |
| --- | --- | --- | --- | --- |
| [DG-0](milestones/DG-0.md) | DevGuard | 실제 초기 commit 1개에 대한 이행 기록 | 과거 PR 재구성 없음 | 계약·fake backend 구현 |
| [DG-1](milestones/DG-1.md) | DevGuard | 12 | 6 | 구현(C01–C12); release `0.1.0-5daee5d-b3fa569e`에 대해 macOS SLO qualified |
| [DG-1](milestones/DG-1.md) | DevGuard | 12 | 6 | 구현(C01–C12); release `0.1.0-6e7e065-94d85365`에 대해 macOS SLO qualified |
| [CS-RG](milestones/CS-RG.md) | CodeSpace | 10 | 6 | 미착수 |
| [P1-RECOVERY](milestones/P1-RECOVERY.md) | CodeSpace | 6 | 3 | 미착수 |
| [DG-LINUX](milestones/DG-LINUX.md) | DevGuard + CodeSpace | 6 | 3 | 미착수; 전체 제품 필수 |
Expand Down
2 changes: 1 addition & 1 deletion docs/ko/planning/consumer-readiness.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> **상태: 구현 지시로서 효력 중지.** R3 CodeSpace runtime 항목과 CS-RG 단위를 인용한 gate는 효력이 중지된 CS-RG 작업에 의존하므로 구현 목표로 쓰지 않습니다. 나머지는 영향이 없습니다. CodeSpace 통합 계획에 대해 소유자가 지시한 검토인 CS-RG 통합 경계 재검증(작업 단위가 아닙니다)이 끝날 때까지 적용됩니다. 대체 구조는 승인되지 않았으며, 소유자가 재검증 결과를 검토한 뒤 결정합니다. 이 표기는 지시의 효력만 중지하며 어떤 안전 요구도 완화하지 않습니다. 아래 내용은 이력 추적을 위해 바꾸지 않고 남깁니다.

이 문서는 특정 언어나 제품에 독립적인 도입 gate다. DG-1은 측정한 호스트에서 release `0.1.0-5daee5d-b3fa569e`로 R2와 RS를 허용하며, R3에는 여전히 CS-RG가 필요하며, 그 첫 묶음 CSRG-P0은 CSP-D04가 전달된 뒤 시작한다([PR 전달](pr-delivery.md)). 실제 코드 경로를 대조한 소비자는 CodeSpace이며 다른 저장소의 구현 적합성까지 검증한 문서가 아니다. 구현 상태의 원본은 [milestones.json](../../../milestones.json), 선택 근거는 [decisions.md](decisions.md)다.
이 문서는 특정 언어나 제품에 독립적인 도입 gate다. DG-1은 측정한 호스트에서 release `0.1.0-6e7e065-94d85365`로 R2와 RS를 허용하며, R3에는 여전히 CS-RG가 필요하며, 그 첫 묶음 CSRG-P0은 CSP-D04가 전달된 뒤 시작한다([PR 전달](pr-delivery.md)). 실제 코드 경로를 대조한 소비자는 CodeSpace이며 다른 저장소의 구현 적합성까지 검증한 문서가 아니다. 구현 상태의 원본은 [milestones.json](../../../milestones.json), 선택 근거는 [decisions.md](decisions.md)다.

## 도입 수준

Expand Down
2 changes: 1 addition & 1 deletion docs/ko/planning/milestones/CS-RG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> **상태: 구현 지시로서 효력 중지.** 이 계획의 작업 단위, 특히 CSRG-C00·CSRG-C03·CSRG-C09와 이들이 전제한 CodeSpace 소유 관리형 실행 전송은 구현하지 않습니다. 다른 단위는 모두 CSRG-C00에 의존하므로 어떤 CS-RG 단위도 시작할 수 없습니다. CodeSpace 통합 계획에 대해 소유자가 지시한 검토인 CS-RG 통합 경계 재검증(작업 단위가 아닙니다)이 끝날 때까지 적용됩니다. 대체 구조는 승인되지 않았으며, 소유자가 재검증 결과를 검토한 뒤 결정합니다. 이 표기는 지시의 효력만 중지하며 어떤 안전 요구도 완화하지 않습니다. 아래 내용은 이력 추적을 위해 바꾸지 않고 남깁니다.
>
> *2026-10-12 현재 상태:* 소유자는 2026-10-02에 이 효력 중지와 별도로 CS-RG 구현을 CodeSpace의 U1–U6 단위로 지시했으며, 이 효력 중지는 이 계획의 단위에 계속 적용됩니다. U1과 그 보강, U2, U3, U4, U5는 병합·검증되었고 U6이 진행 중인 단위입니다. 2026-10-12부터 관리 PTY 실행도 관리 pipe 실행처럼 회수 전에 관찰하며, 고정된 Codex에 얹은 기록된 패치를 씁니다(novelKR/CodeSpace#93과 novelKR/CodeSpace#95, CodeSpace main `181a020`). 이는 2026-10-11 소유자의 선택입니다. 그 전까지 U5는 PTY 실행을 Codex가 회수한 뒤에만 관찰했습니다. 원장은 CS-RG를 `in-progress`, qualification `not-run`으로 기록합니다. 아래의 기준 상태는 시작하지 않은 이 계획의 단위에 대한 것입니다.
> *2026-10-13 현재 상태:* 소유자는 2026-10-02에 이 효력 중지와 별도로 CS-RG 구현을 CodeSpace의 U1–U6 단위로 지시했으며, 이 효력 중지는 이 계획의 단위에 계속 적용됩니다. U1과 그 보강, U2, U3, U4, U5는 병합·검증되었고 U6이 진행 중인 단위입니다. 2026-10-12부터 관리 PTY 실행도 관리 pipe 실행처럼 회수 전에 관찰하며, 고정된 Codex에 얹은 기록된 패치를 씁니다(novelKR/CodeSpace#93과 novelKR/CodeSpace#95, CodeSpace main `181a020`). 이는 2026-10-11 소유자의 선택입니다. 그 전까지 U5는 PTY 실행을 Codex가 회수한 뒤에만 관찰했습니다. 2026-10-13에는 설치된 release `0.1.0-6e7e065-94d85365`(CodeSpace의 DevGuard client pin `6e7e065`에서 빌드)의 DG-1 SLO를 CodeSpace의 `codespace` 소비자를 더한 정책에서 다시 측정했고, 그 release를 승격했습니다. U6은 이 release를 기준으로 CS-RG를 qualification합니다. 원장은 CS-RG를 `in-progress`, qualification `not-run`으로 기록합니다. 아래의 기준 상태는 시작하지 않은 이 계획의 단위에 대한 것입니다.

소유 저장소: CodeSpace. 상태: `not-started` / `not-run`. 진입: DG1-C12의 검증된 macOS 조합과 설계 개정 1의 CodeSpace 대응 문서 CSP-D04의 전달([PR 전달](../pr-delivery.md)). DG1-C12는 완료되었고, macOS qualification을 마친 release `0.1.0-5daee5d-b3fa569e`가 pin 후보다. 계약 검토·adapter 초안은 앞서 준비할 수 있지만 일상 `required` 소비 자격을 앞당기지 않는다. 완료: CSRG-C09의 backend 결정 뒤 남은 head에서 고정 client·artifact·wire 조합이 기존 권한/승인/workspace/PTY 계약과 관제 SLO를 함께 통과.

Expand Down
3 changes: 2 additions & 1 deletion docs/ko/planning/milestones/DG-1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DG-1 — macOS 개발 적용과 자기 적용

소유 저장소: DevGuard. 현재 구현 상태: `implemented`(C01–C12) / qualification: 측정한 호스트와 정책에서 release `0.1.0-5daee5d-b3fa569e`에 대해 macOS `qualified`, Linux `not-run`. 진입: DG-0 정확한 source의 계약 검증. 종료: 실제 macOS 실행·회수, generic/Cargo 소비, 상위 예산 안의 후보 시험, 독립 복구, 개발·foreground SLO를 통과한 artifact/정책/환경 조합 확보.
소유 저장소: DevGuard. 현재 구현 상태: `implemented`(C01–C12) / qualification: 측정한 호스트와 정책에서 release `0.1.0-6e7e065-94d85365`에 대해 macOS `qualified`, Linux `not-run`. 진입: DG-0 정확한 source의 계약 검증. 종료: 실제 macOS 실행·회수, generic/Cargo 소비, 상위 예산 안의 후보 시험, 독립 복구, 개발·foreground SLO를 통과한 artifact/정책/환경 조합 확보.

아래 ID·제목·PR 묶음은 **예정 값**이다. 실제 SHA나 GitHub PR 번호가 아니다. 모듈 경로는 구현 전까지 예정 책임을 나타낸다. 현재 daemon/client crate는 존재하며 launcher·platform-macos·cli·adapters는 후속 책임이다. crate 추가는 해당 PR에서 명시적 의존 allowlist와 전체 그래프 검증을 함께 확장하고 검사를 제거하지 않는다. 실제 상태는 ledger가 소유한다.

Expand Down Expand Up @@ -180,6 +180,7 @@ P1은 runtime을 닫아 두고 P2는 실제 probe, P3는 launch·안전 정리,
- 시험: generic/Cargo 동시 소비 정상; daemon/probe/후보 실패; 부하 중 취소·재시작·late helper; foreground와 standalone 조회/종료 지연 측정.
- 검증 명령: 현재 공통 회귀 + **제공** `python3 scripts/qualify.py dg1-macos --offline`. macOS 전용이며 다른 플랫폼은 `not_run`으로 기록한다. SLO가 아니라 harness를 검사한다. SLO protocol 자체는 **제공** `python3 scripts/measure.py macos --release ID ...`이다. 따로 비워 둔 시간에 대상 호스트의 설치 release에 대해 실행하며, 그 판정과 승격은 완료 증거로 기록한다. 실제 CodeSpace 결합은 CSRG-C08에서 수행한다.
- 결과: 2026-09-25~26에 harness `72c4220`으로 실행한 protocol-2가 release `0.1.0-5daee5d-b3fa569e`를 측정했다. 두 조합 모두 세 반복을 통과했다. 입력부터 다음 paint까지 p99는 최대 56 ms, 상태 p99는 최대 47 ms, 종료 확인 p99는 최대 67 ms였다. Frame 정지는 없었고, 부하 실행 1,408회는 연결 유실·불확실한 실행·중복 launch 없이 모두 성공했다. `measure.py promote`는 서비스가 그 release를 실행함을 확인한 뒤 qualification을 기록했다. 첫 실행 protocol-1은 harness 자신의 증거 기록 때문에 실패했으며, 분석과 함께 보존한다.
- 재측정: 2026-10-13에 같은 protocol을 harness `ea98d7f`(protocol-2와 같은 `measure.py`와 fixture)로 실행해, 업그레이드로 측정 release를 대체한 release `0.1.0-6e7e065-94d85365`(source `6e7e065`)를 CS-RG가 CodeSpace의 `codespace` 소비자를 더한 정책에서 측정했다. 두 조합 모두 세 반복을 통과했다. 입력부터 다음 paint까지 p99는 최대 56 ms, 상태 p99는 최대 46.2 ms였고, 종료 확인 p99는 idle 구간 하나에서 최대 167.9 ms, 나머지 구간에서 최대 77.1 ms였다. Frame 정지는 없었고, 부하 실행 1,370회는 연결 유실·불확실한 실행·중복 launch 없이 모두 성공했다. `measure.py promote`는 서비스가 그 release를 실행함을 확인한 뒤 qualification을 기록했고, 이 release가 이제 원장의 qualified release다.
- 완료 증거: source/artifact/policy/host 조합, 유효 baseline, 모든 원시 표본·p99·실패/거절/peak/처리량, 자기 적용 제한과 통과 범위.
- rollback: 기준 artifact로 신규 개발 진입을 전환하고 실패한 조합 승격을 취소; 보존된 증거는 삭제하지 않는다.
- 인계: CSRG-C01은 이 qualification 조합에서 pin 후보를 선정한다. DG-CACHE/DG-ADAPTERS도 이 결과 이후 시작하며 구현 완료와 플랫폼 자격은 별도 기록한다.
Expand Down
2 changes: 1 addition & 1 deletion docs/ko/planning/verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
| V-DOC-DG | 이번 DevGuard 문서/메타데이터 | checksum·license·ID·DAG·링크·48작업/25묶음·필수 항목·상태 보존 | 문서 검토 및 아래 재현 검사 가능 |
| V-DG0 | contract/core, DevGuard | Rust1.95.0 fmt/clippy·44개 계약·의존 graph·source fingerprint | 기존 validator 제공 |
| V-DG1-FUNCTION | 실제 auth/probe/launch/reconcile/CLI/운영 | DG1-C01~C11 정상·실패·경쟁 및 기능 artifact | C01 authority·C02 로컬 인증/transport·C03 native probe·C04 native scope 제공; 후속 범위는 각 묶음에서 제공 |
| V-DG1-SLO | 독립 CLI/daemon·개발·self-use | DG1-C12 개발/foreground 및 standalone control 측정 | 대상 호스트에서 release `0.1.0-5daee5d-b3fa569e`에 대해 qualified(protocol-2: cold·warm 각 세 반복 모두 통과, 승격); CS-RG 기능을 선행 요구하지 않음 |
| V-DG1-SLO | 독립 CLI/daemon·개발·self-use | DG1-C12 개발/foreground 및 standalone control 측정 | 대상 호스트에서 release `0.1.0-6e7e065-94d85365`에 대해 qualified(2026-10-13, CodeSpace의 `codespace` 소비자를 포함한 정책: cold·warm 각 세 반복 모두 통과, 승격). 2026-09-26의 protocol-2는 `0.1.0-5daee5d-b3fa569e`를 qualified로 기록; CS-RG 기능을 선행 요구하지 않음 |
| V-CS-DOC | CodeSpace 한·영 registry/site | paired hash·기존 docs tests·고정 환경 build·integrity·화면 검토 | 기존 명령 제공 |
| V-CS-UPSTREAM | CodeSpace 기존 Codex qualification | pin/policy/format/dependency/adapter/PTY/filesystem/platform gates | 기존 제공, 실제 platform별 수행 |
| V-CS-RG | CodeSpace 결합 | CSRG-C00 실행 경계 적합성, 한 프로세스 안의 혼합 실행을 포함한 C07 모드 동등성, C09 backend 결정, C08 승인·replay·관제 포화 SLO | 미구현 |
Expand Down
2 changes: 1 addition & 1 deletion docs/milestones.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The [detailed planning index](planning/README.md) owns the 48 proposed commit un
| Milestone | Deliverable and gate | Current implementation |
|---|---|---|
| DG-0 | Independent repository, approved design, resource and compatibility contracts, durable state transitions, fake-backend fault tests, reproducible 1.95.0 validation | Implemented; use the exact-source qualification report for validation status |
| DG-1 | Real macOS host probes, daemon and CLI, launch gate, Cargo/generic adapters, parent-budget candidate tests, safe service update/repair, three measured SLO runs per target backend | Implemented: C01 configuration/storage, C02 authenticated foreground transport, C03 native boot/process/pressure evidence, C04 cooperative policy/scope evidence, C05 fenced launch helper, C06 reconciliation, C07 command-line owner, C08 Cargo adapters, C09 installation as the current user's LaunchAgent, C10 parent leases with candidate authorities, C11 upgrade and repair and C12 the SLO qualification harness. The macOS SLO is qualified for release `0.1.0-5daee5d-b3fa569e` on the measured host and policy; Linux is not qualified |
| DG-1 | Real macOS host probes, daemon and CLI, launch gate, Cargo/generic adapters, parent-budget candidate tests, safe service update/repair, three measured SLO runs per target backend | Implemented: C01 configuration/storage, C02 authenticated foreground transport, C03 native boot/process/pressure evidence, C04 cooperative policy/scope evidence, C05 fenced launch helper, C06 reconciliation, C07 command-line owner, C08 Cargo adapters, C09 installation as the current user's LaunchAgent, C10 parent leases with candidate authorities, C11 upgrade and repair and C12 the SLO qualification harness. The macOS SLO is qualified for release `0.1.0-6e7e065-94d85365` on the measured host and policy (measured 2026-10-13, after `0.1.0-5daee5d-b3fa569e` on 2026-09-26); Linux is not qualified |
| CS-RG | Execution-boundary fitness (C00), full-SHA consumer pin, a common execution supervisor with pre-spawn slots and one reaper, PrepareExec/ExecPrepared, approval preservation, bounded control/data lanes, output and replay, InProcess/UDS and pipe/PTY parity, the legacy-backend decision (C09) and upstream regression qualification of the resulting head | In progress, not qualified: implemented in CodeSpace as the owner-directed units U1–U6 (2026-10-02), outside the suspended C-series plan. U1, its hardening, U2, U3, U4 and U5 are merged and verified (CodeSpace #82, #83, #84, #88, #90, #92); U6 is the active unit |
| P1-RECOVERY | Opt-in Gateway restart/reconnection while an independent Runner retains processes and I/O; reconcile workspace, approvals and DevGuard leases | Not started; depends on CS-RG; InProcess and Runner-loss I/O restoration excluded |
| DG-LINUX | Actual Linux controller, ancestor capacity, complete sandbox/proxy scope, control protection and reclaim evidence | Not started; required for product completion |
Expand Down
Loading