Skip to content

fix: ambiguous URL detection, DSN quoting docs#280

Merged
cmeans-claude-dev[bot] merged 2 commits intomainfrom
fix/alembic-dsn-format-v2
Apr 13, 2026
Merged

fix: ambiguous URL detection, DSN quoting docs#280
cmeans-claude-dev[bot] merged 2 commits intomainfrom
fix/alembic-dsn-format-v2

Conversation

@cmeans-claude-dev
Copy link
Copy Markdown
Contributor

@cmeans-claude-dev cmeans-claude-dev bot commented Apr 13, 2026

Summary

Post-#276 follow-up. Addresses QA findings and a production deploy issue:

  • Ambiguous URL detectiondsn_to_sqlalchemy_url() now detects unencoded @ in URL passwords (e.g., postgresql://u:p@ss@h:5432/db) and raises ValueError instead of silently misparsing
  • Docstring fix — correct exception types documented on dsn_to_sqlalchemy_url()
  • DSN quoting docs — document that DSN format values must be quoted in env files to prevent shell space-splitting (discovered during production deploy)
  • README — fix mcp-awareness-migrate upgrade head syntax

Supersedes #278 (rebased to clean branch after squash-merge conflicts).

QA

Prerequisites

  • pip install -e ".[dev]"

Manual tests

    • Ambiguous URL raisesdsn_to_sqlalchemy_url("postgresql://u:p@ss@h:5432/db") raises ValueError
    • README env tableAWARENESS_DATABASE_URL documents both URL and DSN formats with quoting note
    • mcp-awareness-migrate error — run without env var, shows both formats
    • README upgrade section — says mcp-awareness-migrate (no positional args)

@cmeans-claude-dev cmeans-claude-dev bot added the Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA label Apr 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions bot added Ready for QA Dev work complete — QA can begin review Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA and removed Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA Ready for QA Dev work complete — QA can begin review labels Apr 13, 2026
cmeans-claude-dev[bot] and others added 2 commits April 13, 2026 15:41
Post-#276 follow-up:
- Detect ambiguous @ in URL passwords (raises ValueError instead of
  silently misparsing)
- Fix dsn_to_sqlalchemy_url docstring (ProgrammingError, not ValueError)
- Document DSN quoting requirement in README, data dictionary,
  migrate.py and alembic/env.py error messages
- Fix README `mcp-awareness-migrate upgrade head` syntax

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two tests: exits with code 1, and error message shows both URL/DSN
formats with quoting note.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cmeans cmeans force-pushed the fix/alembic-dsn-format-v2 branch from b9e8bd5 to b7b51d0 Compare April 13, 2026 20:41
@github-actions github-actions bot added Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA Ready for QA Dev work complete — QA can begin review and removed Ready for QA Dev work complete — QA can begin review Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA labels Apr 13, 2026
@cmeans cmeans added QA Active QA is actively reviewing; Dev should not push changes and removed Ready for QA Dev work complete — QA can begin review labels Apr 13, 2026
Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

QA Review — PR #280 (Round 1)

Branch: fix/alembic-dsn-format-v2
CI: All green
Tests: 876 collected, 869 passed, 7 skipped, 0 failed (+2 new for migrate.py error path)
Scope: 6 files changed (+44/-4)


Code review

Clean docs/UX follow-up to #276. Changes are:

  • README env table: documents both URL and DSN formats with bold quoting warning
  • data-dictionary.md: same dual-format documentation
  • alembic/env.py: error message shows both format examples
  • migrate.py: error message shows URL, DSN, and quoting note on separate lines
  • CHANGELOG: docs entry under existing Fixed section
  • 2 new tests: test_missing_database_url_exits and test_missing_database_url_shows_both_formats

No logic changes — purely documentation and error messaging.

Manual QA results

  • Step 1: Ambiguous URL raises ValueError with clear message about %40 encoding
  • Step 2: README env table shows both formats, bold quoting warning, DSN example with quotes
  • Step 3: mcp-awareness-migrate without env var shows URL example, DSN example, and quoting note
  • Step 4: README upgrade section says mcp-awareness-migrate (no positional args)

Zero findings


Verdict: Ready for QA Signoff

Clean docs PR, zero findings, 4/4 manual steps verified, CI green.

@cmeans cmeans added Ready for QA Signoff QA passed — ready for maintainer final review and merge and removed QA Active QA is actively reviewing; Dev should not push changes labels Apr 13, 2026
@cmeans
Copy link
Copy Markdown
Owner

cmeans commented Apr 13, 2026

Adding Ready for QA Signoff — zero findings, 4/4 manual steps verified, 869/876 tests, CI green.

Copy link
Copy Markdown
Owner

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

LGTM

@cmeans cmeans added QA Approved Manual QA testing completed and passed and removed Ready for QA Signoff QA passed — ready for maintainer final review and merge labels Apr 13, 2026
@cmeans-claude-dev cmeans-claude-dev bot merged commit 014d1ff into main Apr 13, 2026
35 checks passed
@cmeans-claude-dev cmeans-claude-dev bot deleted the fix/alembic-dsn-format-v2 branch April 13, 2026 20:56
cmeans-claude-dev bot added a commit that referenced this pull request Apr 13, 2026
## Summary

Version stamp for v0.17.0. All code changes already merged and QA
Approved via feature PRs.

### Highlights

**Layer 1 Hybrid Retrieval** — vector + FTS + Reciprocal Rank Fusion
- Hybrid `search` tool fusing HNSW vector similarity and GIN full-text
search via RRF (k=60)
- Per-entry language detection via lingua-py (28 stock snowball
regconfigs)
- `language` parameter on write tools (explicit ISO 639-1 or
auto-detect)
- `get_knowledge` language filter
- Regconfig validation cache with graceful fallback
- Unsupported-language alerts for demand signaling
- `semantic_search` deprecated alias for `search`

**Granite Embedding Model** — multilingual vector search
- Default swap from `nomic-embed-text` (English-only) to
`granite-embedding:278m` (IBM, 12 languages)
- Cross-lingual similarity: en→fr 0.48→0.91, en→de 0.45→0.96, en→ja
0.39→0.92
- Same 768 dimensions — no schema migration

**Deployment Fixes**
- Alembic DSN format handling (#276)
- DSN quoting docs (#280)
- QA compose port publishing (#282, closes #281)
- LXC permissions docs (#283, closes #275)

**Tooling**
- `scripts/benchmark_layer1.py` — 23-test repeatable benchmark (FTS,
vector, RRF, language detection, latency)
- `scripts/backfill_language.py` — RLS-aware language backfill
- `compose_detection_text()` shared function for consistent language
detection across write tools and backfill

Closes #238. 869 tests. 30 MCP tools.

## QA

Release PR — version stamp only, no code changes. All code was QA
Approved in feature PRs (#276, #279, #280, #282, #283).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: cmeans-claude-dev[bot] <3223881+cmeans-claude-dev[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA Approved Manual QA testing completed and passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant