From d822d32c667692670f3f89a27adcbe89a1061316 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Tue, 16 Jun 2026 06:37:53 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20fix:=20clarify=20simplify=20?= =?UTF-8?q?git=20context=20provenance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clarify that simplify workflow Git context is captured from the parent workflow checkout before child agent workspaces are spawned, so branch/upstream metadata refers to the reviewed parent branch. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$9.67`_ --- .mux/workflows/simplify.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.mux/workflows/simplify.js b/.mux/workflows/simplify.js index d22b4e6b6c..332897086b 100644 --- a/.mux/workflows/simplify.js +++ b/.mux/workflows/simplify.js @@ -9,6 +9,9 @@ const DIFF_STAT_CHAR_BUDGET = 20000; const REVIEW_EVIDENCE_ITEM_BUDGET = 3; const REVIEW_EVIDENCE_CHAR_BUDGET = 500; const NO_REVIEWABLE_CHANGES_SUMMARY = "No reviewable changes found."; +const GIT_CONTEXT_SOURCE = "parent-workflow-checkout"; +const GIT_CONTEXT_PROVENANCE_NOTE = + "Git context was captured from the parent workflow checkout before child agent workspaces were spawned. Child agent branches may differ; status.branch/upstream describe the reviewed parent checkout."; const READ_ONLY_PROMPT = "This is a read-only review step. Do not edit files, create commits, apply patches, push branches, or open PRs. Inspect repository evidence only as needed and report findings."; const VALUE_FLAGS = [ @@ -650,6 +653,7 @@ function promptContexts(input, gitContext) { function renderContext(input, gitContext) { return fencedJson({ input: { target: input.target, fix: input.fix, maxFindings: input.maxFindings }, + gitContextSource: GIT_CONTEXT_SOURCE, gitContext: gitContext, }); } @@ -785,6 +789,7 @@ function reviewPrompt(lane, input, reviewContext) { input.maxFindings + " actionable findings. Use stable finding ids and arrays for filePaths/evidence.", "\nLane checklist:\n- " + lane.instructions.join("\n- "), + GIT_CONTEXT_PROVENANCE_NOTE, "\nReview context:\n" + reviewContext, ].join("\n\n"); } @@ -797,6 +802,7 @@ function synthesisPrompt(input, compactContext, reviewOutputs) { " highest-value issues.", "Do not edit files in this step. Produce triage and fix plans for the later fixer step. If a finding is false positive or not worth addressing, put it in skippedFindings without debating it.", "Allowed severity values are: high, medium, low. Prefer minimal cleanup over broad refactors.", + GIT_CONTEXT_PROVENANCE_NOTE, "\nCompact review context without raw diff text:\n" + compactContext, "\nCompacted lane outputs:\n" + fencedJson(compactReviewOutputs(reviewOutputs)), ].join("\n\n"); @@ -809,6 +815,7 @@ function fixPrompt(compactContext, synthesized) { "Use the compact context for file lists and diff metadata; inspect files directly instead of relying on raw diff text being embedded in this prompt.", "Preserve existing style and functionality. Run targeted validation for touched code when feasible and report exact commands/results.", "If a finding is false positive or not worth addressing, skip it and note why. Set madeChanges true only when files changed.", + GIT_CONTEXT_PROVENANCE_NOTE, "\nCompact review context:\n" + compactContext, "\nActionable findings:\n" + fencedJson(fixerPayload(synthesized)), ].join("\n\n"); From 2a12a2476279a5b9595ac26a335254ba8a057164 Mon Sep 17 00:00:00 2001 From: Thomas Kosiewski Date: Tue, 16 Jun 2026 06:46:32 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20fix:=20simplify=20workflow?= =?UTF-8?q?=20cleanup=20findings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deduplicate combined untracked path metadata and remove redundant leading newlines from simplify prompt sections. --- _Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$9.67`_ --- .mux/workflows/simplify.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.mux/workflows/simplify.js b/.mux/workflows/simplify.js index 332897086b..b89f0ed559 100644 --- a/.mux/workflows/simplify.js +++ b/.mux/workflows/simplify.js @@ -566,10 +566,11 @@ function targetNeedsUntrackedContent(input, gitContext) { } function untrackedPaths(gitContext) { - return asArray(gitContext.status && gitContext.status.untracked) + const paths = asArray(gitContext.status && gitContext.status.untracked) .concat(asArray(gitContext.changedFiles && gitContext.changedFiles.untracked)) .map(filePath) .filter(Boolean); + return Array.from(new Set(paths)); } function filePath(value) { @@ -788,9 +789,9 @@ function reviewPrompt(lane, input, reviewContext) { "The synthesis step will keep at most " + input.maxFindings + " actionable findings. Use stable finding ids and arrays for filePaths/evidence.", - "\nLane checklist:\n- " + lane.instructions.join("\n- "), + "Lane checklist:\n- " + lane.instructions.join("\n- "), GIT_CONTEXT_PROVENANCE_NOTE, - "\nReview context:\n" + reviewContext, + "Review context:\n" + reviewContext, ].join("\n\n"); } @@ -803,8 +804,8 @@ function synthesisPrompt(input, compactContext, reviewOutputs) { "Do not edit files in this step. Produce triage and fix plans for the later fixer step. If a finding is false positive or not worth addressing, put it in skippedFindings without debating it.", "Allowed severity values are: high, medium, low. Prefer minimal cleanup over broad refactors.", GIT_CONTEXT_PROVENANCE_NOTE, - "\nCompact review context without raw diff text:\n" + compactContext, - "\nCompacted lane outputs:\n" + fencedJson(compactReviewOutputs(reviewOutputs)), + "Compact review context without raw diff text:\n" + compactContext, + "Compacted lane outputs:\n" + fencedJson(compactReviewOutputs(reviewOutputs)), ].join("\n\n"); } @@ -816,8 +817,8 @@ function fixPrompt(compactContext, synthesized) { "Preserve existing style and functionality. Run targeted validation for touched code when feasible and report exact commands/results.", "If a finding is false positive or not worth addressing, skip it and note why. Set madeChanges true only when files changed.", GIT_CONTEXT_PROVENANCE_NOTE, - "\nCompact review context:\n" + compactContext, - "\nActionable findings:\n" + fencedJson(fixerPayload(synthesized)), + "Compact review context:\n" + compactContext, + "Actionable findings:\n" + fencedJson(fixerPayload(synthesized)), ].join("\n\n"); }