mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 10:39:32 +01:00
fix(story-mode): a failed check that Claude fixes in its next command says so
Flagged by four readers across rounds 10 to 12: after a push, "but a check after that fails" never said that Claude repaired what the check found (the new remote pointed at a branch with no commits) and checked again. When Claude's next command runs that same check again after a change (`git -C remote.git symbolic-ref HEAD refs/heads/main && git -C remote.git log …`) and passes, the caption adds "; Claude fixes it, and the check passes next." A check re-run with no change before it, or one that fails again, claims nothing. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
b0898b5441
commit
ed6c89ff98
4 files changed
+41
-3
No files matched your search
+14
-1
@@ -2953,13 +2953,26 @@ function decorate(draft: DraftPanel, events: StoryEvent[], turn: StoryTurn, inde
|
||||
);
|
||||
// `git describe` with no tags: a lookup of a version name, not a check of the work.
|
||||
const noTags = /No names found, cannot describe anything|No tags can describe/.test(out);
|
||||
// The failed check is run again in Claude's next command, after a change, and passes: it was fixed
|
||||
// (`git -C remote.git symbolic-ref HEAD refs/heads/main && git -C remote.git log …`).
|
||||
const lookSegs = after.filter((seg) => !/^(echo|printf)\b/.test(seg));
|
||||
const nextRun = events.slice(Math.max(...draft.events) + 1).find((e) => e.tool === 'Bash');
|
||||
let fixedNext = false;
|
||||
if (looksOnly && !noTags && nextRun?.ok === true) {
|
||||
const segs = nextRun.label
|
||||
.split(/&&|\|\||;|\n/)
|
||||
.map((seg) => seg.trim())
|
||||
.filter(Boolean);
|
||||
const at = segs.findIndex((seg) => lookSegs.includes(seg));
|
||||
fixedNext = at > 0 && segs.slice(0, at).some((seg) => !GIT_LOOK.test(seg) && !/^(echo|printf|cd)\b/.test(seg));
|
||||
}
|
||||
const stepAfter = `${
|
||||
noTags
|
||||
? 'the version-tag lookup after that fails (there are no tags yet)'
|
||||
: looksOnly
|
||||
? 'a check after that fails'
|
||||
: 'a step after that fails'
|
||||
}${allowed ? ', as you said it might' : ''}`;
|
||||
}${allowed ? ', as you said it might' : ''}${fixedNext ? '; Claude fixes it, and the check passes next' : ''}`;
|
||||
story =
|
||||
savedAnyway || hiddenFail
|
||||
? uploadOnly
|
||||
|
||||
Reference in new issue
Block a user