Skip to content

[Bounty proposal] fix(edit-tools): harden owner extraction, configurable resilience, and turn_refs guards (– proposed) #23409

Closed

Description

@MD-Mushfiqur123

Bounty Proposal: Edit Tools Resilience, Config Guards & Input Validation ($50–$100 USD)

Pull Request: #23408
Target Maintainers: @kodjima33 @Git-on-my-level @josancamon19 @undivisible

Description

Hardens backend/utils/retrieval/tools/edit_tools.py and backend/utils/retrieval/turn_refs.py against edge cases, unhandled type mismatches, and runtime failures during LangGraph chat tool executions:

  1. Owner Extraction Resilience: owner(config) safely extracts configurable using (config or {}).get('configurable') or {}, preventing unhandled AttributeError: 'NoneType' object has no attribute 'get' when callers pass {"configurable": None} or uninitialized configs. It now cleanly raises PermissionError('Authenticated owner required') as documented.
  2. Turn Reference Guards: initialize_turn_refs, register_record_ref, and resolve_edit_ref in turn_refs.py guard against non-dict or None configurable inputs, preventing downstream crashes when accessing chat scopes or turn references.
  3. Edit Tools Config Fallback: All 4 edit tools (update_conversation, rename_person, edit_memory, delete_memory) safely normalize configurable before invoking resolve_edit_ref.
  4. Target Name Sanitization: rename_person validates name before invoking the MCP handler, rejecting empty, whitespace-only, None, or >100 character names with a structured invalid_name tool error.
  5. Hermetic Test Suite: Adds 15 isolated unit tests in backend/tests/unit/test_edit_tools_resilience.py with 100% pass rate (15/15 passing).

Settlement Details

  • Proposed Bounty: $50–$100 USD on merge via Algora / Crypto
  • Contributor: @MD-Mushfiqur123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions