Repository navigation
[agentbricks] Session delete cascades, store names match the service, chat app search reads results - #931
[agentbricks] Session delete cascades, store names match the service, chat app search reads results#931nihit wants to merge 1 commit into
Conversation
… chat app search reads results
Three fixes for memory and sessions.
Session delete
- The DeleteSession API has no `force` parameter: it always deletes the session's items
and child sessions. The CLI's `--force` ("Cascade-delete descendant sessions"),
`Session.delete(force=False)`, and the README implied that without it child sessions
were kept. Stop sending `force`; keep `Session.delete(force=...)` as a deprecated no-op
that warns, and `sessions delete --force` as a hidden no-op with a note. The prompt now
says "Delete session '<id>' and all of its child sessions?".
Store names
- Check names against the rules the managed store service enforces
(conversation-store CreateManagedMemoryStoreHandler / CreateSessionStoreHandler):
memory store IDs are 3-56 chars and start with a letter; session store names are 3-55
chars, may start with a digit, and can't start with "databricks". Both use lowercase
letters, digits, and hyphens and end with a letter or digit; reserved names are rejected.
- `init` default names always pass: a slug that starts with a non-letter or "databricks"
gets an `agent-` prefix, and long slugs are shortened to fit both stores. Previously a
project dir like `2024-q4-agent` produced a memory store ID deploy couldn't create.
- `memory stores create` and `sessions stores create` reject invalid names before calling
the API; the session help said 3-63. `init --memory-store/--session-store` and both
`bind` commands validate too. Memory bind also accepts a legacy display name that starts
with a digit, since stores created before IDs were required can have one.
- Deploy preflight rejects an invalid bound name before creating anything. For a legacy
memory name it requires the store to exist, and reconcile now resolves such a store
instead of trying to create it, which the service rejects.
Chat app
- Memory search reads the ranked `results` array; the top-level `managed_memory_entries`
copy is deprecated and is read only from servers without `results`.
- Label ALWAYS_ON pipelines "Always on" instead of falling back to "Manual only".
Docs: README, cli.md, and the state-and-tools skill reference.
Co-authored-by: Isaac <no-reply@databricks.com>
|
|
||
| @memory.command("bind") | ||
| @click.argument("store") | ||
| @click.argument("store", callback=memory_store_name(allow_legacy=True)) |
There was a problem hiding this comment.
Binding now rejects previously accepted inputs without a compatibility waiver
HIGH · low confidence · Blocking issues
On a valid project, agentbricks memory bind "Bad Name" previously recorded the name locally; the new callback rejects it before updating the manifest. Although rejecting names that cannot be created is intentional, this still narrows a public CLI’s accepted inputs under BRIDGE-001, and the PR has no intentional-api-break label.
Fix: Preserve previously accepted binding inputs while validating creation separately, or obtain the intentional-api-break label required by BRIDGE-001.
Evidence
Verified-against: integrations/agentbricks/src/databricks_agentbricks/cli/memory.py:103-118, integrations/agentbricks/src/databricks_agentbricks/cli/store_names.py:17-27, integrations/agentbricks/src/databricks_agentbricks/projects/store_names.py:30-48, integrations/agentbricks/src/databricks_agentbricks/projects/agent_project.py:907-927; compared with the base callback-free argument and manifest-writing path. This finding concerns local binding compatibility, not whether the service accepts that name.
AgentBricksReviewer finding for b424458.
AgentBricksReviewerReview score: 90/100 · reviewers: 2/2 · Change risk: HIGH · SummaryBlocking issues
Approach: The shared validation approach is sound, apart from the compatibility-policy issue above. More in Details. RiskChanges affect public CLI validation, generated store names, deployment provisioning, session deletion requests, and both chat-app templates. Deletion remains irreversible, but this PR appears to clarify existing cascading behavior rather than introduce it. Unit tests cover the client-side branches; no tests or live service checks were executed during review. A revert restores code behavior, not deleted service data. CI raised the reviewer's MODERATE to HIGH:
AI approvalReview checks not passed; not eligible for auto-approval. To unblock:
Or ask a maintainer to approve. DetailsApproach: The shared validation approach is sound, apart from the compatibility-policy issue above. Pure naming helpers, thin Click callbacks, and separate search/list readers fit the existing boundaries. Keeping the public deletion deprecation shim also avoids an unnecessary SDK break. Review rules: Diff size (computed): 23 files; +658 / -90 lines (748 changed text lines); 0 binary files.
ChangesThe PR clarifies cascading session deletion and retains deprecated public Implementation changes are accompanied by eight test files and updates to the README, CLI reference, and bundled workflow guidance. The test-heavy size is justified by the affected CLI, provisioning, SDK, and template surfaces. Helper-specific assertions could be consolidated into TestsTest-by-test assessment
No test execution is claimed. The supplied tests are appropriate for the client-side changes, but cannot establish actual backend naming or deletion semantics. If binding compatibility is preserved, add a regression case for the previously accepted local input. ScopeAll changes support the stated managed-store, session, and chat-app fixes. No unrelated changes were found. Automated review by AgentBricksReviewer for |
Three fixes for memory and sessions.
Session delete
forceparameter: it always deletes the session's items and child sessions. The CLI's--force("Cascade-delete descendant sessions"),Session.delete(force=False), and the README implied that without it child sessions were kept. Stop sendingforce; keepSession.delete(force=...)as a deprecated no-op that warns, andsessions delete --forceas a hidden no-op with a note. The prompt now says "Delete session '' and all of its child sessions?".Store names
initdefault names always pass: a slug that starts with a non-letter or "databricks" gets anagent-prefix, and long slugs are shortened to fit both stores. Previously a project dir like2024-q4-agentproduced a memory store ID deploy couldn't create.memory stores createandsessions stores createreject invalid names before calling the API; the session help said 3-63.init --memory-store/--session-storeand bothbindcommands validate too. Memory bind also accepts a legacy display name that starts with a digit, since stores created before IDs were required can have one.Chat app
resultsarray; the top-levelmanaged_memory_entriescopy is deprecated and is read only from servers withoutresults.Docs: README, cli.md, and the state-and-tools skill reference.