Skip to content

fix: bound Inventory failure feedback - #195

Draft
seonghobae wants to merge 28 commits into
fix/release-artifact-windows-namespace-v1from
fix/inventory-error-privacy-v1
Draft

fix: bound Inventory failure feedback#195
seonghobae wants to merge 28 commits into
fix/release-artifact-windows-namespace-v1from
fix/inventory-error-privacy-v1

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Purpose

Prevent arbitrary backend exception text, stale prior Inventory evidence, and silent advisory failures from crossing the desktop boundary while preserving existing inventory, rules, model, ontology, summary, persistence, network, filesystem, and release authority.

Current authority — 2026-09-05 KST

  • protected main: 0e90f9cebadbd7f59606baaec4ca1d2f178c899a;
  • canonical release/Test parent fix: verify Windows release artifact namespace #264: 3e33229b4157a084a1985a1c7e952f98a64f25e3;
  • exact fix: bound Inventory failure feedback #195 head: d04f97c351042d185a475b519537f4da6cf153f6;
  • non-force restacked onto exact current fix: verify Windows release artifact namespace #264 after inspecting its two contract-test-only changes;
  • semantic delta remains exactly four files: src/lib/Inventory.svelte, src/lib/inventoryErrorPrivacyContract.test.ts, src/lib/inventoryInsightPolicy.ts, and src/lib/inventoryInsightPolicy.test.ts. Release/Test source is inherited rather than copied;
  • Draft. Fresh exact-head gates are required; predecessor evidence does not transfer.

Behavior and privacy contract

Async writes are bound to both request generation and scanned-root identity, preventing an older inventory/advisory/summary response from overwriting a newer root. Replacement loads clear stale inventory, summary, advisory, ontology, and error evidence before contacting the backend. Unknown-extension reasoning remains bounded and advisory only. Inventory failure mapping is operation-specific and path-free; arbitrary backend text is not rendered into the customer surface.

Settings, ontology, model, filesystem, and release authority remain with their existing owners; this PR does not absorb those domains.

Required before integration

Keep Draft until #264 is integrated or equivalently present on protected lineage and one unchanged exact #195 head satisfies every applicable native/central Test/Release/Security/SAST/CodeQL/OSV/Scorecard/review/ruleset gate plus repository-wide exact owned-production coverage through #337. No self-approval, force-push, destructive rebase, gate weakening, administrative bypass, or predecessor-evidence transfer.

@coderabbitai

coderabbitai Bot commented Aug 12, 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: Pro Plus

Run ID: 481c103e-852e-4d08-b636-61d312844fbe

📥 Commits

Reviewing files that changed from the base of the PR and between a40bcd3 and 21756d4.

📒 Files selected for processing (4)
  • .github/scripts/verify-release-artifacts.sh
  • .github/workflows/release.yml
  • src/lib/Inventory.svelte
  • src/lib/releaseArtifactVerifierDirectoryContract.test.ts

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


📝 Walkthrough

Walkthrough

인벤토리 집계와 비동기 작업에 상태 초기화와 세대·루트 검사를 추가했습니다. 오류 메시지와 오류 표시를 분리하고 접근성 속성을 적용했습니다. 릴리스 아티팩트 검사를 플랫폼별 디렉터리로 제한하고 릴리스 작업에 검증 단계를 추가했습니다.

Changes

인벤토리 오류 처리

Layer / File(s) Summary
상태 및 오류 처리 계약
src/lib/inventoryInsightPolicy.ts, src/lib/inventoryInsightPolicy.test.ts
실패 종류별 메시지, 요청 최신성 검사와 미분류 확장자 요청 정책을 추가했습니다. 개인정보 보호와 정책 동작을 검증했습니다.
세대 검사를 적용한 비동기 로딩
src/lib/Inventory.svelte
루트 변경과 새 집계 시 이전 증거와 상태를 초기화합니다. 최신 루트와 세대의 집계, 인사이트와 요약 응답만 반영합니다.
오류 렌더링 및 계약 테스트
src/lib/Inventory.svelte, src/lib/inventoryErrorPrivacyContract.test.ts
오류를 alert 또는 warning으로 표시합니다. 요약과 온톨로지 결과를 오류 상태에 따라 조건부 렌더링합니다. 상태 초기화, 오류 분리와 최신성 검사를 검증합니다.

릴리스 아티팩트 검증

Layer / File(s) Summary
플랫폼별 아티팩트 디렉터리 검증
.github/scripts/verify-release-artifacts.sh
번들, CLI와 체크섬 검사를 각 플랫폼 디렉터리의 직접 파일로 제한했습니다. Windows 디렉터리 이름을 windows-2022로 갱신했습니다.
릴리스 검증 게이트 및 계약 테스트
.github/workflows/release.yml, src/lib/releaseArtifactVerifierDirectoryContract.test.ts
attest-release 작업이 SBOM 생성 전에 아티팩트 계약을 검증합니다. 플랫폼별 파일 배치, 중첩 디렉터리와 검증 순서를 테스트합니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Merge Risk: 🔴 Critical · up to 21756

The change narrows customer-visible Inventory error feedback and prevents stale inventory results, but the commit remains blocked by a failed required release verification gate, missing required approval and coverage requirements, plus a bounded concurrency issue that can leave an outdated warning visible after a newer success.

