diff --git a/docs/handover.md b/docs/handover.md index 664d8f2..753f511 100644 --- a/docs/handover.md +++ b/docs/handover.md @@ -142,13 +142,24 @@ established, because it is more than "the agents work": Re-run it after any change to the loop, retrieval, or prompt assembly. It is the only check that measures answers rather than boundaries. -**The seeded activity data is NOT anchored to today.** `ShiftRecord` is — -`seed.js` says so — and `UserActivity` is not, so it ages out of every window -the activity tools offer. As of 2026-08-29 the newest event was 23 days old: -zero events in the last 7 days and 6 of 15 in the last 30. The activity agent -answers truthfully and the demo looks dead. Anchoring it the way shifts are -anchored is the fix; it changes `seed.json`, so it goes through -`npm run seed:fixture` and re-runs the frontend checks. +**Seeded time-series data is rebased to now at seed time** — see +`seeder.RebaseToNow`. `ShiftRecord` is generated against now; `UserActivity`, +`JobApplication`, `AIInterview` and `Staff` are moved so their newest record +sits at today, keeping every authored gap. Without it the demo goes quiet: on +2026-08-29 the newest activity event was 23 days old, applications 16 days, +staff hire dates 35 — zero events in the last 7 days and an empty Hiring +activity chart on Control Center. + +Two things to know if you touch it. EVERY timestamp on a record shifts by the +same delta, not just the anchor: an application's created_date and updated_date +are what `buildHires` subtracts for time-to-hire, and moving one alone turns a +five-day hire into a three-week one. And `Staff` anchors on `hire_date` rather +than `created_date`, because the hire is the event the chart plots — leaving it +behind produced a workspace where somebody was hired last week according to +their application and five weeks ago according to their staff record. + +Reference data is deliberately not rebased. A course's date is a fact about the +course, not a position in a window. --- diff --git a/go-api/internal/seeder/seeder.go b/go-api/internal/seeder/seeder.go index 51ce658..4b52b87 100644 --- a/go-api/internal/seeder/seeder.go +++ b/go-api/internal/seeder/seeder.go @@ -138,6 +138,11 @@ var rebasedEntities = map[string]string{ "UserActivity": "created_date", "JobApplication": "created_date", "AIInterview": "created_date", + // Anchored on hire_date, not created_date: the hire is the event the + // Hiring activity chart plots, and leaving it behind while applications + // moved produced a workspace where somebody was hired last week according + // to their application and five weeks ago according to their staff record. + "Staff": "hire_date", } // New builds a seeder. `now` anchors the generated shift records.