with one click
backend-test-worker
// Build and verify real-Postgres Go tests and thin transport smoke for tracking behavior.
// Build and verify real-Postgres Go tests and thin transport smoke for tracking behavior.
Use when working in this repository after receiving recurring coding feedback, adding or reviewing durable lint guardrails from AGENTS.md, updating Rules/*.md, or finishing changes that should be checked by harness-lint.
Build and verify page-flow and E2E coverage for the tracking browser surface.
Build cross-layer regression coverage that ties browser-visible behavior to backend truth.
Harden shared test infrastructure, runtime readiness, schema setup, and parallel lane behavior.
Update backend timer/time-entry contracts, regressions, and source docs for the timer refactor mission.
Audit and finalize inline source-document status blocks for the timer refactor mission.
| name | backend-test-worker |
| description | Build and verify real-Postgres Go tests and thin transport smoke for tracking behavior. |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the work procedure.
Use for features that add or fix Go unit/application tests, real-Postgres integration tests, thin transport/contract smoke, conflict regressions, and historical-fact retention coverage.
None.
mission.md, mission AGENTS.md, {repo-root}/.factory/services.yaml, and {repo-root}/.factory/library/architecture.md from this repository checkout (not any personal ~/.factory location).expectedBehavior bullet from the
feature, and convert each one into an explicit backend acceptance case before editing code. Do
not stop after proving only one invalid-input variant if the feature or contract names more than
one.Workspace + User200 + null, or invalid-save no-mutation semantics.expectedBehavior bullet or requested regression path turns out to be
impossible under the current documented/API contract, stop and return to orchestrator with the
exact boundary instead of deleting the failing case and marking the feature complete.{
"salientSummary": "Added real-Postgres tracking lifecycle tests for stopped-entry create/edit/readback, invalid time rejection, and idle current-timer `200 + null` semantics. Also kept transport smoke thin by proving the current-timer body shape without moving business logic into handler tests.",
"whatWasImplemented": "Expanded backend coverage for tracking time-entry lifecycle using the dedicated test schema on the shared external PostgreSQL service. The new tests prove canonical direct readback after create and edit, preserve prior state on invalid save attempts, and lock down the documented idle current-timer semantic with a thin HTTP smoke check.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{
"command": "go test ./apps/backend/internal/tracking/... -count=1 -parallel 4",
"exitCode": 0,
"observation": "Tracking application tests passed with the new lifecycle coverage."
},
{
"command": "go test ./apps/backend/internal/bootstrap/... -count=1 -run 'TestPublicTrackTracking|TestRouteHandlers'",
"exitCode": 0,
"observation": "Thin transport smoke for current-timer semantics passed."
}
],
"interactiveChecks": [
{
"action": "Manually inspected one representative current-timer HTTP response after clearing running state.",
"observed": "The endpoint returned HTTP 200 with literal null body and the direct read model remained idle."
}
]
},
"tests": {
"added": [
{
"file": "apps/backend/internal/tracking/application/update_time_entry_test.go",
"cases": [
{
"name": "rejects invalid stop before start without mutating the persisted entry",
"verifies": "VAL-ENTRY-003"
},
{
"name": "materializes start plus duration without stop as a stopped entry",
"verifies": "VAL-ENTRY-005"
}
]
}
]
},
"discoveredIssues": []
}