Skip to content

guard: freshness-block message gives the exact remediation syntax (3.8.6)#153

Merged
CryptoJones merged 1 commit into
mainfrom
feat/guard-freshness-exact-syntax
Jul 7, 2026
Merged

guard: freshness-block message gives the exact remediation syntax (3.8.6)#153
CryptoJones merged 1 commit into
mainfrom
feat/guard-freshness-exact-syntax

Conversation

@CryptoJones

Copy link
Copy Markdown
Owner

What

Improves the guard's GIT_FRESHNESS_MESSAGE (the repo-work-fresh-base block) to hand the agent the exact working remediation instead of a riddle.

The old message — "run git fetch --all --prune … then inspect branch status" — is technically true but leaves agents guessing. In practice they chain the fetch into the same command but with a $VAR path (the static parser doesn't resolve it), or run a fetch that exits non-zero (--all hitting a keyless Codeberg mirror, which doesn't register), and burn many turns flailing. (This PR was born from exactly that — an hour lost committing to a sibling repo.)

The new message spells out the working form verbatim: a literal-path fetch chained in the same command as the write (git -C "/abs" fetch --all --prune && git -C "/abs" <write>), and names the three silent-failure gotchas: $VAR path not resolved, pipe/redirect in the fetch part, and a non-zero-exit fetch when --all hits a keyless mirror → use fetch origin --prune.

Changes

  • src/omind/guard.pyGIT_FRESHNESS_MESSAGE text only (no behavior change).
  • CHANGELOG.md[3.8.6] entry.
  • version bump 3.8.5 → 3.8.6 (pyproject.toml, src/omind/__init__.py).

Tests

Full suite green — 756 passed, 1 skipped. No test pins the message text.

Note: pushed to GitHub only — Codeberg (source of truth) SSH key wasn't loaded in the session; please mirror to Codeberg.

Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/

… (3.8.6)

GIT_FRESHNESS_MESSAGE was a riddle; agents flailed for many turns. It now spells out the working form:
a literal-path fetch chained in the SAME command as the write
(git -C "/abs" fetch --all --prune && git -C "/abs" commit ...), plus the silent-fail gotchas
($VAR path not resolved; pipe/redirect in the fetch; exit-nonzero fetch when --all hits a keyless mirror
-> use fetch origin --prune). Message text only, no behavior change. +CHANGELOG [3.8.6], version bump. 756 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@CryptoJones CryptoJones merged commit 4107cfc into main Jul 7, 2026
6 of 15 checks passed
@CryptoJones CryptoJones deleted the feat/guard-freshness-exact-syntax branch July 7, 2026 03:28
CryptoJones added a commit that referenced this pull request Jul 7, 2026
…uff E501) (#154)

The 3.8.6 message (#153) exceeded the 100-col limit on 5 string lines, reddening ci (ruff check .).
Rewrapped the literals — identical runtime text, each source line <=100. ruff clean, 134 guard tests pass.
This is the 'run everything CI runs (ruff + pytest), not just tests' rule I skipped before #153.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant