Skip to content

feat: add evidence-bound native temp reclaim - #314

Draft
seonghobae wants to merge 47 commits into
fix/release-artifact-windows-namespace-v1from
feat/safe-temp-reclaim-plan
Draft

feat: add evidence-bound native temp reclaim#314
seonghobae wants to merge 47 commits into
fix/release-artifact-windows-namespace-v1from
feat/safe-temp-reclaim-plan

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Purpose

Add a bounded native temporary-artifact reclaim adapter without broadening DiskSage's permanent-deletion authority. This lane owns temp-root discovery, generated-artifact evidence, fresh per-candidate approval, and the adapter into the existing identity-bound Trash/journal boundary. Release/Test foundation remains owned by #264; canonical product-gap projection remains owned by #315.

Current authority — 2026-09-05 KST

Safety boundary and real mutation evidence

The adapter discovers bounded native temporary roots, including the macOS /tmp/private/tmp alias, and admits only independently marker-bound generated artifacts with complete identity/manifests and inactive-use evidence. Unknown entries, partial scans, symlinks, provider/Photos paths, and permanent deletion remain unavailable. Execution requires a fresh per-candidate backend approval phrase before entering the shared reversible Trash/journal boundary.

temp_reclaim_contract.rs retains a real Unix/non-macOS successful mutation fixture: it creates an actual marker-bound target, obtains the serialized exact approval phrase from the CLI plan, executes the shipped binary with that fingerprint/phrase, requires success, requires a previously absent journal path to become a file, and verifies the approved project/target no longer exists.

That fixture still does not prove end-to-end recovery/undo. It does not bind a recoverable Trash destination back to the original object identity, restore the object from Trash, verify restored bytes/descendants, or prove journal durability sufficient for recovery after interruption. Those capabilities belong at the shared safety/recovery boundary and must be consumed rather than reimplemented here.

Required before integration

Keep Draft until #264 is integrated or equivalently present on protected lineage and one unchanged #314 exact head satisfies every applicable native/central Test/Release/Security/SAST/CodeQL/OSV/Scorecard/review/ruleset gate. Preserve the successful real-filesystem move/journal fixture and add/consume canonical recovery acceptance proving the same reviewed object can be restored without pathname substitution or unrelated-child loss. No self-approval, force-push, destructive rebase, gate weakening, permanent deletion, or administrative bypass.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 0 new potential issues.

Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 0 new potential issues.

Devin Review

@seonghobae
seonghobae changed the base branch from main to fix/release-artifact-namespace-v2 August 29, 2026 20:15
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 0 new potential issues.

Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

This report is out of date. Scroll down for Devin Review's latest report on this PR.

Devin Review found 0 new potential issues.

Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae changed the base branch from fix/release-artifact-namespace-v2 to fix/release-artifact-windows-namespace-v1 September 3, 2026 07:04

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Devin Review

Comment thread src-tauri/src/temp_reclaim.rs Outdated
unavailable += 1;
continue;
}
let Some(artifact) = inspect_artifact(&path, observed_at_ms) else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Discovery deadline can overrun

When one manifest consumes most of the budget, inspect_artifact can start another three-second scan. Native temp planning can nearly double its advertised deadline.

Prompt for agents
The global 3.5-second discovery deadline in src-tauri/src/temp_reclaim.rs is checked before calling inspect_artifact, but inspect_artifact and artifact_manifest in src-tauri/src/dev_artifacts.rs always use a fresh independent three-second budget. A second candidate can begin inspection just before the global deadline and keep planning alive for almost another three seconds. Thread the remaining global deadline or a caller-supplied budget through the exact-artifact inspection path, while preserving the existing default budget for ordinary development-artifact scans. Add a regression with multiple slow manifests, not only a slow active-use probe.
Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

재현을 먼저 추가한 뒤 owner 경계에서 수정했습니다. cc76763631a694e0e4a433918803ac9c923b236f은 여러 실제 target 트리에 대해 caller budget이 소진되면 각 manifest가 fail-closed해야 한다는 RED 계약을 추가했고, 8ea5e84ee0d2f44456213308840161da5618882f은 ordinary scan의 기존 3초 기본값을 유지하면서 caller-supplied manifest budget API를 추가했습니다. f8d92e732f6382087d93cb0f1181cca65c859f43에서는 native-temp planner가 manifest와 active-use probe 모두에 동일한 3.5초 global budget의 남은 시간만 전달하도록 연결했습니다. fce82704d3f503fa6d8046b14ee909977846c11b은 wall-clock 임의 임계값 없이 소진된 budget이 모든 후보 manifest를 incomplete로 만드는 결정적 회귀로 정리했습니다. 현재 exact-head hosted GREEN은 아직 재취득 중이므로 thread는 그 증거 전까지 resolve하지 않습니다.

@seonghobae
seonghobae marked this pull request as draft September 3, 2026 09:58
Remove #314's duplicate ownership of docs/product-technical-gap-baseline.md by restoring the exact #264 parent blob. Native temporary-artifact runtime, ADR, tests, and CHANGELOG delta remain in this lane; #315 owns the current product-gap projection.

Signed-off-by: Seongho Bae <me@seonghobae.me>
seonghobae added a commit that referenced this pull request Sep 4, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant