Skip to content

Commit 0c07f66

Browse files
fix(search,ci,install): Arc-token context identity for semantic search TOCTOU safety, per-mode two-tier unavailability tracking, CI frankensearch clone, crates.io publish readiness gate
Semantic search context identity (src/search/query.rs): - Replace string-based embedder ID comparison with Arc<()> context token created on each set_semantic_context call -- all lock-release-reacquire loops now use Arc::ptr_eq to detect context swaps, eliminating TOCTOU races where the context changes mid-query to one with an identically-named embedder - Replace single in_memory_two_tier_init_attempted boolean with per-mode (fast_only / quality) unavailability tracking via InMemoryTwoTierUnavailable, preventing a failed quality probe from blocking subsequent fast-only loads - Three new tests: stale same-ID embedding rejection, failed quality not poisoning fast-only, progressive context errors not permanently memoized Cargo.toml metadata normalization: - Add explicit version = "*" to all git-pinned dependencies (asupersync, toon, frankensqlite, frankentui crates, frankensearch, franken-agent-detection, fsqlite-types) -- required for crates.io publish compatibility CI release workflow (.github/workflows/release.yml): - Add missing frankensearch git clone to all three CI job steps (build, sign, test) so builds that depend on it as a git dependency succeed - Add cargo package --locked --no-verify readiness check before crates.io publish, with structured warning when manifest is not registry-ready instead of a hard failure Installer (install.sh): - Drop darwin-amd64 (Intel macOS) from prebuilt targets since those binaries are no longer published, with specific fallback message instead of the generic "no prebuilt artifact" warning Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 68213d6 commit 0c07f66

4 files changed

Lines changed: 450 additions & 118 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ jobs:
7171
git clone --depth 1 https://github.com/Dicklesworthstone/asupersync.git ../asupersync
7272
git clone --depth 1 https://github.com/Dicklesworthstone/frankensqlite.git ../frankensqlite
7373
git clone --depth 1 https://github.com/Dicklesworthstone/franken_agent_detection.git ../franken_agent_detection
74+
git clone --depth 1 https://github.com/Dicklesworthstone/frankensearch.git ../frankensearch
7475
7576
- name: Install Rust stable
7677
uses: dtolnay/rust-toolchain@stable
@@ -203,6 +204,7 @@ jobs:
203204
git clone --depth 1 https://github.com/Dicklesworthstone/asupersync.git ../asupersync
204205
git clone --depth 1 https://github.com/Dicklesworthstone/frankensqlite.git ../frankensqlite
205206
git clone --depth 1 https://github.com/Dicklesworthstone/franken_agent_detection.git ../franken_agent_detection
207+
git clone --depth 1 https://github.com/Dicklesworthstone/frankensearch.git ../frankensearch
206208
207209
- name: Download all artifacts
208210
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
@@ -369,18 +371,41 @@ jobs:
369371
git clone --depth 1 https://github.com/Dicklesworthstone/asupersync.git ../asupersync
370372
git clone --depth 1 https://github.com/Dicklesworthstone/frankensqlite.git ../frankensqlite
371373
git clone --depth 1 https://github.com/Dicklesworthstone/franken_agent_detection.git ../franken_agent_detection
374+
git clone --depth 1 https://github.com/Dicklesworthstone/frankensearch.git ../frankensearch
372375
373376
- name: Install Rust stable
374377
uses: dtolnay/rust-toolchain@stable
375378

379+
- name: Check crates.io publish readiness
380+
id: publish_readiness
381+
shell: bash
382+
run: |
383+
set +e
384+
cargo package --locked --no-verify >"$RUNNER_TEMP/cargo-package.log" 2>&1
385+
status=$?
386+
set -e
387+
if [[ "$status" -eq 0 ]]; then
388+
echo "ready=true" >> "$GITHUB_OUTPUT"
389+
echo "Cargo package validation passed."
390+
exit 0
391+
fi
392+
393+
echo "ready=false" >> "$GITHUB_OUTPUT"
394+
echo "::warning::Skipping crates.io publish because the manifest is not registry-ready with the currently published dependency set."
395+
cat "$RUNNER_TEMP/cargo-package.log"
396+
376397
- name: Publish to crates.io
377-
if: ${{ env.CARGO_REGISTRY_TOKEN != '' }}
398+
if: ${{ env.CARGO_REGISTRY_TOKEN != '' && steps.publish_readiness.outputs.ready == 'true' }}
378399
run: cargo publish --all-features --locked
379400

380401
- name: Warn when token is missing
381402
if: ${{ env.CARGO_REGISTRY_TOKEN == '' }}
382403
run: echo "::warning::CARGO_REGISTRY_TOKEN is not configured; skipping publish."
383404

405+
- name: Warn when manifest is not registry-ready
406+
if: ${{ env.CARGO_REGISTRY_TOKEN != '' && steps.publish_readiness.outputs.ready != 'true' }}
407+
run: echo "::warning::Crates.io publish skipped because cargo package validation failed."
408+
384409
# ==========================================================================
385410
# Notify Package Managers to Update
386411
# ==========================================================================

Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ anyhow = "*"
1414
thiserror = "*"
1515
tracing = "*"
1616
tracing-subscriber = { version = "*", features = ["env-filter", "fmt", "ansi"] }
17-
asupersync = { git = "https://github.com/Dicklesworthstone/asupersync", rev = "08dd31df", features = ["test-internals", "tls-native-roots"] }
17+
asupersync = { version = "*", git = "https://github.com/Dicklesworthstone/asupersync", rev = "08dd31df", features = ["test-internals", "tls-native-roots"] }
1818
clap = { version = "*", features = ["derive", "cargo", "env", "unicode", "wrap_help"] }
1919
clap_complete = "*"
2020
clap_mangen = "*"
@@ -23,7 +23,7 @@ console = "*"
2323
colored = "*"
2424
serde = { version = "*", features = ["derive"] }
2525
serde_json = "*"
26-
toon = { git = "https://github.com/Dicklesworthstone/toon_rust", rev = "bc3f9da", package = "tru" }
26+
toon = { version = "*", git = "https://github.com/Dicklesworthstone/toon_rust", rev = "bc3f9da", package = "tru" }
2727
tempfile = "*"
2828
rmp-serde = "*" # MessagePack for binary metadata serialization (Opt 3.1)
2929
toml = "*"
@@ -32,7 +32,7 @@ which = "*"
3232
shell-words = "*"
3333
dotenvy = "*"
3434
notify = "*"
35-
frankensqlite = { git = "https://github.com/Dicklesworthstone/frankensqlite", rev = "9cedb30b", package = "fsqlite", features = ["fts5"] }
35+
frankensqlite = { version = "*", git = "https://github.com/Dicklesworthstone/frankensqlite", rev = "9cedb30b", package = "fsqlite", features = ["fts5"] }
3636
rayon = "*"
3737
crossbeam-channel = "*"
3838
parking_lot = "*"
@@ -44,10 +44,10 @@ regex = "*"
4444
portable-pty = "*"
4545
# FrankenTUI migration foundation (bead 2noh9.2.1).
4646
# Strategy: pin a Git revision for reproducible CI builds.
47-
ftui = { git = "https://github.com/Dicklesworthstone/frankentui", rev = "7a91089" }
48-
ftui-runtime = { git = "https://github.com/Dicklesworthstone/frankentui", rev = "7a91089", features = ["native-backend", "crossterm-compat"] }
49-
ftui-tty = { git = "https://github.com/Dicklesworthstone/frankentui", rev = "7a91089" }
50-
ftui-extras = { git = "https://github.com/Dicklesworthstone/frankentui", rev = "7a91089", default-features = false, features = ["markdown", "syntax", "charts", "canvas", "theme", "clipboard", "clipboard-fallback", "export", "visual-fx", "forms", "validation", "help"] }
47+
ftui = { version = "*", git = "https://github.com/Dicklesworthstone/frankentui", rev = "7a91089" }
48+
ftui-runtime = { version = "*", git = "https://github.com/Dicklesworthstone/frankentui", rev = "7a91089", features = ["native-backend", "crossterm-compat"] }
49+
ftui-tty = { version = "*", git = "https://github.com/Dicklesworthstone/frankentui", rev = "7a91089" }
50+
ftui-extras = { version = "*", git = "https://github.com/Dicklesworthstone/frankentui", rev = "7a91089", default-features = false, features = ["markdown", "syntax", "charts", "canvas", "theme", "clipboard", "clipboard-fallback", "export", "visual-fx", "forms", "validation", "help"] }
5151
dirs = "*"
5252
walkdir = "*"
5353
glob = "*"
@@ -69,8 +69,8 @@ half = { version = "*", features = ["bytemuck"] }
6969
memmap2 = "*"
7070
bytemuck = "*"
7171
fastembed = { version = "*", default-features = false, features = ["ort-download-binaries-rustls-tls"] }
72-
frankensearch = { git = "https://github.com/Dicklesworthstone/frankensearch", rev = "9961c0e7", default-features = false, features = ["hash", "lexical", "ann", "fastembed-reranker"] }
73-
franken-agent-detection = { git = "https://github.com/Dicklesworthstone/franken_agent_detection", rev = "ba9c598", features = ["connectors", "cursor", "chatgpt", "opencode", "crush"] }
72+
frankensearch = { version = "*", git = "https://github.com/Dicklesworthstone/frankensearch", rev = "9961c0e7", default-features = false, features = ["hash", "lexical", "ann", "fastembed-reranker"] }
73+
franken-agent-detection = { version = "*", git = "https://github.com/Dicklesworthstone/franken_agent_detection", rev = "ba9c598", features = ["connectors", "cursor", "chatgpt", "opencode", "crush"] }
7474
wide = "*" # Portable SIMD for P0 Opt 2: SIMD dot product
7575
arrayvec = "*" # Stack-based arrays for P1 Opt 1.4: Edge N-gram optimization
7676
bloomfilter = "*" # Probabilistic membership testing for P2 Opt 3.3: Workspace Cache
@@ -138,7 +138,7 @@ rand = "0.10"
138138
rand_chacha = "0.10"
139139
# frankensqlite compat gate tests (bead 3vvqa) — fsqlite-types needed for SqliteValue
140140
# enum variants in test assertions. The main fsqlite dep is available as `frankensqlite`.
141-
fsqlite-types = { git = "https://github.com/Dicklesworthstone/frankensqlite", rev = "9cedb30b", package = "fsqlite-types" }
141+
fsqlite-types = { version = "*", git = "https://github.com/Dicklesworthstone/frankensqlite", rev = "9cedb30b", package = "fsqlite-types" }
142142

143143
[[bin]]
144144
name = "cass"

install.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,11 @@ esac
190190

191191
TARGET=""
192192
EXT="tar.gz"
193+
NO_PREBUILT_REASON=""
193194
case "${OS}-${ARCH}" in
194195
linux-amd64) TARGET="linux-amd64" ;;
195196
linux-arm64) TARGET="linux-arm64" ;;
196-
darwin-amd64) TARGET="darwin-amd64" ;;
197+
darwin-amd64) NO_PREBUILT_REASON="Intel macOS release binaries are not published" ;;
197198
darwin-arm64) TARGET="darwin-arm64" ;;
198199
mingw*-amd64|msys*-amd64|cygwin*-amd64) TARGET="windows-amd64"; EXT="zip" ;;
199200
*) :;;
@@ -210,7 +211,11 @@ if [ "$FROM_SOURCE" -eq 0 ]; then
210211
TAR="cass-${TARGET}.${EXT}"
211212
URL="https://github.com/${OWNER}/${REPO}/releases/download/${VERSION}/${TAR}"
212213
else
213-
warn "No prebuilt artifact for ${OS}/${ARCH}; falling back to build-from-source"
214+
if [ -n "$NO_PREBUILT_REASON" ]; then
215+
warn "$NO_PREBUILT_REASON; falling back to build-from-source"
216+
else
217+
warn "No prebuilt artifact for ${OS}/${ARCH}; falling back to build-from-source"
218+
fi
214219
FROM_SOURCE=1
215220
fi
216221
fi

0 commit comments

Comments
 (0)