bug(doctor): inert foreign sync targets remain error-tier despite no-action guidance
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 62/100
Research direction
Start in internal/diagnostic/checks.go, where SyncTargetClosedSpaceCheck.Run assigns SeverityError to every foreign state row, and compare it with safeNextStepForForeignSyncTarget, which already treats zero-pending rows as inert. Then read the test "inert foreign row with zero pending mutations keeps the no-action guidance" in checks_closed_space_test.go. Done means a foreign row with zero unacked mutations reports at warning tier, rows with pending mutations stay at error, and the tests cover both cases.
Written by the indexing model from the issue text.
Description
📝 Bug Description
An inert foreign sync-state row keeps Doctor in error even when unacked_mutations = 0 and its own guidance says "no action is required" and "no data is at risk". This diagnostic-severity follow-up is split from #1188, not a request to implement cloud-inbox routing.
Earlier trackers #1158 and #1199 are closed. Current main already exposes a local foreign-target repair, so this report does not repeat the historical claim that no repair exists.
🔄 Steps to Reproduce
Reported released-build occurrence (not newly executed by the triage author):
- On Engram 3.4.0, retain an unrelated legacy
cloud:generalstate row with lifecycleidleand zero unacknowledged mutations. - Configure Cloud and fully synchronize the explicitly enrolled active project.
- Run
engram doctor --project <project>. - Observe
sync_target_closed_space/foreign_sync_targetas an error despite the inert row.
Original evidence: https://github.com/Gentleman-Programming/engram/issues/1188#issuecomment-6158458927
Current source independently pins this behavior: the test case "inert foreign row with zero pending mutations keeps the no-action guidance" seeds an inert foreign row and expects StatusError. This test was inspected, not run during triage.
✅ Expected Behavior
Retain visibility of inert foreign-target drift without error-tier grading when the diagnostic itself establishes no pending mutations and no action required. Warning-tier grading should not require inbox routing or a Cloud backend.
Do not blanket-downgrade targets with pending mutations or other actionable evidence. Preserve local observations, journal history, enrollment and delivery behavior.
❌ Actual Behavior
SyncTargetClosedSpaceCheck.Run assigns SeverityError to every foreign state row; safeNextStepForForeignSyncTarget simultaneously classifies zero-pending rows as inert/no-risk/no-action-required.
Operating System
Not specified in the original 3.4.0 occurrence; source-level finding is platform-independent.
Engram Version
3.4.0 in the linked user report. Source inspected at main commit 11f8f1a58eff8e238148967b32cdc413bd54c90d.
Agent / Client
Other. The original occurrence does not identify a client; the observed interface is Doctor CLI.
📋 Relevant Logs
status: error
checks: 9 ok, 1 error
check_id: sync_target_closed_space
reason_code: foreign_sync_target
target_key: cloud:general
lifecycle: idle
unacked_mutations: 0
Quoted from the linked report, not generated by this triage.
💡 Additional Context
Pinned source:
- Unconditional error severity and inert guidance.
- Existing inert-row test expecting error.
- Existing local repair dispatch.
Out of scope: aliases, two-stage derivation, inbox routing/claim/drop, migration policy, enrolled delivery-lane changes, payload-directory backfill (#1424 / #1443), and speculative data-loss findings. Keep #1188 as the routing feature tracker.
- Dominant language
- Go
- Stars
- 7.1k
- Forks
- 729
- Avg merge
- 10h 43m
- Merged PRs (30d)
- 332
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 type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Gentleman-Programming/engram#1687 ·
Maintainers usually reply within 1 day
-
priority:medium status:needs-review type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Gentleman-Programming/engram#863 · 1 comment ·
Maintainers usually reply within 1 day
-
question(sync): isolate enrolled-repair writer blocking in a reproducible fixturePossibly taken @dnlrsls claimed this today. Openstatus:approved type:question
Gentleman-Programming/engram#1913 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
status:needs-review type:bug
Difficulty 4/5 3-5 days Newbie friendliness 12/100
Gentleman-Programming/engram#1912 ·
Maintainers usually reply within 1 day
-
status:needs-review type:bug
Difficulty 5/5 Over a week Newbie friendliness 15/100
Gentleman-Programming/engram#1911 ·
Maintainers usually reply within 1 day
All issues in Gentleman-Programming/engram
Similar issues
-
Named Tuple element with a space in its name fails to parsePossibly taken @spicysharkco claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/clickhouse-go#2073 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
ci: nothing regenerates the Go contract types, so a hand-edit to types.gen.go passesPossibly taken @shaiknoorullah claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
shaiknoorullah/hg-mono#993 · 2 comments ·
Maintainers usually reply within 1 day
-
type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CarlosDanielDev/aiacc#78 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100