bug(conflicts): scan --since skips observations created on the same UTC day
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with the --since filtering in internal/store/relations.go, especially the lines cited in the report, and trace how observation timestamps are stored and compared. Check the related SinceTime filter there as well. Add regression coverage for a timestamp later on the same UTC day, then confirm the scan includes those observations.
Written by the indexing model from the issue text.
Description
Existing Issue Search
- I searched existing issues and will add evidence to a canonical tracker when applicable.
(Searched for "since RFC3339" and "conflicts scan since", and checked the 92 commits on main since v3.7.2. I found no report or fix.)
📝 Observed Consequence
engram conflicts scan --since <RFC3339> skips every observation created on the same UTC day as the --since value, even when the observation was created after that instant. A scan meant to cover only today's new memories inspects 0 observations, and the conflicts they would surface are never found.
🔄 Steps to Reproduce
export ENGRAM_DATA_DIR="$(mktemp -d)"
cd "$(mktemp -d)" && git init -q
engram save "Server port" "The test server listens on port 8080." --type decision --project demo
engram save "Server port" "The test server listens on port 9090." --type decision --project demo
sqlite3 "$ENGRAM_DATA_DIR/engram.db" "select id, created_at from observations;"
# 1|2026-11-27 07:03:53
# 2|2026-11-27 07:03:56
engram conflicts scan --project demo --since "$(date -u -d '1 hour ago' +%Y-%m-%dT%H:%M:%SZ)" --dry-run
# inspected: 0
engram conflicts scan --project demo --since "$(date -u -d '1 day ago' +%Y-%m-%dT%H:%M:%SZ)" --dry-run
# inspected: 2
✅ Expected Behavior
With --since set to one hour ago, the scan inspects both observations, because both were created after that instant.
❌ Actual Behavior
It inspects 0. Only a --since value from an earlier UTC day includes them.
The cause appears to be a text comparison between two different timestamp formats. created_at is stored as 2026-11-27 07:03:56 (with a space), while the scan binds --since as opts.Since.UTC().Format("2006-01-02T15:04:05Z") (with a T) in AND created_at >= ?. Compared as text, the space (0x20) sorts before T (0x54), so on the same day every stored row compares as earlier. See internal/store/relations.go lines 1460-1462 at 11521f4f3776.
Lines 1281-1283 build AND r.created_at >= ? for SinceTime the same way, so relation listing by time may have the same problem. I did not test that path.
Passing --since with a space is not a workaround: it fails with --since must be RFC3339 format.
Operating System
Linux (Ubuntu/Debian)
Release Version (Report Context)
engram 3.7.2 (Homebrew)
Agent / Client
Claude Code
- Dominant language
- Go
- Stars
- 7.1k
- Forks
- 729
- Avg merge
- 1h 35m
- Merged PRs (30d)
- 154
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Gentleman-Programming/engram
-
status:needs-review
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Gentleman-Programming/engram#2515 ·
Maintainers usually reply within 1 day
-
status:needs-review type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Gentleman-Programming/engram#2512 ·
Maintainers usually reply within 1 day
-
status:needs-review
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Gentleman-Programming/engram#2502 ·
Maintainers usually reply within 1 day
-
status:needs-review type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Gentleman-Programming/engram#2416 ·
Maintainers usually reply within 1 day
-
feat(claude): explicit cross-project memory saves from a Claude Code session (parity with Pi #1591)Openstatus:needs-review type:feature
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Gentleman-Programming/engram#2514 ·
Maintainers usually reply within 1 day
All issues in Gentleman-Programming/engram
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
erigontech/erigon#27233 ·
Maintainers usually reply within 1 day
-
area/tests needs-triage theme/ci-dx
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
kubescape/kubescape#6095 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
oras-project/oras-go#1853 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100