Skip to content

Implement /clean endpoint for index cleanup #30

Description

@clafollett

Description

Implement the /clean endpoint to remove stale and outdated index entries.

Current State

  • No implementation
  • Defined in OpenAPI spec

Acceptance Criteria

  • Implement POST /clean route
  • Remove entries for deleted files (file no longer exists)
  • Remove entries older than specified duration
  • Return cleanup statistics (removed chunks, freed space)
  • Add unit tests with mocks
  • Add integration tests
  • Update OpenAPI documentation

API Request/Response

// Request
{
  "older_than": "7d",        // Duration string
  "missing_files": true        // Remove deleted files
}

// Response
{
  "removed_chunks": 1234,
  "freed_space_mb": 45.6
}

Related

  • See api/codetriever-openapi.yaml for full spec

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions