Follow-up from "Create DesiredConfigFetcher and ConfigToApplyBuilder in RemoteDevelopment::WorkspaceOperations::Reconcile::Output"
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=554020)
</details>
<!--IssueSummary end-->
The following discussion from !194727 should be addressed:
- [ ] @cwoolley-gitlab started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/194727#note_2606209698):
> **issue (bug):** There is an existing problem with the `workspace_agentk_states` factory, which was missed in the original MR https://gitlab.com/gitlab-org/gitlab/-/merge_requests/190027+s (which I did not review).
>
> It was writing raw JSON string to the field:
>
> ```ruby
> desired_config do
> RemoteDevelopment::FixtureFileHelpers.read_fixture_file('example.desired_config.json')
> end
> ```
>
> ...rather than parsing and writing the Array object:
>
> ```ruby
> desired_config do
> Gitlab::Json.parse(RemoteDevelopment::FixtureFileHelpers.read_fixture_file("example.desired_config.json"))
> end
> ```
>
> This was not caught, for two reasons:
>
> 1. because [that MR also did not adequately test this field](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/190027/diffs#6b4aa2926149b591ef3fca21448c8382c203b072_0_24) in the `it "has correct associations from factory" do` example:
>
> ```ruby
> it "has correct associations from factory" do
> expect(workspace_agentk_state.workspace).to eq(workspace)
> expect(workspace_agentk_state.project).to eq(project)
> end
> ```
>
> I've now improved the spec in my patch, to catch this and drive the fix.
>
> 2. The `workspaces` factory was not updated to properly populate the association for `workspace_agentk_state` (and test it and its validity in its `it "has correct associations from factory" do` example. I've also updated this in my patch.
>
> ----
>
> It looks like there are similar problems/omissions with many of the other Workspace domain model specs/factories. We should open a follow-up issue to revisit all of these and make them consistent and correct.
issue