Skip to content

Fix: check_pr_ready.memory_updated no longer fails on .dmx/jobs/ writes (GH-37) - #39

Merged
hpieris-dm merged 1 commit into
mainfrom
fix-gh-37-memory-updated-job-state
Sep 11, 2026
Merged

hpieris-dm merged 1 commit into
mainfrom
fix-gh-37-memory-updated-job-state

Conversation

@hpieris-dm

@hpieris-dm hpieris-dm commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #37.

Problem

memory_updated graded all of .dmx/ for uncommitted changes (GH-15's hardening). The loop runtime's own bookkeeping under .dmx/jobs/ (written by loop_advance at the human-gate pause, per GH-23's fix) is routinely uncommitted mid-loop — _commit_dmx_state doesn't run until after _finish_loop's validators already graded the tree. So a good release loop — PR opened, memory bank already committed by create-pr — failed memory_updated purely because its own paused release-*.json was dirty. Since that check is optional (on_optional_failure: warn), the loop finished as warning/complete, with no way to /loop-continue afterward even though the PR had already landed correctly.

Fix

_dirty_dmx_files now excludes .dmx/jobs/ specifically via git status -- '.dmx' ':!.dmx/jobs', instead of all of .dmx/.

Revision note: an earlier version of this fix narrowed the check to top-level .dmx/*.md files only. That accidentally excluded other legitimate top-level files too — e.g. .dmx/shared-sources.yaml — which were correctly caught before this PR and should still be. Excluding .dmx/jobs/ by name instead keeps the check's original scope everywhere else; it only removes the runtime's own state directory from the grade.

Testing

  • test_dirty_job_state_does_not_fail_memory_check: reproduces the release-loop sequence (commit memory bank, then dirty job-state JSON) — memory_updated now passes.
  • test_dirty_memory_bank_file_still_fails_alongside_dirty_job_state: a genuinely dirty .dmx/*.md file still fails, even with dirty job state present at the same time.
  • test_dirty_non_markdown_top_level_file_still_fails: a dirty non-.md top-level file (shared-sources.yaml) still fails — guards against the over-scoped first draft of this fix.
  • Verified against pre-fix main in an isolated worktree — reproduced the exact failure (Uncommitted changes under .dmx/ (.dmx/jobs/)) before the fix, confirmed passing after.
  • Full suite: 486 passed. Ruff + mypy clean.

@hpieris-dm hpieris-dm added the bug Something isn't working label Sep 11, 2026
…es (GH-37)

memory_updated graded all of .dmx/ for uncommitted changes, so the loop
runtime's own bookkeeping under .dmx/jobs/ (written by loop_advance at the
human-gate pause, per GH-23) was mistaken for a forgotten memory-bank
edit. A good release loop — PR opened, memory bank already committed by
create-pr — failed memory_updated purely because its own paused job-state
JSON was dirty, with no way to /loop-continue afterward since the loop was
already complete.

_dirty_dmx_files now excludes .dmx/jobs/ specifically, via
git status -- '.dmx' ':!.dmx/jobs', instead of narrowing to a file
extension. Everything else under .dmx/ (memory bank files,
shared-sources.yaml, any other top-level file) is still checked exactly
as before — this only removes the runtime's own state directory from the
grade, nothing else.

Fixes #37
@hpieris-dm
hpieris-dm force-pushed the fix-gh-37-memory-updated-job-state branch from c54bd0e to 2e9257f Compare September 11, 2026 04:15
@hpieris-dm
hpieris-dm merged commit 75e387f into main Sep 11, 2026
13 checks passed
@hpieris-dm
hpieris-dm deleted the fix-gh-37-memory-updated-job-state branch September 11, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: check_pr_ready.memory_updated fails on the orchestrator's own .dmx/jobs/ write after a good PR

1 participant