Conversation
Greptile SummaryThis PR expands the Fireworks/GLM deployment availability from weekdays-only to every day of the week (9am ET–5pm PT), simplifies the next-start offset logic to a single ternary, removes the Confidence Score: 5/5Safe to merge — logic is correct and well-tested; only remaining finding is a minor dead field cleanup. All P0/P1 issues are absent. The single finding is a P2 style issue: the common/src/constants/freebuff-models.ts — the
|
| Filename | Overview |
|---|---|
| common/src/constants/freebuff-models.ts | Core logic change: removes weekend check and simplifies next-start offset to a single ternary; weekday field in ZonedDateParts is now unused dead code |
| common/src/tests/freebuff-models.test.ts | Test cases correctly updated: adds Saturday weekend coverage, adjusts weekday-label test to a Sunday cross-midnight scenario, and removes "local" suffix from expected strings |
| web/src/llm-api/fireworks.ts | Comment updated from "Mon-Fri" to "daily"; no logic change — delegates entirely to isFreebuffDeploymentHours |
| web/src/llm-api/tests/fireworks-deployment.test.ts | Test updated to expect weekend deployment to be active; description changed from "inactive on weekends" to "active on weekends during deployment hours" |
| web/src/app/api/v1/freebuff/session/tests/session.test.ts | Updates expected availableHours string to include "every day" — straightforward constant update |
| web/src/server/free-session/tests/public-api.test.ts | Updates expected availableHours string to include "every day" — straightforward constant update |
Comments Outside Diff (1)
-
common/src/constants/freebuff-models.ts, line 33-36 (link)weekdayfield is now dead codeZonedDateParts.weekdayis still fetched viaweekday: 'short'ingetZonedParts, but after removingisWeekendandgetWeekdayIndex, nothing readseastern.weekdayorpacific.weekdayanywhere in the file. TheformatLocalTimepath uses its ownIntl.DateTimeFormatcall directly. The field and theweekdayformat option ingetZonedPartscan be removed as part of the stated simplification goal.Prompt To Fix With AI
This is a comment left during a code review. Path: common/src/constants/freebuff-models.ts Line: 33-36 Comment: **`weekday` field is now dead code** `ZonedDateParts.weekday` is still fetched via `weekday: 'short'` in `getZonedParts`, but after removing `isWeekend` and `getWeekdayIndex`, nothing reads `eastern.weekday` or `pacific.weekday` anywhere in the file. The `formatLocalTime` path uses its own `Intl.DateTimeFormat` call directly. The field and the `weekday` format option in `getZonedParts` can be removed as part of the stated simplification goal. How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
This is a comment left during a code review.
Path: common/src/constants/freebuff-models.ts
Line: 33-36
Comment:
**`weekday` field is now dead code**
`ZonedDateParts.weekday` is still fetched via `weekday: 'short'` in `getZonedParts`, but after removing `isWeekend` and `getWeekdayIndex`, nothing reads `eastern.weekday` or `pacific.weekday` anywhere in the file. The `formatLocalTime` path uses its own `Intl.DateTimeFormat` call directly. The field and the `weekday` format option in `getZonedParts` can be removed as part of the stated simplification goal.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "Make Fireworks deployment hours daily" | Re-trigger Greptile
Summary
This updates the shared Freebuff/Fireworks deployment availability window so GLM is available every day from 9am ET until before 5pm PT instead of only Monday through Friday. It also removes the redundant client-facing "local" suffix from availability labels and updates server fallback copy to say "9am ET-5pm PT every day".
Validation
Ran targeted Bun tests for the shared Freebuff model helper, Fireworks routing, free-session public API, and freebuff session handlers with required dummy web env vars.