Skip to content

observer: silent skipped rule store, cross-process lost update, orphan tmp file (#216 follow-ups) #217

Closed

Description

@Alter-Igor

Follow-ups from the QA and architect passes on PR #216 (#212). None of them block it.

  1. A store skipped for one bad row is silent. List and inject now read through readRuleStore. A store with a single malformed row is read as empty, so all its rules drop out with no warning. In QA's test, one bad row in a 121-rule global store took the listing to 1. synapse_list_rules should say a store was skipped, and a diagnostics line should be written.
  2. Lost update across processes. mutate locks within one process only. A TUI and opencode serve can write the same store, and a forget's put-back can overwrite the other process's write. This was already true before fix(opencode): a failed forget puts stores back and says why; rule reads check rows (#212) #216. The Flock pattern from opencode plugin: two processes can spend the same Synapse refresh token #75 would fix it.
  3. Orphan temp file. writeJsonAtomic leaves learnings.json.*.tmp behind when the rename fails (seen once on Windows). Remove it on failure.

Activity

  1. Alter-Igor commented on Oct 17, 2026

    @Alter-Igor
    OwnerAuthor

    PR #221 covers item 1 (synapse_list_rules names a skipped store) and item 3 (no orphan temp file). Still open here:

  2. Alter-Igor commented on Oct 17, 2026

    @Alter-Igor
    OwnerAuthor

    Test follow-up from CodeRabbit on PR #221: extend the synapse_list_rules unreadable-store test to corrupt the global store as well, and check that the reply marks the global group as skipped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions