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
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
APP=build/dd/Build/Products/Release/OpenSweep.app
lipo -archs "$APP/Contents/Helpers/opensweep" | grep -q "x86_64 arm64"
test "$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' "$APP/Contents/Info.plist")" = "${VERSION#v}"
test "$("$APP/Contents/Helpers/opensweep" --version)" = "opensweep ${VERSION#v}"
codesign --verify --deep --strict --verbose=2 "$APP"
# It must start: a library macOS refuses to load ends it at once.
"$APP/Contents/MacOS/OpenSweep" & pid=$!; sleep 5; kill -0 $pid; kill $pid
Expand Down
10 changes: 5 additions & 5 deletions OpenSweep.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
shellScript = "set -euo pipefail\n# ADR 0005: the app runs the engine binary bundled next to its own executable.\nexport PATH=\"$HOME/.cargo/bin:/opt/homebrew/opt/rustup/bin:/opt/homebrew/bin:/usr/local/bin:$PATH\"\ncd \"$SRCROOT/engine\"\n# Not Contents/MacOS: the file system ignores case, and opensweep would\n# replace the app's own OpenSweep executable.\nout=\"$TARGET_BUILD_DIR/$CONTENTS_FOLDER_PATH/Helpers/opensweep\"\nbins=()\nfor arch in $ARCHS; do\n case \"$arch\" in\n arm64) triple=aarch64-apple-darwin ;;\n x86_64) triple=x86_64-apple-darwin ;;\n *) echo \"error: no Rust target for $arch\"; exit 1 ;;\n esac\n cargo build --locked --release -p opensweep-cli --target \"$triple\"\n bins+=(\"target/$triple/release/opensweep\")\ndone\nmkdir -p \"$(dirname \"$out\")\"\nlipo -create \"${bins[@]}\" -output \"$out\"\nif [ -n \"${EXPANDED_CODE_SIGN_IDENTITY:-}\" ]; then\n ts=--timestamp=none\n # Notarization needs a secure timestamp; ad-hoc and Debug builds skip it.\n if [ \"$CONFIGURATION\" = Release ] && [ \"$EXPANDED_CODE_SIGN_IDENTITY\" != - ]; then ts=--timestamp; fi\n codesign --force --options runtime \"$ts\" --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" \"$out\"\nfi\n";
shellScript = "set -euo pipefail\n# ADR 0005: the app runs the engine binary bundled next to its own executable.\nexport PATH=\"$HOME/.cargo/bin:/opt/homebrew/opt/rustup/bin:/opt/homebrew/bin:/usr/local/bin:$PATH\"\ncd \"$SRCROOT/engine\"\n# The engine reports the app's version (opensweep --version).\nexport OPENSWEEP_VERSION=\"$MARKETING_VERSION\"\n# Not Contents/MacOS: the file system ignores case, and opensweep would\n# replace the app's own OpenSweep executable.\nout=\"$TARGET_BUILD_DIR/$CONTENTS_FOLDER_PATH/Helpers/opensweep\"\nbins=()\nfor arch in $ARCHS; do\n case \"$arch\" in\n arm64) triple=aarch64-apple-darwin ;;\n x86_64) triple=x86_64-apple-darwin ;;\n *) echo \"error: no Rust target for $arch\"; exit 1 ;;\n esac\n cargo build --locked --release -p opensweep-cli --target \"$triple\"\n bins+=(\"target/$triple/release/opensweep\")\ndone\nmkdir -p \"$(dirname \"$out\")\"\nlipo -create \"${bins[@]}\" -output \"$out\"\nif [ -n \"${EXPANDED_CODE_SIGN_IDENTITY:-}\" ]; then\n ts=--timestamp=none\n # Notarization needs a secure timestamp; ad-hoc and Debug builds skip it.\n if [ \"$CONFIGURATION\" = Release ] && [ \"$EXPANDED_CODE_SIGN_IDENTITY\" != - ]; then ts=--timestamp; fi\n codesign --force --options runtime \"$ts\" --sign \"$EXPANDED_CODE_SIGN_IDENTITY\" \"$out\"\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -380,7 +380,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 0.4.0;
MARKETING_VERSION = 0.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.finjineers.opensweep;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
Expand Down Expand Up @@ -417,7 +417,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 0.4.0;
MARKETING_VERSION = 0.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.finjineers.opensweep;
PRODUCT_NAME = "$(TARGET_NAME)";
REGISTER_APP_GROUPS = YES;
Expand All @@ -439,7 +439,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 0.4.0;
MARKETING_VERSION = 0.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.finjineers.opensweep.uitests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
Expand All @@ -457,7 +457,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 0.4.0;
MARKETING_VERSION = 0.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.finjineers.opensweep.uitests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
Expand Down
8 changes: 8 additions & 0 deletions docs/GAP-REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ owner: R1, R3, R5, P7; C2 stays a toolchain.
| G5 | No docs site or screenshots (M5) | See commit history |
| G6 | Light palette and Reduce Motion unchecked after the solid-canvas redesign | Walkthrough takes `OPENSWEEP_QA_APPEARANCE` |

