Skip to content

Prepare the plugin for its move into acyclic-labs/sdk - #24

Merged
ramstar3000 merged 1 commit into
mainfrom
sdk-main-fs
Sep 19, 2026
Merged

ramstar3000 merged 1 commit into
mainfrom
sdk-main-fs

Conversation

@ramstar3000

@ramstar3000 ramstar3000 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Step "PR 0.5" of the consolidation into acyclic-labs/sdk (the plugin becomes plugin/ there; sdk PR #99 lands the acyclic-fs fixes it depends on).

What changes, all validated by this repo's own CI:

  • acyclic-fs pinned to sdk PR #99's head (main line plus the Darwin unpaired-rename, subtree-removal and O_EXCL fixes). The guard forwards the new capture_host_subtree hook.
  • scripts/install.sh targets plugin-v* releases on acyclic-labs/sdk and reads the version from plugin/LATEST on main. product.toml gains release_tag_prefix; check-product-name.sh guards it.
  • Acceptance harness, ci-local.sh, docker-linux.sh, release-local.sh work in both layouts (workspace target dir, plugin crates only).
  • FUSE-T removed: pkg-config shim, rpath flag, CI installer step. The release binary does not link libfuse (checked with otool -L).
  • Edition 2024 and the sdk lint set (explicit unsafe allowance in one test, let chains, missing_docs allowances with reasons at the crate roots).
  • check-no-secrets.sh dropped in favour of the sdk's gitleaks and boundary scans; the Windows Authorization import is aliased so the sdk boundary scanner does not flag it.
  • Version 0.0.3.

Validation on macOS: cargo fmt --check, cargo clippy --workspace --all-targets --all-features -- -D warnings, cargo test --workspace, check-product-name.sh, check-code-quality.sh, and the full acceptance suite (run-all.sh, all 13 scripts green) against the pinned acyclic-fs.


Summary by cubic

Prepares the plugin for its move into acyclic-labs/sdk as plugin/ by making install, release, and local validation work in both the standalone repo and the sdk workspace. Installs now come from plugin-v* releases there, and macOS no longer requires FUSE-T.

Release and install

  • scripts/install.sh reads the version from plugin/LATEST on sdk main and uses release_tag_prefix from product.toml; check-product-name.sh guards it.
  • acyclic-fs is pinned to the sdk main line (Darwin unpaired-rename, subtree-removal, and O_EXCL fixes), and the guard forwards the new capture_host_subtree mount hook.
  • The store asks for barrier durability only on Apple targets, since the sdk now fails closed where F_BARRIERFSYNC is absent.
  • Version bumps to 0.0.3.

Validation and tooling

  • CI, docker, acceptance harness, and release-local.sh build, lint, and test only the plugin crates and find the cargo target dir in either layout.
  • FUSE-T installer, pkg-config shim, and rpath flag are removed; the release binary no longer links libfuse.
  • Crates move to edition 2024 and the sdk lint set, with explicit allowances for the env-mutating test and crate-root missing_docs.
  • check-no-secrets.sh is replaced by the sdk's gitleaks and boundary scans; the Windows Authorization import is aliased so the scanner does not flag it.

Written for commit e82be0b. Summary will update on new commits.

Review in cubic

@greptile-apps

greptile-apps Bot commented Sep 19, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 2/5

The PR is not yet safe to merge because turn limiting hides recent history, and the previously reported CI, release-path, and credential-scanning failures remain unresolved.

Findings

  1. P1 Wrong clean-checkout target
  2. P1 Security Credential scanning removed
  3. P2 Local deny checks narrowed
  4. P2 Relative target path misresolved
Fix with agent prompt
### Issue 1
scripts/ci-local.sh:21-22
In a clean standalone checkout, `$ROOT/target` does not exist when this initialization runs, so the fallback selects `$ROOT/../target`. The later Cargo build writes to `$ROOT/target`, but the acceptance suite is pointed at the parent directory and fails because it cannot find the binaries. Detect the SDK layout from workspace metadata instead of checking whether a target directory already exists.

### Issue 2
.github/workflows/ci.yml:65-78
This removes the repository's credential and forbidden-file scan without invoking the stated SDK replacement from this workflow. While this repository still handles pull requests and pushes to `main`, a committed credential or private-key file can therefore pass its CI and enter Git history.

**How this was verified:** The remaining deny job runs only product-name, code-quality, and cargo-deny checks after the sole credential-pattern scanner was deleted.

### Issue 3
scripts/ci-local.sh:undefined-56
Limiting this command to `licenses` omits the advisory, banned-package, and source-policy checks that GitHub CI still runs. A dependency with an allowed license but a known advisory, yanked version, or disallowed source can pass `ci-local.sh`, so local validation no longer reproduces CI.

```suggestion
step "cargo deny" cargo deny --locked check
```

### Issue 4
packaging/npm/release-local.sh:62-65
If `CARGO_TARGET_DIR` is relative and this script is invoked outside the repository, Cargo resolves the path from `$ROOT`, while the later `cp` resolves it from the caller's working directory. The release can then fail to find the built binary or copy a stale artifact from an unrelated directory. Normalize relative configured paths against `$ROOT` before using them.

```suggestion
target_dir() {
  if [ -n "${CARGO_TARGET_DIR:-}" ]; then
    case "$CARGO_TARGET_DIR" in
      /*) printf '%s\n' "$CARGO_TARGET_DIR" ;;
      *) printf '%s/%s\n' "$ROOT" "$CARGO_TARGET_DIR" ;;
    esac
    return
  fi
  (cd "$ROOT" && cargo metadata --no-deps --format-version 1) | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p'
}
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Summary

This PR prepares the plugin for migration into the SDK workspace and updates its release, installation, build, filesystem, and linting integration.

  • Pins the SDK filesystem dependency and forwards its new subtree-capture hook.
  • Supports standalone and SDK workspace layouts in release and validation scripts.
  • Moves installation to SDK plugin-v* releases and bumps the plugin to 0.0.3.
  • Removes the obsolete FUSE-T setup and adopts Rust 2024 plus the SDK lint configuration.
  • Adds recent CLI refinements, lease recording, and documentation for exclusion behavior.

Reviews (4) · Last reviewed commit: "Prepare the plugin for its move into acy..."

Comment thread scripts/ci-local.sh
Comment on lines +21 to +22
TARGET_DIR="${CARGO_TARGET_DIR:-$ROOT/target}"
[ -d "$TARGET_DIR" ] || TARGET_DIR="$ROOT/../target"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Wrong clean-checkout target

In a clean standalone checkout, $ROOT/target does not exist when this initialization runs, so the fallback selects $ROOT/../target. The later Cargo build writes to $ROOT/target, but the acceptance suite is pointed at the parent directory and fails because it cannot find the binaries. Detect the SDK layout from workspace metadata instead of checking whether a target directory already exists.

Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/ci-local.sh
Line: 21-22

Comment:
**Wrong clean-checkout target**

In a clean standalone checkout, `$ROOT/target` does not exist when this initialization runs, so the fallback selects `$ROOT/../target`. The later Cargo build writes to `$ROOT/target`, but the acceptance suite is pointed at the parent directory and fails because it cannot find the binaries. Detect the SDK layout from workspace metadata instead of checking whether a target directory already exists.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment thread .github/workflows/ci.yml
Comment on lines 65 to 78
@@ -74,8 +73,6 @@ jobs:
persist-credentials: false
- name: Product name is single-sourced (product.toml)
run: bash scripts/check-product-name.sh
- name: No forbidden files or credential patterns
run: bash scripts/check-no-secrets.sh
- name: Code quality (line width, TODO format, comment blocks, duplication)
run: bash scripts/check-code-quality.sh
- uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security Credential scanning removed

This removes the repository's credential and forbidden-file scan without invoking the stated SDK replacement from this workflow. While this repository still handles pull requests and pushes to main, a committed credential or private-key file can therefore pass its CI and enter Git history.

How this was verified: The remaining deny job runs only product-name, code-quality, and cargo-deny checks after the sole credential-pattern scanner was deleted.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/ci.yml
Line: 65-78

Comment:
**Credential scanning removed**

This removes the repository's credential and forbidden-file scan without invoking the stated SDK replacement from this workflow. While this repository still handles pull requests and pushes to `main`, a committed credential or private-key file can therefore pass its CI and enter Git history.

**How this was verified:** The remaining deny job runs only product-name, code-quality, and cargo-deny checks after the sole credential-pattern scanner was deleted.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment thread scripts/ci-local.sh
step "no secrets or forbidden files" bash scripts/check-no-secrets.sh
step "code quality (width, TODOs, comment blocks, duplication)" bash scripts/check-code-quality.sh
step "cargo deny" cargo deny --locked check
step "cargo deny" cargo deny --locked check licenses

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Local deny checks narrowed

Limiting this command to licenses omits the advisory, banned-package, and source-policy checks that GitHub CI still runs. A dependency with an allowed license but a known advisory, yanked version, or disallowed source can pass ci-local.sh, so local validation no longer reproduces CI.

Suggested change
step "cargo deny" cargo deny --locked check licenses
step "cargo deny" cargo deny --locked check
Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/ci-local.sh
Line: 56

Comment:
**Local deny checks narrowed**

Limiting this command to `licenses` omits the advisory, banned-package, and source-policy checks that GitHub CI still runs. A dependency with an allowed license but a known advisory, yanked version, or disallowed source can pass `ci-local.sh`, so local validation no longer reproduces CI.

```suggestion
step "cargo deny" cargo deny --locked check
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment on lines +62 to 65
target_dir() {
if [ -n "${CARGO_TARGET_DIR:-}" ]; then printf '%s\n' "$CARGO_TARGET_DIR"; return; fi
(cd "$ROOT" && cargo metadata --no-deps --format-version 1) | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p'
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Relative target path misresolved

If CARGO_TARGET_DIR is relative and this script is invoked outside the repository, Cargo resolves the path from $ROOT, while the later cp resolves it from the caller's working directory. The release can then fail to find the built binary or copy a stale artifact from an unrelated directory. Normalize relative configured paths against $ROOT before using them.

Suggested change
target_dir() {
if [ -n "${CARGO_TARGET_DIR:-}" ]; then printf '%s\n' "$CARGO_TARGET_DIR"; return; fi
(cd "$ROOT" && cargo metadata --no-deps --format-version 1) | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p'
}
target_dir() {
if [ -n "${CARGO_TARGET_DIR:-}" ]; then
case "$CARGO_TARGET_DIR" in
/*) printf '%s\n' "$CARGO_TARGET_DIR" ;;
*) printf '%s/%s\n' "$ROOT" "$CARGO_TARGET_DIR" ;;
esac
return
fi
(cd "$ROOT" && cargo metadata --no-deps --format-version 1) | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p'
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: packaging/npm/release-local.sh
Line: 62-65

Comment:
**Relative target path misresolved**

If `CARGO_TARGET_DIR` is relative and this script is invoked outside the repository, Cargo resolves the path from `$ROOT`, while the later `cp` resolves it from the caller's working directory. The release can then fail to find the built binary or copy a stale artifact from an unrelated directory. Normalize relative configured paths against `$ROOT` before using them.

```suggestion
target_dir() {
  if [ -n "${CARGO_TARGET_DIR:-}" ]; then
    case "$CARGO_TARGET_DIR" in
      /*) printf '%s\n' "$CARGO_TARGET_DIR" ;;
      *) printf '%s/%s\n' "$ROOT" "$CARGO_TARGET_DIR" ;;
    esac
    return
  fi
  (cd "$ROOT" && cargo metadata --no-deps --format-version 1) | sed -n 's/.*"target_directory":"\([^"]*\)".*/\1/p'
}
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@ramstar3000
ramstar3000 force-pushed the sdk-main-fs branch 2 times, most recently from cfc168f to 9062da1 Compare September 19, 2026 18:14
@greptile-apps

greptile-apps Bot commented Sep 19, 2026

Copy link
Copy Markdown

Comments Outside Diff

These findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.

  • P1 Turn limit keeps oldest entries crates/acyclic/src/main.rs:694

    The daemon returns turns oldest-first, but this code takes entries directly from the start while promising newest-first output. For sessions longer than the limit, the command displays the oldest prompts, hides the most recent ones, and incorrectly says the omitted turns are older.

                for turn in turns.into_iter().rev().take(limit) {
    

The crates will live at plugin/ in the sdk workspace and release from that
repository as plugin-v<version> tags, so everything that assumes this repo
is its own root or its own release source learns both layouts now, while
this repo's CI can still prove it.

- acyclic-fs is pinned to the sdk main line (sdk PR #99 carries the Darwin
  unpaired-rename, subtree-removal and O_EXCL fixes this plugin needed). The
  guard forwards the new capture_host_subtree mount hook.
- scripts/install.sh targets plugin-v* releases on acyclic-labs/sdk and reads
  the current version from plugin/LATEST on main instead of the repository's
  "latest" release, which in a multi-family repo is not ours. product.toml
  gains release_tag_prefix and check-product-name.sh guards it.
- The acceptance harness, ci-local.sh, docker-linux.sh and release-local.sh
  find the cargo target directory and lint, test and build only the plugin's
  own crates, in either layout.
- FUSE-T is no longer needed on macOS: acyclic-fs mounts through its vendored
  darwinfuse server and the release binary does not link libfuse. The
  pkg-config shim, rpath flag and CI installer step are gone.
- Edition 2024 and the sdk's lint set: the env mutation in the speculation
  config test carries an explicit unsafe allowance, nested ifs became let
  chains, and the crate roots allow missing_docs with a reason until the
  per-item docs land.
- check-no-secrets.sh is dropped; the sdk's gitleaks and boundary scans cover
  it. The Windows ACL import is aliased so the boundary scanner does not read
  `Authorization::` as a credential header.
- Version 0.0.3.
@ramstar3000
ramstar3000 merged commit a8a7780 into main Sep 19, 2026
9 checks passed
@ramstar3000
ramstar3000 deleted the sdk-main-fs branch September 19, 2026 22:19
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