Fix: check_pr_ready.memory_updated no longer fails on .dmx/jobs/ writes (GH-37) - #39
Merged
Merged
Conversation
…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
force-pushed
the
fix-gh-37-memory-updated-job-state
branch
from
September 11, 2026 04:15
c54bd0e to
2e9257f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #37.
Problem
memory_updatedgraded all of.dmx/for uncommitted changes (GH-15's hardening). The loop runtime's own bookkeeping under.dmx/jobs/(written byloop_advanceat the human-gate pause, per GH-23's fix) is routinely uncommitted mid-loop —_commit_dmx_statedoesn't run until after_finish_loop's validators already graded the tree. So a goodreleaseloop — PR opened, memory bank already committed bycreate-pr— failedmemory_updatedpurely because its own pausedrelease-*.jsonwas dirty. Since that check is optional (on_optional_failure: warn), the loop finished aswarning/complete, with no way to/loop-continueafterward even though the PR had already landed correctly.Fix
_dirty_dmx_filesnow excludes.dmx/jobs/specifically viagit status -- '.dmx' ':!.dmx/jobs', instead of all of.dmx/.Revision note: an earlier version of this fix narrowed the check to top-level
.dmx/*.mdfiles 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_updatednow passes.test_dirty_memory_bank_file_still_fails_alongside_dirty_job_state: a genuinely dirty.dmx/*.mdfile still fails, even with dirty job state present at the same time.test_dirty_non_markdown_top_level_file_still_fails: a dirty non-.mdtop-level file (shared-sources.yaml) still fails — guards against the over-scoped first draft of this fix.mainin an isolated worktree — reproduced the exact failure (Uncommitted changes under .dmx/ (.dmx/jobs/)) before the fix, confirmed passing after.