## Third pass (21 Nov 2026, v0.2.0)

R1 closed: CI runs again and is green on `main`, UI tests included. R4 and R5
in part: the Sparkle key is set, releases need the owner's approval, `v*`
tags are protected, and `cargo audit` runs in CI. Open: R3 (trademark
search), R5 (20-tester beta, usability pass), R6 (release-build timing), P7
(original character). Developer ID stays off by choice.

## 1. Product gaps (the idea is not delivered without these)

| # | Gap | Evidence | Proposal |
Expand Down
58 changes: 46 additions & 12 deletions docs/HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ audit test, hardened runtime and notarization in the Release workflow, Sparkle
updates, and a Homebrew cask. Since 20 Nov 2026 the repository is public and
ships without Apple Developer ID (owner's choice): ad-hoc signed, normal
releases, the tap `Finjineersdev/homebrew-tap` updates itself, the owner's
icon is in. Left for the owner: the Sparkle key (`docs/RELEASING.md`).
icon is in. The Sparkle key is set (21 Nov 2026).
- Renamed AgentClean to OpenSweep on 20 Nov 2026: another Mac app already
sells as "AgentClean". The engine adopts an old `AgentClean` data folder
once (I22). A first-pass check of "OpenSweep" found no trademark but
Expand All @@ -138,13 +138,42 @@ menus' press action, and contrast findings the element's own pixels disprove
- 20 Nov 2026: the drifting gradient backdrop was replaced by a solid canvas
(owner's call: "premium, not cheap"); motion is calmer, see `Motion.swift`.

### v0.2.0 (released 21 Nov 2026)

Pull request #1 merged the M5 work and a code and security review; tagged
`v0.2.0`, published with a signed update feed, and the tap updated.

- App: space flow (Sankey) on Overview, which now fills wide windows; cache
map (treemap) on Caches; keyboard navigation in Projects; switches for the
character and update checks; README screenshots in light and dark.
- Engine: `shared` sizes (hard links, pnpm and bun stores, F8); skipped
folders refused by macOS privacy protection have the reason `protected`.
- Security: move and restore go through open folder handles (`rustix`, no
`unsafe`), closing the reverify-to-rename race and the restore that could
replace an empty folder; a bad commit date no longer crashes a scan; folders
a repository keeps are protected inside cleanable folders; relative PATH
entries are ignored; the quarantine store must be the user's own and
owner-only; a timed-out cache tool is stopped with its process group;
`OPENSWEEP_BIN` is Debug-only; Dev Stack never offers a command built from
a name with shell characters. Each has a test that fails without it.
- Releases: the job runs in the `release` environment (owner's approval,
`v*` tags only, signing secrets live there); a tag rule lets only an admin
create, move or delete `v*` tags (`scripts/protect-releases.sh`).
`cargo audit` runs on every engine change and weekly. The engine reports
the app's version (`opensweep --version`).
- Verified: engine checks on macOS and Linux, 21 CleanCore tests, 13 UI tests
on macOS 26 locally and macOS 15 in CI, the walkthrough (33/33) in dark and
light, the update signature against v0.1.0's key, build provenance.

## 5. Known gaps and risks

| Gap | Where it gets fixed |
| --- | --- |
| Projects on network drives, and on drives without Unix permissions (exFAT, FAT), are skipped | ADR 0004 |
| GitHub Actions not pinned to commit SHAs | Before first release |
| Signing, notarization, Sparkle keys and the Homebrew tap need the owner's Apple and GitHub accounts | Owner, `docs/RELEASING.md` |
| Ad-hoc signed, not notarized (owner's open-source choice): first launch needs right-click → Open, and the hardened runtime is off | Developer ID secrets in the `release` environment, `docs/RELEASING.md` |
| The character is Open Peeps (CC0 stock), not original (P7) | Owner |
| No lawyer's trademark search for "OpenSweep" yet | Owner |
| The project walk is single-threaded (about 43 s for a whole disk in a debug build) | Measure a release build first (R6) |
| UI tests need macOS automation mode; on a developer Mac run `sudo automationmodetool enable-automationmode-without-authentication` once (CI runners have it) | Owner's Mac |

## 6. Roadmap
Expand All @@ -158,15 +187,20 @@ menus' press action, and contrast findings the element's own pixels disprove

## 7. Next session

The gap review of 20 Nov 2026 (`docs/GAP-REVIEW.md`) lists what is still
missing against the idea, with a suggested order; start there.

1. Run the engine checks from `CLAUDE.md`, `cd CleanCore && swift test`, and
`scripts/check-swift-never-deletes.sh`; all should pass.
2. Build the app and run the Debug walkthrough in `QA-CHECKLIST.md`.
3. If the owner has added the release secrets, tag `v0.4.0-beta.1` and check
the release installs on a clean Mac. Otherwise start M5 (scheduled clean,
Docker and AI model stores, review-only).
v0.2.0 is out and every code gap in `docs/GAP-REVIEW.md` is closed. What is
left is the beta (M4's exit criteria) and the owner's items.

1. Run the engine checks from `CLAUDE.md`, `cd CleanCore && swift test`,
`scripts/check-swift-never-deletes.sh`, then the Debug walkthrough in
`QA-CHECKLIST.md`; all should pass.
2. Beta: at least 20 testers through the Homebrew cask, and a five-developer
usability pass (F13). Collect issues; no open severity-one bugs to exit.
3. Measure a whole-disk scan in a release build (R6); parallelise per root
only if it is slow.
4. Owner: an original character (P7), a trademark search, and Developer ID
if the first-launch step puts testers off.
5. Release with `docs/RELEASING.md`; set `MARKETING_VERSION` to the released
version afterwards.

## 8. Facts worth keeping

Expand Down
11 changes: 6 additions & 5 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Releasing OpenSweep

1. Make sure `main` is green (CI and engine workflows).
2. Tag and push. The tag sets the version; `MARKETING_VERSION` in the project
is only the default for local builds.
2. Tag and push. The tag sets the version of the app and of its engine
(`opensweep --version`); `MARKETING_VERSION` in the project is only the
default for local builds, so set it to the version you just released.
```bash
git tag -a v0.4.0 -m "OpenSweep 0.4.0"
git push origin v0.4.0
git tag -a v0.3.0 -m "OpenSweep 0.3.0"
git push origin v0.3.0
```
A tag with a suffix (`v0.4.0-beta.1`) is published as a pre-release, which
A tag with a suffix (`v0.3.0-beta.1`) is published as a pre-release, which
the update feed and the cask skip.
3. Approve the run: the release job waits in the `release` environment
until you approve it under Actions (one click).
Expand Down
10 changes: 9 additions & 1 deletion engine/crates/opensweep-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,18 @@ use serde_json::{json, Value};
/// Version of every JSON shape this binary prints.
const SCHEMA_VERSION: u32 = 1;

/// The app's version when built inside it (the Xcode build passes
/// `MARKETING_VERSION`, which a release takes from its tag); the crate's own
/// version for a plain `cargo build`.
const VERSION: &str = match option_env!("OPENSWEEP_VERSION") {
Some(v) => v,
None => env!("CARGO_PKG_VERSION"),
};

#[derive(Parser)]
#[command(
name = "opensweep",
version,
version = VERSION,
about = "Reclaim disk space from developer projects, safely"
)]
struct Cli {
Expand Down
Loading