Skip to content

feat: add ontology-backed parallel reclaim planning - #334

Draft
seonghobae wants to merge 208 commits into
feat/safe-temp-reclaim-planfrom
feat/ontology-parallel-reclaim-v1
Draft

feat: add ontology-backed parallel reclaim planning#334
seonghobae wants to merge 208 commits into
feat/safe-temp-reclaim-planfrom
feat/ontology-parallel-reclaim-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Purpose

Extend DiskSage reclaim planning with ontology-bound evidence and bounded cross-platform adapters while preserving deterministic safety authority. This lane owns the ontology-backed planning/adapter delta above #314; #314 remains the native-temp foundation, #264 remains the release/Test foundation, and #315 owns the canonical product-gap projection.

Current authority — 2026-09-05 KST

Product and DDD boundary

The lane binds reclaim evidence to DiskSage ontology classes and adds bounded planning for Colima, Podman volumes, OneDrive temporary files, stale Git clones, temporary artifacts, transparent compression, provider-local eviction, and platform process/filesystem evidence. Ontology or model output never becomes mutation authority: deterministic filesystem identity, active-use/materialization evidence, approval/fingerprint checks, and reversible recovery boundaries remain authoritative.

#338 separately owns ordered Test path-filter semantics. This branch owns only the additional platform jobs required by its adapter boundary and must continue to consume #338/#264 contracts rather than silently absorbing them.

Buyer-visible safety gap

Fail-closed planning and rejection tests are necessary but do not by themselves prove buyer-safe successful mutation. Each executable reclaim path requires realistic filesystem/process acceptance binding the same reviewed object through final mutation, rejecting symlink/reparse/hardlink/ancestor replacement races as applicable, producing durable journal/recovery evidence, and demonstrating undo/recovery without unrelated-data loss.

Required before integration

Keep Draft until #264 and #314 are integrated or equivalently present on protected lineage, one unchanged #334 exact head satisfies every applicable native/central Test/Release/Security/SAST/CodeQL/OSV/Scorecard/review/ruleset gate, and destructive/recovery acceptance is real rather than synthetic or rejection-only. No self-approval, force-push, destructive rebase, gate weakening, permanent user-file deletion, or administrative bypass.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 0f598f5b-0fba-4127-8a19-143266085e79

📥 Commits

Reviewing files that changed from the base of the PR and between 54df025 and 82f6a1b.

📒 Files selected for processing (11)
  • .github/workflows/test.yml
  • src-tauri/src/cloud_local_eviction_batch_public.rs
  • src-tauri/src/lib.rs
  • src-tauri/src/rules_ontology_contract_tests.rs
  • src-tauri/src/rules_public.rs
  • src-tauri/src/stale_git_clone_commands.rs
  • src-tauri/tests/colima_subprocess_timeout_contract.rs
  • src-tauri/tests/icloud_batch_provider_contract.rs
  • src-tauri/tests/stale_git_clone_disabled_ipc_contract.rs
  • src/lib/pull-request-evidence.contract.ts
  • src/lib/pull-request-evidence.d.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

디스크 재생 온톨로지와 파싱 필드가 추가되었습니다. Colima, Podman, Git 클론, 임시 파일, 압축 및 클라우드 eviction의 계획·승인 경로가 확장되었습니다. Tauri 명령, CLI, TypeScript API, 안전 처리와 릴리스 검증이 연결되었습니다.

Changes

재생 계약과 후보 메타데이터

Layer / File(s) Summary
온톨로지와 증거 계약
src-tauri/resources/ontology/default.ttl, src-tauri/src/ontology.rs
재생 자원 클래스와 reclaimPolicy, allowedAction, requiredEvidence 속성이 추가되었습니다.
후보 분류와 측정
src-tauri/src/rules.rs, src-tauri/src/dev_artifacts.rs, src-tauri/src/maven_cache.rs, src-tauri/src/git_worktree.rs
후보 결과에 온톨로지 분류와 측정 분류가 추가되었습니다. 캐시 목록과 병렬 디렉터리 측정이 확장되었습니다.

재생 구현

Layer / File(s) Summary
Colima와 Podman 재생
src-tauri/src/colima_reclaim.rs, src-tauri/src/podman_reclaim.rs, src-tauri/src/podman_reclaim_public.rs, src-tauri/src/podman_reclaim_contract.rs
Colima 캐시·이미지·볼륨·게스트 TRIM 계획과 실행이 추가되었습니다. Podman 이미지 병합, 빈 볼륨 정리와 승인 검증이 추가되었습니다.
임시 파일·Git 클론·압축
src-tauri/src/onedrive_temp_reclaim.rs, src-tauri/src/stale_git_clone.rs, src-tauri/src/temp_reclaim.rs, src-tauri/src/transparent_compression.rs, src-tauri/src/transparent_compression_public.rs
할당량, 활성 사용, PR 상태, 지문과 승인 문구를 확인하는 계획이 추가되었습니다. 실행 불가 경로는 fail-closed 결과를 반환합니다.