Sequence Diagram(s)

sequenceDiagram
  participant Inventory as Inventory.svelte
  participant Policy as inventoryInsightPolicy
  participant API as Inventory API
  Inventory->>Policy: 요청 루트와 세대 검사
  Policy->>API: 유효한 집계 또는 인사이트 요청
  API-->>Inventory: 비동기 결과 또는 오류 반환
  Inventory->>Inventory: 최신 결과만 상태에 반영
  Inventory-->>Inventory: 오류 유형별 메시지와 경고 표시
Loading
sequenceDiagram
  participant ReleaseWorkflow as attest-release
  participant ArtifactSet as release-artifacts
  participant Verifier as verify-release-artifacts.sh
  ReleaseWorkflow->>ArtifactSet: 릴리스 아티팩트 다운로드
  ReleaseWorkflow->>Verifier: 디렉터리와 run_attempt 전달
  Verifier->>ArtifactSet: 플랫폼별 파일과 체크섬 검사
  ArtifactSet-->>Verifier: 검증 결과 반환
  Verifier-->>ReleaseWorkflow: 성공 또는 실패 반환
  ReleaseWorkflow->>ReleaseWorkflow: 검증 후 SBOM 생성
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 54.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 5 files. (2 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 제목은 Inventory 오류 피드백을 제한하는 핵심 변경을 정확히 설명하며, PR의 주요 목적과 일치합니다.
Full details: Docstring Coverage

Explanation

Docstring coverage is 54.55% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 5 files. (2 skipped: 2 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 fix/inventory-error-privacy-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.

@seonghobae
seonghobae marked this pull request as ready for review August 14, 2026 09:19
@seonghobae
seonghobae marked this pull request as draft August 14, 2026 20:19
@seonghobae
seonghobae marked this pull request as ready for review August 15, 2026 06:09
@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

devin-ai-integration[bot]

This comment was marked as resolved.

summarizeUnknown() had no generation guard, unlike the sibling
reasonUnknownExtensions() fire-and-forget call. Triggering a new
inventory load() while a prior summarize call was still in flight let
the stale response overwrite summary/summaryError with data computed
from the previous report. Capture the load generation at call start
and gate every state write (success, failure, and the busy/loaded
finally block) on it still being current; also reset summaryBusy in
load() so a superseded summarize can't leave the button permanently
disabled.

Addresses a reviewer finding on PR #195.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior labels Aug 22, 2026
@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 01:03
@seonghobae
seonghobae marked this pull request as draft August 24, 2026 06:11
auto-merge was automatically disabled August 24, 2026 06:11

Pull request was converted to draft

@seonghobae
seonghobae marked this pull request as ready for review August 27, 2026 22:06
@seonghobae
seonghobae marked this pull request as draft August 27, 2026 23:07
devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae marked this pull request as ready for review August 28, 2026 01:06
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@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 2 new potential issues.

Devin Review

Comment thread src/lib/Inventory.svelte
async function summarizeUnknown() {
const root = scannedRoot;
if (!root) return;
const generation = loadGeneration;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: Summary staleness guard reuses the current generation

summarizeUnknown captures const generation = loadGeneration without incrementing, tying the summary to the current load. A later load() or root change bumps loadGeneration and clears summary state, so any in-flight summary is discarded rather than shown against a newer report.

Devin Review

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

Comment thread src/lib/Inventory.svelte
Comment on lines 116 to 120
} finally {
busy = false;
if (generation === loadGeneration) {
busy = false;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📝 Info: busy cannot remain stuck

The finally clears busy only when generation === loadGeneration. The generation diverges only through the root-change $effect, which itself sets busy = false, or a fresh load(), which the disabled button blocks while busy. So busy always resolves to false.

Devin Review

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

@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/lib/Inventory.svelte
} catch {
} catch (error) {
model = null;
modelStatusError = inventoryFailureMessage("model-status", error);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Stale model failure survives download

When startup status finishes after a post-download check, loadModel overwrites the newer result. A successful download can appear missing or failed.

Prompt for agents
Add request freshness tracking for model-status calls in src/lib/Inventory.svelte. The mount effect and doDownload can run loadModel concurrently; an older success or failure can overwrite the status returned after download. Bind model and modelStatusError writes to the latest model-status request, while preserving modelBusy and modelError behavior.
Devin Review

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

Preserve the four-file Inventory privacy/async-state delta while adopting canonical #264 release and hosted-runner prerequisite changes through ancestry only.

No release/workflow source is copied into the Inventory owner.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae changed the base branch from main to fix/release-artifact-windows-namespace-v1 September 4, 2026 16:07
@seonghobae
seonghobae marked this pull request as draft September 4, 2026 16:07
seonghobae added a commit that referenced this pull request Sep 4, 2026
Record the freshly repaired #190 and #195 stacks, including the Settings durable-state review findings and non-terminal exact-head evidence, without moving runtime authority into documentation.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae seonghobae added the bug Something isn't working label Sep 7, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium Normal-priority or P2 work status: blocked Blocked by conflict, dependency, or required prerequisite type: bug Defect or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant