Launch prep: version 1.4.0 in-repo, path scrub, public docs pass, update-check data-dir fix - #275
Conversation
…e, ADR index, demo GIF
Hardcoding ~/.vera/update-check.json created ~/.vera on fresh XDG installs, which made vera_home_dir() switch to the legacy directory and lose the configured backend after the first command.
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Older builds created ~/.vera for the update cache on XDG installs; that directory must not shadow the populated XDG data directory.
There was a problem hiding this comment.
Devin Review found 2 new potential issues.
2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
| entries.flatten().any(|entry| { | ||
| let name = entry.file_name(); | ||
| !LEGACY_HOME_INCIDENTAL_FILES | ||
| .iter() | ||
| .any(|incidental| name == *incidental) |
There was a problem hiding this comment.
🟡 Unrelated files shadow active installations
With an unrelated file beside the old cache, is_legacy_installation treats the legacy directory as a real installation. A .DS_Store file therefore hides configuration and models in the active XDG data directory.
Prompt for agents
The legacy-home detector currently defines an installation as any directory entry except update-check.json. This lets unrelated filesystem metadata or abandoned temporary files shadow a populated XDG installation. Change the detection to recognize actual Vera installation artifacts while preserving every supported legacy layout. Relevant artifacts include persisted CLI state and managed models, runtimes, virtual environments, binaries, and scaler data. Add coverage for an old update cache accompanied by unrelated metadata.
Was this helpful? React with 👍 or 👎 to provide feedback.
| let Ok(entries) = std::fs::read_dir(legacy) else { | ||
| return false; |
There was a problem hiding this comment.
🟡 Unreadable legacy directories lose configuration
When a valid legacy directory cannot be enumerated, is_legacy_installation treats the read error as proof that no installation exists. The CLI silently switches to XDG, hiding existing configuration and models instead of surfacing the error.
Prompt for agents
is_legacy_installation currently collapses every read_dir failure into “not an installation.” Preserve the distinction between a missing legacy directory and one that exists but cannot be enumerated. Propagate an actionable I/O error through resolve_vera_home_dir and vera_home_dir, while retaining the XDG fallback for a genuinely absent directory. Add a Unix permission test where known legacy files remain addressable but directory enumeration fails, or otherwise test the error branch directly.
Was this helpful? React with 👍 or 👎 to provide feedback.
…dir) (#277) Follow-up to #275 hardening legacy ~/.vera detection: hidden files (.DS_Store, editor swap files) are now incidental alongside update-check.json, so a stray ~/.vera can no longer shadow a populated XDG data dir, and read_dir failures other than NotFound propagate as errors instead of silently falling back. resolve_vera_home_dir and is_legacy_installation return Result; vera_home_dir already did, so no caller changes. Adds the .DS_Store case to the cache-only test and a Unix-only unreadable-dir test that self-skips when running as root. [skip ci]
Summary
Pre-launch cleanup plus one real bug found while recording the README demo.
Bug fix (
vera-cli):update_check::cache_path()hardcoded~/.vera/update-check.json. On a fresh install the data dir is$XDG_DATA_HOME/vera, butvera_home_dir()prefers~/.veraif it exists — so the first command's trailing update check created~/.vera, and every subsequent command resolved config/models/credentials from the empty legacy dir (embedding API not configured, silent BM25-only fallback). Now:Reproduced on Ubuntu 22.04 with a fresh
vera setup --potion-code; after the fix~/.verais never created and the cache lands in~/.local/share/vera/.Version:
0.4.0 -> 1.4.0inCargo.toml,Cargo.lock(4 workspace crates only), npm and PyPI manifests.release.ymlstill overwrites from the tag; this only fixes source builds (vera --version,.versionskill stamps, false "update available" nudge).Path scrub: all
/home/lamim/...occurrences removed from tracked files (ADR 008, benchmark notes/results, answer key).filter_scan_tests::overcap_pathfalls back todirs::home_dir()/.cache/...instead of a hardcoded home;VERA_OVERCAP_FIXTUREstill overrides, test still skips when absent.Public docs pass (editorial, per agreed decisions):
docs/assets/vera-demo.gif, recorded against Flask with the default local backend), local-first Quick Start,.vera/gitignore step, Requirements / Privacy / Vera-vs-other-tools / MCP setup / Status sections; strengths reordered so it no longer opens with a benchmark loss; Pampax paragraph softened.docs/README.md(index),docs/mcp.md(per-client MCP setup),docs/configuration.md(config keys + env vars),docs/benchmarks-history.md(historical snapshots split out ofbenchmarks.md).197-profiling.md -> adr/009,reranker-server-batching-decision.md -> adr/010; ADR 006/007 renamed by topic; ADR 000 index updated.skills/vera/SKILL.mdgrep example used\|(a literal pipe in Vera's regex) ->|; CONTRIBUTING clippy command now matches CI (--all-targets);models.mdinference table now states the corpus per row; contradictory reranker guidance unified; troubleshooting reordered by frequency.Not in this PR (reported separately): GNU release binary requires glibc 2.39; musl binary segfaults in
tree_sitter_sql_external_scanner_createbecauseCXX_x86_64_unknown_linux_musl=g++links glibc libstdc++ into the static binary.Verification
cargo fmt --all -- --check,cargo clippy --workspace --all-targets -- -D warningscargo test -p vera-cli, focusedvera-coreretrieval testsREADME.md+docs/,git diff --check,rg /home/lamim-> noneLink to Devin session: https://app.devin.ai/sessions/0b10c0b095784568acf302cc024ef089
Open in Devin Desktop: https://app.devin.ai/desktop/session/0b10c0b095784568acf302cc024ef089?variant=devin
Requested by: @lemon07r
Summary by cubic
Fixes the update-check cache path so fresh installs no longer lose their configured backend, and prepares the 1.4.0 launch with a version bump, path scrub, and public docs pass.
Bug Fix
vera-clistores the update-check cache in the Vera data dir instead of hardcoded~/.vera/update-check.json.vera_home_dir()now ignores a~/.verathat holds only the update-check cache, so a stray legacy directory no longer shadows the populated XDG data dir.~/.vera, which madevera_home_dir()switch to the legacy directory and silently fall back to BM25-only retrieval.Launch Prep
0.4.0to1.4.0; affects source builds only, sincerelease.ymlstill overwrites from the tag./home/lamim/...paths from tracked files; the overcap test fixture now falls back todirs::home_dir().skills/vera/SKILL.mdand aligns the CONTRIBUTING clippy command with CI.Written for commit 7bb839a. Summary will update on new commits.