-
Notifications
You must be signed in to change notification settings - Fork 0
fix: distinguish failed Homebrew cleanup status #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
16
commits into
main
Choose a base branch
from
fix/brew-cleanup-nonzero-status-v1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b8f346b
test: reject successful wording for failed Brew cleanup
seonghobae 52f27f1
fix: distinguish failed Brew cleanup execution
seonghobae b5bb7e7
test: keep Brew status semantics with frontend contracts
seonghobae f748769
test: avoid duplicate cross-layer Brew status contract
seonghobae 635d918
test: cover Brew cleanup execution result states
seonghobae 6678f78
Merge branch 'main' into fix/brew-cleanup-nonzero-status-v1
opencode-agent[bot] a990290
fix: gate Homebrew success styling on execution
seonghobae 2a98451
fix: converge Homebrew status and privacy feedback (#209)
seonghobae 2cf610f
test: bound BrewCleanup execution block contract
seonghobae 1e95840
fix: restore actionable iCloud eviction states
seonghobae 0f2705d
fix: bind cleanup status to calibration evidence
seonghobae 1ada64a
fix: mark skipped cleanup execution as warning
seonghobae 288904f
Merge branch 'main' into fix/brew-cleanup-nonzero-status-v1
opencode-agent[bot] 8809e6c
Merge branch 'main' into fix/brew-cleanup-nonzero-status-v1
opencode-agent[bot] 66d7aa7
Merge branch 'main' into fix/brew-cleanup-nonzero-status-v1
opencode-agent[bot] 6052212
fix: forward-merge main into brew-cleanup-nonzero-status and moderniz…
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| import { readFileSync } from "node:fs"; | ||
| import { dirname, resolve } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { describe, expect, it } from "vitest"; | ||
|
|
||
| const repositoryRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../.."); | ||
|
|
||
| function readSource(path: string): string { | ||
| return readFileSync(resolve(repositoryRoot, path), "utf8"); | ||
| } | ||
|
|
||
| describe("BrewCleanup privacy-safe failure feedback", () => { | ||
| it("never renders arbitrary backend exception text", () => { | ||
| const source = readSource("src/lib/BrewCleanup.svelte"); | ||
| const evictionSource = readSource("src/lib/IcloudLocalEviction.svelte"); | ||
|
|
||
| expect(source).not.toContain("String(e)"); | ||
| expect(source).not.toContain("record_error"); | ||
| expect(source).not.toContain("저장하지 못했습니다: {"); | ||
| expect(source).not.toMatch(/\{execution\.record_error\}/); | ||
| expect(evictionSource).not.toContain("String(e)"); | ||
| expect(evictionSource).not.toContain("result_record_error"); | ||
| expect(evictionSource).not.toMatch(/\{eviction\.result_record_error\}/); | ||
| expect(evictionSource).toContain("파일 선택 창을 열지 못했습니다."); | ||
| expect(evictionSource).toContain("iCloud 로컬 사본 상태를 확인하지 못했습니다."); | ||
| expect(evictionSource).toContain("iCloud 로컬 사본 축출을 실행하지 못했습니다."); | ||
| expect(source).toContain("Homebrew 정리 계획을 만들지 못했습니다."); | ||
| expect(source).toContain("Homebrew 정리를 실행하지 못했습니다."); | ||
| expect(source).toContain('role=\"alert\"'); | ||
| }); | ||
|
|
||
| it("preserves the existing judgment and execution authority calls", () => { | ||
| const source = readSource("src/lib/BrewCleanup.svelte"); | ||
|
|
||
| expect(source).toContain("api.judgeBrewCleanup()"); | ||
| expect(source).toContain("api.executeBrewCleanup("); | ||
| expect(source).toContain("submittedJudgment.plan_fingerprint"); | ||
| expect(source).toContain("submittedJudgment.judgment_id"); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { readFileSync } from "node:fs"; | ||
| import { dirname, resolve } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; | ||
| import { describe, expect, it } from "vitest"; | ||
|
|
||
| const repositoryRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../.."); | ||
|
|
||
| describe("BrewCleanup execution status contract", () => { | ||
| it("does not style a non-executed zero-status response as success", () => { | ||
| const source = readFileSync(resolve(repositoryRoot, "src/lib/BrewCleanup.svelte"), "utf8"); | ||
|
|
||
| expect(source).toContain( | ||
| "class:success={execution.executed && execution.status_code === 0}", | ||
| ); | ||
| expect(source).toContain( | ||
| "class:error={execution.executed && execution.status_code !== 0}", | ||
| ); | ||
| expect(source).toContain("class:warning={!execution.executed}"); | ||
| expect(source).toContain("실행 성공"); | ||
| expect(source).toContain("실행 실패"); | ||
| expect(source).toContain("실행되지 않음"); | ||
| expect(source).toContain("execution.executed"); | ||
| expect(source).not.toContain("class:success={execution.status_code === 0}"); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.