Skip to content

Source converge: read historical patch sets byte-exactly (srv8 arm A tree, digest 0f979787) - #12418

Merged
gunbai-bot[bot] merged 4 commits into
mainfrom
session/neat-carp-40
Sep 28, 2026
Merged

gunbai-bot[bot] merged 4 commits into
mainfrom
session/neat-carp-40

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Fixes the #12336 source-converge ownership-by-content defect that refused srv8's arm A tree (production build run 36326156975).

Why the history match missed

  • Enumeration was fine. LogPathCommits over the two patch paths includes 034aef0, whose bytes are the set main 77193e6 carried (arm A, run 36207135528).
  • --index was fine. The scratch worktree applies with git apply --index, the same as the real converge.
  • The bytes were wrong. v41_known_patch_set_at read each historical blob with git.Core.Show. Its content comes from "stdout", and the shell channel's retained text is trim_end()ed (bounded_shell_host_drain retained_utf8_lossy_trimmed). In 034aef0, engram_storage_backed.patch ends in two blank context lines ((__name__)\n \n \n). After the trim and one re-appended \n, the hunk was two lines short, git apply refused it (corrupt patch at line 22, reproduced), and the set contributed no digest. So the tree's digest matched no set, and the converge refused it as not ours.

Wet re-derivation: a fresh vllm checkout at d2d649e674c7, with both 034aef0 blobs applied via git apply --index, gives git diff --binary HEAD sha256 = 0f979787aa2a52e0…, which is srv8's digest.

Fix

  • New declared operation git.Core.RestoreBlobTo (git --work-tree=<dir> restore --source=<ref> --worktree -- <path>). It writes the blob byte-exactly and leaves the index untouched.
  • The fold restores each member into a mktemp scratch work tree and reads it with Filesystem.Read, the same read the declared patch already takes. It removes the scratch dir afterwards. A scratch dir that can't be created derives no sets, which can only make the fold refuse more.

RED

red5_the_arm_a_set_srv8_carried_is_derived_byte_exactly_from_history derives the 034aef0 set from history. It asserts the hook member keeps its trailing blank context, and that both members' sha256 equal the git blob contents at that commit. The patch paths are supplied as values; DigestFile is not re-run.

  • Control, run live with a locally built gunbc run --claim-run: FAIL with the pre-fix fold swapped in, PASS with the fix. All 19 claims in the module PASS live.
  • Note: claim_batch is hermetic and reports a route gap, not a verdict, for this claim and for the two pre-existing effectful claims in the module (digestfile_inhabits…, empty_diff…).
  • The claim needs history, which CI has (fetch-depth: 0).

Not changed, and worth knowing: every other git.Core.Show consumer gets trimmed content. Show is fine for text whose trailing whitespace carries no meaning. Byte-exact consumers should use RestoreBlobTo.

🤖 Generated with Claude Code

gunbc-ci-auto-heal and others added 4 commits September 27, 2026 15:09
…srv8 arm A, digest 0f979787)

git.Core.Show carries a blob through the shell stdout channel, which is
trailing-whitespace trimmed. The 034aef0 set (the one main 77193e6 carried,
srv8's arm A tree) ends engram_storage_backed.patch in two blank context
lines; the re-appended newline left the hunk short, git apply refused it as
corrupt in the scratch worktree, and the set contributed no digest, so a tree
that is ours was refused as not ours. Members are now restored byte-exactly
(git.Core.RestoreBlobTo, index untouched) and read with Filesystem.Read.
RED: red5 derives the 034aef0 set from history at blob-exact bytes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rol: RED on the Show route, GREEN on RestoreBlobTo

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…itory history, not a mock

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…the unbalanced source)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot added this pull request to the merge queue Sep 27, 2026
Merged via the queue into main with commit 208d433 Sep 28, 2026
5 checks passed
@gunbai-bot
gunbai-bot Bot deleted the session/neat-carp-40 branch September 28, 2026 01:03
@briansrls
briansrls restored the session/neat-carp-40 branch September 28, 2026 01:25
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.

0 participants