Repository navigation
feat(wiki): persist a claim's event time in wiki.claim_events (#717, slice 2) - #894
Conversation
…slice 2) ClaimEvent.event_time (slice 1, #875) existed only in memory: the table had no column for it, so a stored claim kept extracted_at and lost the time of the event it describes. The column holds the JSON of EventTime (JSONB in PostgreSQL, JSON in SQLite) so a naive bound stays naive and an aware bound keeps its stated offset; a TIMESTAMPTZ pair would normalise both to UTC. Older stores migrate once, existing rows reading back unknown. Refs #717 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018kyZYunvyM3xpNmz9DLUT7
|
CI autopilot :
--- a/.github/workflows/supersession-delete-parity.yml
+++ b/.github/workflows/supersession-delete-parity.yml
@@
- name: Install the locked unit and lint environment
uses: ./.github/actions/uv-locked-install
with:
environment: ${{ github.workspace }}/.venv
- set: --extra dev --extra sqlite --extra codebase --extra postgresql --group lint
+ set: --extra dev --extra sqlite --extra codebase --extra postgresql --group lint --group devÀ décider par un humain : appliquer ce diff sur Generated by Claude Code |
|
CI autopilot :
Generated by Claude Code |
#910) ci_unit.sh ends with the mutation gate and mutmut lives in the dev dependency group; uv-locked-install syncs with --no-default-groups, so memory-exact-review and supersession-delete-parity failed with "Failed to spawn: mutmut" before any mutant ran (#894). A test now requires --group dev in every workflow that runs the unit suite through uv-locked-install.
|
CI autopilot : hold levé.
Generated by Claude Code |
|
CI autopilot :
Generated by Claude Code |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @cdeust's task in 2m 54s —— View job Review of PR #894 (review 1 of 3)
None of the five reviews found a Blocker. Three Notes are posted, none needed before merge:
Verdict: approve |
Review 1 of 3 (ADR-1119): PR #894, head
|
Summary
Slice 2 of #717:
wiki.claim_eventspersistsClaimEvent.event_time. Slice 1 (#875) defined theEventTimecontract, but the table had no column for it, so a stored claim kept onlyextracted_at. Root cause: the contract stopped at the model; the insert path (_claim_to_dict→insert_claim_events) and both schemas dropped the field.event_time, the JSON ofEventTime:JSONBin PostgreSQL,JSONin SQLite (decltype →json.loads). JSON rather than aTIMESTAMPTZpair:TIMESTAMPTZnormalises to UTC and erases both the naive/aware distinction and the offset the source stated, which slice 1 requires to be kept.ALTER TABLE … ADD COLUMN IF NOT EXISTSinMIGRATIONS_DDL(PG), an entry insqlite_schema.MIGRATIONS(SQLite). Existing rows read back{"kind": "unknown"}, never a date taken fromextracted_at.wiki_extract._claim_to_dictwritesclaim.event_time.model_dump(mode="json").Refs #717 (remaining slices: extracting stated dates in
core/claim_extractor, then carrying the field through synthesis and retrieval).Type of change
Test plan
tests_py/infrastructure/test_claim_event_time_persistence.py, parametrised SQLite / PostgreSQL:unknown;unknown.main(KeyError: 'event_time').tests_py/core/test_wiki_coverage_dashboard.py::test_unreadable_page_is_skipped_not_fatal, which fails the same way onmainhere (the environment runs as root, so a chmod-000 page is still readable).ruff check/ruff format --checkon the changed files: clean.python scripts/check_craftsmanship.py: OK.Audit notes
Coding-standards compliance
source:annotation.Breaking changes
None: the column has a default, and callers that pass no
event_timestoreunknown.Reviewer checklist
Generated by Claude Code