Skip to content

Releases: BETAER-08/amdb

v1.0.0

Choose a tag to compare

@github-actions github-actions released this 24 Jul 07:12

Release Notes

Stability release. No new features; the public contract is now frozen and covered by
contract tests (tests/contract_test.rs). Breaking changes to anything listed under
"Frozen" now require a 2.0 release. See the README "Stability" section for the full
covered/not-covered list.

Frozen

  • CLI surface: init, daemon, generate, serve; --focus/-f, --depth/-d,
    --verbose/-v; optional path argument on init/daemon; exit codes 0/1
  • MCP tools: exactly amdb_get_context, amdb_focus, amdb_get_symbol with their
    current input parameters; amdb_get_symbol response fields file, name, kind,
    line, signature, is_public, callers[] {name, file},
    callees[] {name, file, resolution} (additive evolution only)
  • Config: amdb.toml keys db_path and ignore_patterns; AMDB_DB_PATH override
  • Database upgrades: automatic migration via PRAGMA user_version from any 0.6+ index;
    deleting .database/ is never a required upgrade step
  • Generated Markdown anchors: the ### <relative/path> per-file heading and the single
    fenced mermaid block with --> edges; all other layout details remain unstable

Added

  • callees[].resolution in amdb_get_symbol responses, exposing how each callee's file
    was attributed by the current resolver: same-file, global-unique, or unresolved.
    Added now so that future language-specific resolution strategies extend the value set
    additively instead of changing the response shape
  • Contract tests guarding the CLI surface, MCP tool names, the amdb_get_symbol
    response schema, the documented config keys, and the migration chain from each prior
    PRAGMA user_version (0, 1, 2)

Fixed

  • Legacy-schema migration purged symbols and relationships but left file_hashes
    intact, so the next amdb init skipped every unchanged file and left the index empty.
    The migration now purges file_hashes too, forcing the next init to rebuild fully.
    No released version could hit this (hash-based indexing shipped after the last schema
    bump), but the chain would have broken at the next user_version increase

Benchmarks

  • Re-measured on the v1.0.0 source with the corrected harness introduced in v0.9.0:
    precision targeting 100% (28/28), global efficiency 91.5%, noise reduction 81.7%
    (was 81.6% at v0.9.0), graph presence 100% (28/28). Baseline grew to 21,887 raw
    tokens; grep-baseline average moved to 4,180 tokens. No headline figure moved
    materially in the audit — the corrections themselves landed in v0.9.0, where noise
    reduction fell from a reported 95.1% to 81.6% and global efficiency from 97.8% to
    91.5%

Download amdb 1.0.0

File Platform Checksum
amdb-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
amdb-x86_64-apple-darwin.tar.xz Intel macOS checksum
amdb-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
amdb-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 18 Jul 14:16

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 09 Jul 14:34

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 04 Jul 17:24

Release v0.7.0: Symbol Resolution & Graph Integrity

🛠 Bug Fixes

  • Line Number Corruption Fixed: CodeSymbol.line was populated from the tree-sitter query's pattern index instead of the source line. It now uses the definition capture's actual start_position().row + 1.
  • is_public / signature Never Populated: Both were always false/empty because no query emitted @pub/@sig captures. They are now derived by direct AST traversal for Rust, Python, and TypeScript.
  • TypeScript Symbols Silently Dropped: The shared JS/TS query captured class names as (identifier), invalid against the TypeScript grammar (class names are type_identifier). Every .ts/.tsx file produced zero symbols. Split into QUERY_JS / QUERY_TS.
  • Fragile String-Based Identity: Symbol/edge identity was encoded as format!("{}::{}", file, name) and recovered via split("::"), corrupting on names containing :: and fragile on Windows paths. Replaced with a structured SymbolRef { file, name } used end-to-end.
  • Dead Graph-Boosting Path: vector_store::search's graph boosting never ran because resolve_focus_targets always passed graph: None. generate now builds a project-wide dependency graph once and threads it through.
  • Asymmetric Mermaid Node IDs: A caller's node ID was sanitized from its full file::name form while the same symbol as a callee was sanitized from the bare name, producing two different IDs for one symbol and a visually disconnected graph. Both sides now use one sanitize_node_id rule.
  • Overly Broad Migration Catch: schema::init's ALTER TABLE ADD COLUMN caught every SqliteFailure, not just duplicate-column errors. Narrowed to is_duplicate_column_error.
  • Stale Legacy Symbols Survived Migration: The migration purged only relationships; legacy symbols rows (stale line, always-false is_public) persisted until re-touched. Migration now also purges symbols.
  • Duplicate-Name Node Collapse: Two functions sharing a name in different files collapsed into a single mermaid node, and relationships.callee carried no file attribution. A post-index SymbolResolver now attributes each edge to a callee_file (same-file match, else global-unique, else unresolved), rendering same-named symbols as distinct nodes.

⚡ Performance

  • Single Graph Construction: generate builds the project-wide dependency graph once and reuses it for focus resolution and boosting, instead of reconstructing per query.

🔧 Refactoring

  • Unified Embedding Text: indexer's init path and the daemon's update_file now share one embedding_text(symbol) builder instead of duplicating the format string.
  • Redundant Caller Encoding Removed: relationships.caller now stores a bare symbol name; the file_path column already carries the file, making the old file::name value redundant.
  • Structured Vector Search: vectors table gained a name column so boosting compares structured values instead of parsing the id string.
  • Path Normalization: normalize_path(root, path) provides consistent file identity across init and the daemon (relative to project root, forward slashes).

✨ Added

  • SymbolEnricher Trait (core::languages): Per-language is_public/signature implementations for Rust, Python, and TypeScript; other supported languages fall back to (true, None), documented in the README language table.
  • SymbolResolver (core::symbol): Resolves a callee name to its defining file when unambiguous. relationships gained a nullable callee_file column populated by a post-index resolution pass in init's full scan. The daemon's incremental update_file applies only the cheap same-file rule; cross-file attribution for daemon-touched files is deferred to the next full init rather than guessed.
  • Schema Versioning: PRAGMA user_version detects a pre-0.7 database and purges its stale-format relationships and symbols rows instead of crashing on read.

✅ Testing

  • Added strict regression tests: exact line number, is_public true/false, signature contents, a real mermaid edge arrow, a std::collections::HashMap-in-a-call regression, mermaid node-ID symmetry, callee-resolution ambiguity pinning, a migration-error classifier (duplicate vs. genuinely different SqliteFailure), a legacy-DB purge proof, and the symbol resolver (distinct per-file nodes for duplicate names, callee_file persisted for globally unique symbols, ambiguous duplicates left unresolved).

🔍 Investigated, Not Changed

  • impl_item Signature Extraction: Suspected to swallow the entire method block. Verified against the real tree-sitter-rust grammar that signature_before_body already cuts at the body field correctly for function_item, struct_item, and impl_item (all use the field name body). No change made.

⬆️ Upgrade Notes

Existing .database/ directories from v0.6.0 are automatically migrated via PRAGMA user_version; stale symbols and relationships rows are purged and rebuilt on the next init. No manual action required. If migration fails, delete .database/ and re-run amdb init.

📦 Download amdb 0.7.0

File Platform Checksum
amdb-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
amdb-x86_64-apple-darwin.tar.xz Intel macOS checksum
amdb-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
amdb-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 16 May 10:37

Release v0.6.0: Data Integrity & Daemon Stability

🛠 Bug Fixes

  • Symbol Data Loss Resolved: is_public and signature fields are now correctly persisted to and restored from SQLite. Previously both were hardcoded (true / None) on every read, silently discarding parser output.
  • WAL Checkpoint Implemented: VectorStore::save() was a no-op. It now executes PRAGMA wal_checkpoint(TRUNCATE), ensuring data durability on OS crash or unexpected shutdown.
  • EmbeddingEngine Double Init: generate --focus was instantiating EmbeddingEngine twice per invocation. Reduced to a single instance passed by reference.
  • JWT False Positive Reduction: Secret scan regex now requires a minimum of 20 characters per segment, eliminating false positives from short base64 strings in test fixtures and documentation.

⚡ Performance

  • Directional Dependency Graph: File graph is now strictly forward-directional. --depth traversal no longer follows reverse edges, preventing unintended context bloat.
  • Mermaid Edge Pre-filtering: Edge output now filters by target files before applying the 100-edge cap, ensuring relevant relationships are never silently dropped.
  • Daemon Bounded Channel: Replaced unbounded mpsc channel with crossbeam_channel::bounded(512). Queue-full events are logged and dropped rather than blocking the watcher thread.
  • 300ms Debounce: Rapid successive saves to the same file now produce a single index update instead of N redundant operations.
  • Index Coverage: Added idx_warnings_file_path and idx_vectors_file_path indexes, eliminating full table scans on per-file queries.

🔧 Refactoring

  • IndexWorker::update_file: Flattened 4-level nested match into a linear ?-chain using anyhow::Context for improved readability and error attribution.
  • Schema Migration Guard: ALTER TABLE statements for existing databases now silently ignore duplicate-column errors, enabling safe upgrades from v0.5.0 without manual DB deletion.
  • generate --focus Output: Context files now include function signatures when available.

✅ Testing

  • Added test_symbol_fields_persisted: verifies is_public/signature round-trip through SQLite.
  • Added test_vector_store_save_no_panic: verifies WAL checkpoint executes without error.
  • Added test_directional_graph_excludes_callers: verifies --depth does not traverse reverse edges.

⬆️ Upgrade Notes

Existing .database/ directories from v0.5.0 are automatically migrated. No manual action required. If migration fails for any reason, delete .database/ and re-run amdb init.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 10 Apr 11:14

Release v0.5.0: Hybrid Search & Performance Overhaul

This release introduces major architectural improvements, significantly boosting background daemon stability and context generation quality through Hybrid Search.

🚀 Key Features

  • Hybrid Context Generation: Vector search is now structurally aware. amdb generate combines semantic similarity with Graph-based AST traversal to find deeply connected relationships (callers/callees) that lack matching keywords.
  • Granular Context Depth: Added a --depth <N> argument to amdb generate (default: 1), allowing precise control over how far the dependency graph expands to reduce token noise.
  • Dynamic Configuration: Introduced amdb.toml support and Environment Variable overrides (e.g., AMDB_DB_PATH). You can now natively configure ignore_patterns and custom database paths without changing the source code.

⚡ Performance Optimizations

  • Stateful Daemon Watcher: Completely decoupled the File Watcher from the Embedding Processor using an mpsc channel. Heavy DB connections and Embedding models are now loaded once and kept in memory, preventing daemon freezes during rapid multi-file saves.
  • $O(V+E)$ Graph Traversal: Replaced full-scan nested loops with an in-memory Adjacency List for graph expansion, vastly reducing context generation time on large repositories.

🛠 Fixes & Refactoring

  • CI/CD Reliability: amdb now correctly returns an OS-level exit code of 1 upon critical unrecoverable errors (e.g., missing database), ensuring automated workflows fail properly.
  • SRP Refactoring: Dismantled the monolithic ContextGenerator into cohesive, specialized sub-routines for better long-term maintainability.
  • Code Hygiene: Cleaned up legacy dead code and addressed compiler warnings (unused imports/variables) generated during the architecture overhaul to maintain a clean codebase.
File Platform Checksum
amdb-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
amdb-x86_64-apple-darwin.tar.xz Intel macOS checksum
amdb-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
amdb-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 13 Feb 16:53

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 09 Feb 16:06

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 09 Feb 04:36

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 07 Feb 18:25