Skip to content

emrg: the open-source template names its state's sources but not which one wins when they disagree #2666

Closed

Description

@argszero

emrg/server/open_source_prompt.md §1.5 tells a cycle where its state comes from: the session history the daemon replays into every cycle, plus the memory index under the source directory's .emrg/memory/. It says what to reconstruct from them, and it says to re-check reality when the history is silent or ambiguous. It does not say what to do when two of those sources disagree.

That is not a rare shape. Everything the section names is written by an earlier cycle, and none of it is refreshed when the thing it describes moves:

  • A memory entry records a state — PR #N open, awaiting review — and nothing rewrites it once that PR merges.
  • Two entries can hold different answers to one question, because a later cycle changed its mind and appended a new entry rather than replacing the old one.
  • The session history and the memory index disagree by construction, one being a replay of messages and the other a curated list.

The full-code study section already says not to work from memory or a stale tree, but it says that about the code just fetched. For the state — the phase the last cycle ran, whether a PR merged, what is blocked and on whom — the template states no order at all. So the outcome depends on which source a cycle happened to read first, and a stale claim wins exactly when it is the one that was read.

What it must satisfy

  1. §1.5 states the order among its own sources: the repository decides and a note does not — a tree, a pull request, an issue and a check run say what the project holds now, while a memory entry or an earlier message says only what a cycle concluded on the day it ran.
  2. §1.5 states the order among the notes themselves: the later stamp governs, and restating an older claim in a newer file does not make it newer.
  3. A fact a cycle could not re-measure is reported as unmeasured rather than repeated — a note restated is not a reading.
  4. The rule is stated once, in §1.5, which already owns this subject; the existing full-code-study sentence stays as it is, because it governs a different subject (the code, not the state).
  5. A test in tests/test_scheduler.py names the rule, so deleting the paragraph reddens the suite instead of quietly reverting it.

Activity

  1. argszero commented on Nov 1, 2026

    @argszero
    OwnerAuthor

    Handled by #2667

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