Skip to content

Update databricks license to 2024#6

Merged
prithvikannan merged 1 commit intomainfrom
update-license
Oct 24, 2024
Merged

Update databricks license to 2024#6
prithvikannan merged 1 commit intomainfrom
update-license

Conversation

@prithvikannan
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Prithvi Kannan <prithvi.kannan@databricks.com>
@prithvikannan prithvikannan merged commit 1e1b4d2 into main Oct 24, 2024
dhruv0811 added a commit that referenced this pull request Feb 26, 2026
…re catches

Review feedback from Ann (comments #3-7):
- Remove unused pytestmark from conftest.py (#3)
- Add multi-server test: UC + VS in DatabricksMultiServerMCPClient (#4)
- Narrow conftest fixture catches: ExceptionGroup with McpError NOT_FOUND
  check instead of bare Exception — re-raises non-NOT_FOUND errors (#6)
- Revert ty/type-ignore changes to non-test files (chat_models.py, lakebase.py,
  checkpoint.py) — not in scope for this PR (#1, #2)

Error path tests across all 3 layers (#7):
- Core: bad function (McpError BAD_REQUEST not found), bad tool name
  (McpError BAD_REQUEST malformed), wrong args (McpError missing parameter)
- OpenAI Toolkit: bad function (ValueError wrapping), bad tool (ExceptionGroup),
  wrong args (ExceptionGroup)
- OpenAI Agents: bad function (McpError), bad tool (McpError), wrong args (UserError)
- LangChain: bad function (ExceptionGroup > McpError), wrong args (McpError)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dhruv0811 added a commit that referenced this pull request Feb 26, 2026
…re catches

Review feedback from Ann (comments #3-7):
- Remove unused pytestmark from conftest.py (#3)
- Add multi-server test: UC + VS in DatabricksMultiServerMCPClient (#4)
- Narrow conftest fixture catches: ExceptionGroup with McpError NOT_FOUND
  check instead of bare Exception — re-raises non-NOT_FOUND errors (#6)
- Revert ty/type-ignore changes to non-test files (chat_models.py, lakebase.py,
  checkpoint.py) — not in scope for this PR (#1, #2)

Error path tests across all 3 layers (#7):
- Core: bad function (McpError BAD_REQUEST not found), bad tool name
  (McpError BAD_REQUEST malformed), wrong args (McpError missing parameter)
- OpenAI Toolkit: bad function (ValueError wrapping), bad tool (ExceptionGroup),
  wrong args (ExceptionGroup)
- OpenAI Agents: bad function (McpError), bad tool (McpError), wrong args (UserError)
- LangChain: bad function (ExceptionGroup > McpError), wrong args (McpError)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dhruv0811 added a commit that referenced this pull request Feb 26, 2026
…re catches

Review feedback from Ann (comments #3-7):
- Remove unused pytestmark from conftest.py (#3)
- Add multi-server test: UC + VS in DatabricksMultiServerMCPClient (#4)
- Narrow conftest fixture catches: ExceptionGroup with McpError NOT_FOUND
  check instead of bare Exception — re-raises non-NOT_FOUND errors (#6)
- Revert ty/type-ignore changes to non-test files (chat_models.py, lakebase.py,
  checkpoint.py) — not in scope for this PR (#1, #2)

Error path tests across all 3 layers (#7):
- Core: bad function (McpError BAD_REQUEST not found), bad tool name
  (McpError BAD_REQUEST malformed), wrong args (McpError missing parameter)
- OpenAI Toolkit: bad function (ValueError wrapping), bad tool (ExceptionGroup),
  wrong args (ExceptionGroup)
- OpenAI Agents: bad function (McpError), bad tool (McpError), wrong args (UserError)
- LangChain: bad function (ExceptionGroup > McpError), wrong args (McpError)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dhruv0811 added a commit that referenced this pull request Feb 26, 2026
…re catches

Review feedback from Ann (comments #3-7):
- Remove unused pytestmark from conftest.py (#3)
- Add multi-server test: UC + VS in DatabricksMultiServerMCPClient (#4)
- Narrow conftest fixture catches: ExceptionGroup with McpError NOT_FOUND
  check instead of bare Exception — re-raises non-NOT_FOUND errors (#6)
- Revert ty/type-ignore changes to non-test files (chat_models.py, lakebase.py,
  checkpoint.py) — not in scope for this PR (#1, #2)

Error path tests across all 3 layers (#7):
- Core: bad function (McpError BAD_REQUEST not found), bad tool name
  (McpError BAD_REQUEST malformed), wrong args (McpError missing parameter)
- OpenAI Toolkit: bad function (ValueError wrapping), bad tool (ExceptionGroup),
  wrong args (ExceptionGroup)
- OpenAI Agents: bad function (McpError), bad tool (McpError), wrong args (UserError)
- LangChain: bad function (ExceptionGroup > McpError), wrong args (McpError)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dhruv0811 added a commit that referenced this pull request Mar 3, 2026
…re catches

Review feedback from Ann (comments #3-7):
- Remove unused pytestmark from conftest.py (#3)
- Add multi-server test: UC + VS in DatabricksMultiServerMCPClient (#4)
- Narrow conftest fixture catches: ExceptionGroup with McpError NOT_FOUND
  check instead of bare Exception — re-raises non-NOT_FOUND errors (#6)
- Revert ty/type-ignore changes to non-test files (chat_models.py, lakebase.py,
  checkpoint.py) — not in scope for this PR (#1, #2)

Error path tests across all 3 layers (#7):
- Core: bad function (McpError BAD_REQUEST not found), bad tool name
  (McpError BAD_REQUEST malformed), wrong args (McpError missing parameter)
- OpenAI Toolkit: bad function (ValueError wrapping), bad tool (ExceptionGroup),
  wrong args (ExceptionGroup)
- OpenAI Agents: bad function (McpError), bad tool (McpError), wrong args (UserError)
- LangChain: bad function (ExceptionGroup > McpError), wrong args (McpError)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dhruv0811 added a commit that referenced this pull request Mar 3, 2026
…re catches

Review feedback from Ann (comments #3-7):
- Remove unused pytestmark from conftest.py (#3)
- Add multi-server test: UC + VS in DatabricksMultiServerMCPClient (#4)
- Narrow conftest fixture catches: ExceptionGroup with McpError NOT_FOUND
  check instead of bare Exception — re-raises non-NOT_FOUND errors (#6)
- Revert ty/type-ignore changes to non-test files (chat_models.py, lakebase.py,
  checkpoint.py) — not in scope for this PR (#1, #2)

Error path tests across all 3 layers (#7):
- Core: bad function (McpError BAD_REQUEST not found), bad tool name
  (McpError BAD_REQUEST malformed), wrong args (McpError missing parameter)
- OpenAI Toolkit: bad function (ValueError wrapping), bad tool (ExceptionGroup),
  wrong args (ExceptionGroup)
- OpenAI Agents: bad function (McpError), bad tool (McpError), wrong args (UserError)
- LangChain: bad function (ExceptionGroup > McpError), wrong args (McpError)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dhruv0811 added a commit that referenced this pull request Apr 29, 2026
Per review on PR #425. Skipping #3 (trim) and #4 (conv_id naming) —
addressed separately.

#1 Drop owner_pod_id; ownership via heartbeat CAS on attempt_number
- Remove owner_pod_id column from Response model
- heartbeat_response(response_id, expected_attempt_number) CAS-checks
  the attempt_number column. If a heartbeat write returns 0 rows, the
  prior owner has been bumped by another pod's claim and the heartbeat
  task knows to stop.
- _heartbeat() context manager takes attempt_number; passes it through
  from _run_background_stream / _run_background_invoke.
- claim_stale_response() no longer takes a pod parameter.
- _POD_LOG_ID retained for log-line identity only (not stored in DB).

#2 Simplify prose recovery to json.dumps the events array
- _build_prose_recovery_message: was ~110 LOC structural walker
  (function_call/output pairs, narrative messages, partial-text
  reassembly). Now ~15 LOC: filter events by prior_attempt_number,
  json.dumps them, wrap in a directive prompt asking the model to
  figure out what's done vs interrupted.

#5 Drop _inject_conversation_id
- The function was defensive injection of response_id into
  context.conversation_id when no client anchor was supplied. With
  rotation handling resume, and templates / chatbot consistently
  setting conv_id, the injection was redundant.

Top-level review: proactive stale-scan loop with jitter
- New _stale_response_scanner_loop: every ~30s ± 50% jitter, queries
  responses for in_progress rows with stale heartbeats and tries to
  claim+resume them. The proactive counterpart to lazy-on-GET claim;
  ensures crashed responses get recovered even if no client polls.
- find_stale_response_ids repository function with LIMIT 50.
- Spawned in the FastAPI lifespan alongside init_db; cancelled on
  shutdown.
- Settings: stale_scan_interval_seconds=30.0,
  stale_scan_jitter_fraction=0.5.

#6 Document /_debug/kill_task in AGENTS.md
- New §4.4 explaining the test-only debug endpoint, env-var gating,
  what state it leaves the row in.

AGENTS.md updates:
- ER diagram: drop owner_pod_id, annotate attempt_number as CAS guard.
- New §3.5 documenting the proactive scanner with mermaid flowchart.
- §4.3 includes new scanner settings.

Tests: 110 pass. Ruff/format/ty all clean.

Co-authored-by: Isaac
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