Problem
The WordPress workspace refresh and standalone worktree provider hash the same remote-ref listing with different byte normalization. WordPress-side GitRunner returns for-each-ref output without the trailing newline, while StandaloneWorktreeProvider::run_git() preserves raw stdout.
As a result, workspace git pull --allow-primary-refresh writes valid filesystem evidence that standalone planning can never match. A current primary remains blocked with freshness_refresh_required after the exact prescribed refresh.
Reproduction
- Refresh a clean primary with
wp datamachine-code workspace git pull <repo> --allow-primary-refresh.
- Confirm
.git/datamachine-code-freshness.json exists.
- Invoke standalone planning for a new worktree.
- Observe
freshness_refresh_required.
- Hash identical
git for-each-ref --format='%(refname) %(objectname)' refs/remotes/origin output with and without its final newline; the filesystem evidence matches the newline-free digest while standalone planning computes the newline-preserving digest.
Expected
Define one canonical remote-ref serialization/digest contract and use it in both WordPress and standalone paths. Existing version-2 evidence produced by an explicit refresh should immediately authorize standalone planning for unchanged refs.
Acceptance criteria
- WordPress refresh evidence and standalone matching use byte-identical normalization.
- Deterministic coverage includes raw Git output with a trailing newline.
- Changed refs still invalidate evidence fail-closed.
- A release-style trackerless standalone plan succeeds after the prescribed WordPress refresh.
Related to #1314, but this is the current cross-runtime digest incompatibility rather than the missing standalone refresh command.
AI assistance
OpenAI GPT-5.6 Sol via OpenCode traced the failed release through both freshness implementations, compared the exact digest inputs, and identified trailing-newline normalization as the mismatch. Chris Huber directed and authorized the upstream repair.
Problem
The WordPress workspace refresh and standalone worktree provider hash the same remote-ref listing with different byte normalization. WordPress-side
GitRunnerreturnsfor-each-refoutput without the trailing newline, whileStandaloneWorktreeProvider::run_git()preserves raw stdout.As a result,
workspace git pull --allow-primary-refreshwrites valid filesystem evidence that standalone planning can never match. A current primary remains blocked withfreshness_refresh_requiredafter the exact prescribed refresh.Reproduction
wp datamachine-code workspace git pull <repo> --allow-primary-refresh..git/datamachine-code-freshness.jsonexists.freshness_refresh_required.git for-each-ref --format='%(refname) %(objectname)' refs/remotes/originoutput with and without its final newline; the filesystem evidence matches the newline-free digest while standalone planning computes the newline-preserving digest.Expected
Define one canonical remote-ref serialization/digest contract and use it in both WordPress and standalone paths. Existing version-2 evidence produced by an explicit refresh should immediately authorize standalone planning for unchanged refs.
Acceptance criteria
Related to #1314, but this is the current cross-runtime digest incompatibility rather than the missing standalone refresh command.
AI assistance
OpenAI GPT-5.6 Sol via OpenCode traced the failed release through both freshness implementations, compared the exact digest inputs, and identified trailing-newline normalization as the mismatch. Chris Huber directed and authorized the upstream repair.