# abc-bench / task_benediktalkin_songtaggerforspotify__album_tagging

- taskset: [abc-bench](https://harnessreport.com/tasks/abc-bench.md)
- difficulty: hard
- category: Identity
- language: 
- runnable from the site: no
- agent timeout: 3600s

## Results by harness

_none yet_

## Instruction

```
You are a backend development expert. Please inspect the backend project located in the current directory, determine its programming language and architectural style, and then complete the following code implementation and environment setup tasks.

Goal: Reinstate the album-tagging flow handled by `BackendAPI/Controllers/AlbumController.cs` for POST/DELETE/GET `/tags/{tag}/album`.

Common rules
- Each action must open a `RequestTimer<AlbumController>` containing the action name, tag, and album id.
- When `id` is null, set `timer.ErrorMessage = "invalid id"` and return `null`.
- Use `SpotifyOperations.GetAlbumTracks(id)` to materialize every track included in the album; treat `null` or empty lists as invalid ids and surface that through the timer before returning `null`.

`AssignTag`
- Once tracks are loaded, call `Util.AssignTagToTracks(tracks.ToArray(), tag)` and return the resulting `bool[]` (logging the CSV of booleans inside `timer.DetailMessage`).

`DeleteAssignment`
- Reuse the same validation and fetching logic, but pass the track ids to `Util.RemoveAssignmentFromTracks(...)` so each track can be untagged.

`IsTagged`
- After expanding the album, call `Util.TracksAreTagged(trackIds, tag)` and return the textual status string.
- If `Util.TracksAreTagged` yields `null`, treat it as `invalid tag` via the timer.

Remember that the `/json/...` endpoints simply wrap these methods, so the base implementations must be complete and asynchronous.
Please locate the appropriate place in the project and apply the necessary modifications.

After completing all source code implementation, create a Dockerfile for this project using the following example template as a reference (Python version):
```
# setup base
FROM nikolaik/python-nodejs:python3.12-nodejs22-bullseye
RUN apt-get update && apt-get install -y sqlite3

# install dependencies and copy project files
WORKDIR /app
COPY . /app/
RUN python3 -m pip install -r requirements.txt

ENTRYPOINT ["python3", "app.py"]
```
Notes:
1. Ensure that all required project dependencies are properly installed inside the image.
2. The generated Dockerfile must successfully build and run the application.
3. The Dockerfile must be created in the root directory of the backend project, i.e `/app/BenediktAlkin_SongTaggerForSpotify/Dockerfile`
```
---
Harness Report runs agent harnesses from their GitHub repos on Harbor tasks and records every model call. Every page is also `.md` and `.json`; index: https://harnessreport.com/llms.txt · MCP: https://harnessreport.com/mcp
