fix(ENGKNOW-3577): store actual link data name in create cache#124
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A create ending in `write -link X` derived the data file name twice (plan time in resolveCache, exec time in ForkWrite); the name is non-idempotent (random suffix), so the cached name did not match the written file and referencing the create failed. resolveCache now injects the resolved name into the executed write so ForkWrite reuses it. The injection only takes effect because commandToExecute is now read after getExplicitWrite runs, instead of before, so the executed command reflects the query mutation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gor/parallel Adds create-wrapped tests referencing [#test#] for pgor, parallel and partgor. Confirms getCachePath reuses the resolved cache path (no re-derivation), so the create-cache-name mismatch does not occur for these macros. partgor test asserts cache-name correctness only: partgor does not currently propagate the -link option (no link file written) - a separate pre-existing defect noted as a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PartGor built its dictionary command but never appended -link/-linkmeta, unlike PGor and Parallel, so `partgor ... | write -link X` wrote no link file. Append the link options (from create.query) to the partgor dictionary command, mirroring Parallel. The partgor regression test now asserts the link file is written and resolves, like the pgor/parallel variants. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
create #x# = ... | write -link X ; nor [#x#]failed: the create cache stored a data-file name that did not match the file actually written.LinkFileUtil.inferDataFileNameFromLinkFileis non-idempotent (random suffix), and the name was derived twice — at plan time inBaseScriptExecutionEngine.resolveCache(cached) and again at exec time inForkWrite(actual write) — yielding two different names.resolveCache, for a link-inferred write (no positional filename +-linkpresent), inject the resolved data-file name into the executed query soForkWritereuses it instead of re-deriving.commandToExecuteis now read aftergetExplicitWriteso the injected name reaches execution. No change toLinkFileUtil.Test Plan
gorsat.UTestGorWrite.testCreateWriteLinkCacheName— fails before the fix (cache points at non-existent file), passes after.gorsat.UTestGorWrite(60) green.gorsat.Script.*(34) green — covers thecommandToExecuteread relocation.Ticket: ENGKNOW-3577
🤖 Generated with Claude Code