Feature 04 task 2: Household week and local-time utilities #18

Member

Implements Feature 04 task 2 (c1edef2a). Done-condition: internal/household provides, for a given IANA zone, Today, WeekStart (ISO Monday), WeekDays (Mon-Sun), a week label ("Week 41 - Oct 5 - 11", month-spanning "Sep 28 - Oct 4"), ISO week period keys ("2026-W41"), and LocalTime(date, HH:MM)->instant; tests run under process TZ UTC with America/Chicago and Pacific/Auckland covering Sunday-night vs Monday-morning, spring-forward and fall-back DST days, the 2026-W53/2027-W01 boundary and a month-spanning label; quality floor passes.

Evidence (developer-run): gofmt empty; go vet clean; TZ=UTC go test -race all packages pass; CGO_ENABLED=0 build ok; make test ok. Standard library only.

Known follow-up (not in this task): the Go image bundles no tzdata, so loading an IANA zone at runtime needs import _ "time/tzdata" or a tzdata package; flagged for the task that loads the household zone.

Implements Feature 04 task 2 (c1edef2a). Done-condition: internal/household provides, for a given IANA zone, Today, WeekStart (ISO Monday), WeekDays (Mon-Sun), a week label ("Week 41 - Oct 5 - 11", month-spanning "Sep 28 - Oct 4"), ISO week period keys ("2026-W41"), and LocalTime(date, HH:MM)->instant; tests run under process TZ UTC with America/Chicago and Pacific/Auckland covering Sunday-night vs Monday-morning, spring-forward and fall-back DST days, the 2026-W53/2027-W01 boundary and a month-spanning label; quality floor passes. Evidence (developer-run): gofmt empty; go vet clean; TZ=UTC go test -race all packages pass; CGO_ENABLED=0 build ok; make test ok. Standard library only. Known follow-up (not in this task): the Go image bundles no tzdata, so loading an IANA zone at runtime needs import _ "time/tzdata" or a tzdata package; flagged for the task that loads the household zone.
dev_agent added 1 commit 2026-10-03 09:51:45 -04:00
Add household week and local-time utilities
CI / ci (pull_request) Successful in 1m27s
Independent review Codex gpt-6-sol high: APPROVED (0 findings)
CI / ci (push) Successful in 1m24s
1cc8bf99cd
internal/household provides Today, WeekStart, WeekDays, WeekLabel,
PeriodKey and LocalTime, all in the household IANA zone and never the
process zone. Weeks are ISO Monday to Sunday; calendar arithmetic runs
on UTC midnights so DST never shifts dates.

LocalTime reads a skipped or repeated wall time with the UTC offset in
effect before the transition: a spring-forward gap moves forward by its
length, and a fall-back repeat is its first occurrence.

store gains LocalDateOf and LocalDate.Date so household builds dates
without reparsing, and LocalDate.Value rejects years outside 0000-9999.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent review — Codex gpt-6-sol, reasoning high

Verdict: APPROVED
Reviewed SHA: 1cc8bf99cd1faa5cbac93745dd7ac0919ad425a2

{
  "verdict": "APPROVED",
  "reviewed_sha": "1cc8bf99cd1faa5cbac93745dd7ac0919ad425a2",
  "summary": "The APIs, DST rules, and tests meet the stated requirements. No process-TZ leakage, duplicate LocalDate implementation, or new dependency was found. gofmt, go vet, and git diff --check passed. The race tests could not run because the read-only filesystem prevented Go from creating its temporary build directory.",
  "findings": []
}

Posted unaltered by review_agent. This is transport, not a second review.

## Independent review — Codex `gpt-6-sol`, reasoning high Verdict: **APPROVED** Reviewed SHA: `1cc8bf99cd1faa5cbac93745dd7ac0919ad425a2` ```json { "verdict": "APPROVED", "reviewed_sha": "1cc8bf99cd1faa5cbac93745dd7ac0919ad425a2", "summary": "The APIs, DST rules, and tests meet the stated requirements. No process-TZ leakage, duplicate LocalDate implementation, or new dependency was found. gofmt, go vet, and git diff --check passed. The race tests could not run because the read-only filesystem prevented Go from creating its temporary build directory.", "findings": [] } ``` --- Posted unaltered by `review_agent`. This is transport, not a second review.
approver_agent merged commit 5e78465d34 into feature/49e2f2e2-c9c1-4c1b-8d66-753ceeadbf75-platform-services 2026-10-03 09:58:07 -04:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/MealQuest#18