클라우드와 연결

Layer / File(s) Summary
클라우드 eviction과 안전 처리
src-tauri/src/cloud_local_eviction.rs, src-tauri/src/cloud_local_eviction_public.rs, src-tauri/src/cloud_local_eviction_batch.rs, src-tauri/src/main.rs, src-tauri/src/safety.rs
File Provider 상태 분기와 네이티브 helper 검증이 추가되었습니다. macOS staged 객체는 사용자 휴지통으로 이동할 수 있습니다. 저널 추가는 프로세스 내에서 직렬화됩니다.
Tauri와 TypeScript API
src-tauri/src/commands.rs, src-tauri/src/lib.rs, src/lib/api.ts
Colima와 stale Git clone 명령 및 invoke 래퍼가 추가되었습니다. 공개 모듈 경계가 분리되었습니다.

CLI와 검증

Layer / File(s) Summary
CLI 경계와 fail-closed 테스트
src-tauri/src/bin/*, src-tauri/tests/*
인자 검증, provider 경계, 부분 실행과 실행 불가 상태를 검증하는 테스트가 추가되었습니다.
릴리스 아티팩트 계약
.github/scripts/verify-release-artifacts.sh, .github/workflows/release.yml, src/lib/releaseArtifactVerifierDirectoryContract.test.ts
플랫폼별 릴리스 디렉터리와 파일 집합을 명시적으로 검증합니다. attest-release 단계에 검증 호출이 추가되었습니다.

Estimated code review effort: 5 (Critical) | ~120 minutes

Merge Risk: 🟠 High · up to 82f6a

This PR adds destructive reclaim planning and execution across several storage providers, but the current head still contains unresolved risks including a permission-check bypass, a race that can delete an unrelated trash destination, incorrect approval/execution behavior, possible hangs, and inaccurate reclaim sizing. These issues can cause data loss, security-boundary weakening, failed cleanups, or misleading plans, so the PR is not ready to merge without fixes or explicit acceptance.

Sequence Diagram(s)

sequenceDiagram
  participant Frontend
  participant TauriCommands
  participant ReclaimModule
  participant FilesystemOrProvider
  Frontend->>TauriCommands: inspect 또는 execute 호출
  TauriCommands->>ReclaimModule: 경로·프로필·승인 정보 전달
  ReclaimModule->>FilesystemOrProvider: 증거 수집 및 상태 확인
  ReclaimModule->>FilesystemOrProvider: 승인된 재생 명령 실행
  FilesystemOrProvider-->>ReclaimModule: 실행 결과와 사후 상태 반환
  ReclaimModule-->>TauriCommands: 계획 또는 실행 결과 반환
  TauriCommands-->>Frontend: JSON 결과 반환
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 57.51% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 386 functions across 62 files. (1 skipped… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 온톨로지 기반 병렬 재확보 계획 기능 추가라는 PR의 핵심 변경을 정확하고 간결하게 설명합니다.
Full details: Docstring Coverage

Explanation

Docstring coverage is 57.51% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 386 functions across 62 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ontology-parallel-reclaim-v1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as draft September 3, 2026 07:05
@seonghobae
seonghobae dismissed cwl-noema-review[bot]’s stale review September 3, 2026 14:01

Superseded by the current head 39cef1f. The blocking release-runner mismatch from reviewed head e8f67d5 is no longer present: the current release workflow explicitly uses windows-2022, matching verify-release-artifacts.sh's release-disksage-windows-2022-* contract. The OneDrive defensive thread referenced by that review is also resolved on the current PR state. Dismissing this stale changes-requested review does not constitute approval; current-head checks/reviews remain authoritative.

Adopt exact #314 after it delegated the product-gap baseline to canonical docs owner #315. Preserve #334's ontology/platform runtime and Test delta while removing the duplicate product-gap projection from this runtime lane.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae seonghobae removed the status: needs-review Open pull request requiring current-head review or checks label Sep 6, 2026
@seonghobae seonghobae added the status: draft Draft pull request label Sep 6, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: high High-priority or P1 work status: draft Draft pull request type: feature New or expanded product capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant