Skip to content

v0.1.1 fix: punctuation-insensitive customer lookup + pin google-adk <3#1

Merged
udtrad merged 2 commits into
mainfrom
fix/customer-name-punctuation
Jul 24, 2026
Merged

v0.1.1 fix: punctuation-insensitive customer lookup + pin google-adk <3#1
udtrad merged 2 commits into
mainfrom
fix/customer-name-punctuation

Conversation

@udtrad

@udtrad udtrad commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

Two changes to the Acme Operations assistant:

  1. Fix: customer names with punctuation now resolve. A name typed with trailing/embedded punctuation ("Soylent Corp.", "Globex Corp.") missed the ILIKE '%'||$1||'%' substring match, so the agent reported "not found" for a customer that exists. Both search_customers and get_open_issues now strip non-alphanumerics from both the column and the bound parameter before matching ($1 stays parameterised — no injection surface). MemoryStore.customer_key mirrors the same normalisation so the Redis cache key agrees with the DB lookup.

  2. Harden: pin google-adk, document the SequentialAgent deprecation. SequentialAgent (used by the escalation skill) is @deprecated in ADK 2.5.0 in favour of Workflow — which is not yet exported from google.adk.agents and, per ADK's own note, cannot yet be used as an LlmAgent sub-agent. It is kept deliberately. Pinned google-adk>=2.5.0,<3 (was the loose >=1.0.0) so a future 3.0 can't silently remove the class and break the build. Rationale documented at the use site + README/architecture.

Why

The punctuation quirk was a real "customer not found" failure for valid input — a papercut on the core lookup path. And the dependency floor was loose enough that a routine re-lock could pull a version without SequentialAgent, breaking the build with no code change on our side.

Changes

  • toolbox/tools.yamlregexp_replace(name, '[^[:alnum:]]', '', 'g') on both sides of the ILIKE in search_customers + get_open_issues
  • app/memory.py — new _normalize_customer_name; customer_key delegates to it
  • pyproject.toml / uv.lockgoogle-adk>=2.5.0,<3; version 0.1.0 → 0.1.1
  • app/skills/escalation.py, README.md, docs/architecture.md — deprecation rationale
  • Tests: unit (test_customer_key_*), live (test_trailing_punctuation_resolves_customer), eval case (customer-name-with-trailing-punctuation)

Verification (run against the live stack — not fabricated)

  • Unit: pytest tests/unit — all pass (TDD, RED → GREEN)
  • Lint / type: ruff check app db tests eval clean; ruff format --check clean; mypy clean
  • Direct SQL vs Postgres: old pattern for "Soylent Corp." → 0 rows; new pattern → resolves; unknown customer → still 0 rows (graceful-absence preserved)
  • Live API: 7/7 including the new punctuation regression; real agent replies confirm "Soylent Corp." → Soylent Corp and "Globex Corp." → Globex Corporation, grounded in DB values
  • Eval: 11/11, no regression (search, get_open_issues, both escalation cases, graceful-absence all pass)

Test plan

  • CI green (Lint · Type · Test + Docker build)
  • After merge, docker compose restart toolbox picks up the tools.yaml change (Toolbox reads --tools-file at startup)

🤖 Generated with Claude Code

cou and others added 2 commits July 24, 2026 21:47
Trailing or embedded punctuation ("Soylent Corp.", "Globex Corp.") missed the
ILIKE '%'||$1||'%' substring match, so the agent reported "not found" for a
customer that exists. search_customers and get_open_issues now strip
non-alphanumerics from both the column and the bound parameter before matching;
$1 stays parameterised (no injection). MemoryStore.customer_key mirrors the same
normalisation via _normalize_customer_name so the Redis cache key agrees with the
DB lookup.

Verified: TDD unit tests, a live regression test, a direct-SQL check against
Postgres, and a new eval case (customer-name-with-trailing-punctuation). Eval 11/11.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…0.1.1

SequentialAgent (used by the escalation skill) is @deprecated in ADK 2.5.0 in
favour of Workflow, which is not yet exported from google.adk.agents and cannot
yet be an LlmAgent sub-agent — so it is kept deliberately. Pin google-adk
>=2.5.0,<3 (was the loose >=1.0.0) so a future 3.0 can't silently remove the
class and break the build. Documented at the use site (app/skills/escalation.py)
and in README + docs/architecture.md.

Bump version 0.1.0 -> 0.1.1.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@udtrad
udtrad merged commit c9444e5 into main Jul 24, 2026
4 checks passed
@udtrad
udtrad deleted the fix/customer-name-punctuation branch July 24, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant