fix: loud embedding-engine health check + tighten over-firing way patterns#197
Merged
Merged
Conversation
…sion The old session-start check was broken three ways: it looked for way-embed at $XDG_WAY/way-embed (it lives at ~/.claude/bin/way-embed, so healthy installs false-positived "not installed"), it only checked file existence (never that the engine can actually embed), and it suppressed the notice once per day. Replace it with a functional probe: ask the binary to embed a query (`ways match`) and warn only when that fails. This catches corrupt models and load-but-error binaries that existence checks miss, resolves identically across all ADR-140 topologies (in-place / copy-subdir / symlink-subdir) instead of hardcoding paths that become symlinks under projection, and fires EVERY session while broken — a degraded engine drops matching to coarse pattern-only triggers and must not be skimmable. Silent when it works. Records the topology-safety contract in ADR-140 Consequences (closes the embeddings-off observation in #195 by failing loud rather than building degraded-mode precision gating). Refs #195
Five ways had pattern: regexes matching bare high-frequency tokens that collide with unrelated domains — they fired (in pattern-only mode especially) on prompts with nothing to do with the way: - migrations: drop bare `schema` (JSON/GraphQL/config schemas collide); add add.?column / drop.?(table|column) - performance: drop bare `profile` (homonym of perf profiling); add cpu.?profil / flamegraph - release: drop bare `tag`, `version.?bump`, `bump.?version` (collide with data/ schema versioning); add semver / git.?tag / release.?(notes|candidate) - patches: drop bare `patch` and `apply.*change`; lean on the precise files:/ commands: triggers, keep tight `\.patch\b|git.?(apply|am)|patch.?(set|series)` - errors: drop bare `catch` (matches "catch up", ordinary prose) The vocabulary: fields stay domain-specific; only the coarse pattern fallbacks were the problem. Semantic vocabulary-breadth collisions (e.g. "version bump") are a separate concern, as noted in #194. Closes #194
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses the two concrete issues from the recent transcribbler session (#194, #195).
Commit 1 — functional embedding health check (
check-setup.sh)The session-start embedding check was broken three ways:
way-embedat$XDG_WAY/way-embed; it lives at~/.claude/bin/way-embed, so healthy installs false-positived "not installed."Now it probes functionally (
ways match) and warns only on real failure — catching corrupt models / load-but-error binaries, resolving identically across all ADR-140 topologies (in-place / copy-subdir / symlink-subdir) instead of hardcoding paths that become symlinks under projection, and firing every session while broken. Silent when healthy. This is the answer to #195: fail loud, don't build degraded-mode precision gating. Topology-safety contract recorded in ADR-140 Consequences.Commit 2 — tighten over-firing patterns (#194)
Dropped bare generic tokens from five ways'
pattern:regexes (verified misfires):schemaprofiletag,version.?bump,bump.?versionpatch,apply.*change(lean onfiles:/commands:)catchvocabulary:fields untouched. Semantic vocabulary-breadth collisions (e.g. "version bump") are a separate concern, noted in #194 and left out of scope.Test plan
bash -n check-setup.sh; healthy run is silent; broken-logic (empty probe) warnsways lint hooks/ways— 0 errors; corpus rebuiltCloses #194
Refs #195