mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 12:37:55 +01:00
test(activity): accept the bounded once repair relationship
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
a45fefca6b
commit
96cb1d6f59
2 files changed
+3
-1
No files matched your search
@@ -58,7 +58,7 @@ export function truthfulTimelineAccount(input: {
|
||||
const before = text.slice(0, at);
|
||||
return (!explicitOwner.test(before) || repairOwner.test(before)) && !firstWorkerCommand.test(before);
|
||||
};
|
||||
const causedByRepair = /^\s+(?:with\s+exit(?:\s+(?:code|status))?\s*[:=]?\s*0\s+)?(?:(?:only|immediately|just)\s+)?after(?:\s+(?:the|a|missing|email|real|label|input|task|repair)){0,6}\s*$/i;
|
||||
const causedByRepair = /^\s+(?:with\s+exit(?:\s+(?:code|status))?\s*[:=]?\s*0\s+)?(?:(?:only|immediately|just)\s+)?(?:after|once)(?:\s+(?:the|a|missing|email|real|label|input|task|repair)){0,6}\s*$/i;
|
||||
const repairAfterSuccess = new RegExp(`\\bafter\\s+(?:(?:the|a|his|her|their|its)\\s+)?${commandTail}`, "i");
|
||||
const repairs = clauses.flatMap(({ text, at }) => [...text.matchAll(repairAction)].filter(match => {
|
||||
const end = match.index + match[0].length;
|
||||
|
||||
@@ -166,6 +166,8 @@ it.each([
|
||||
"Today UTC: Morgan verification failed and the task paused, you reassigned the task to Riley, and the check passed with exit code 0 after Riley added the missing label.",
|
||||
"Today UTC: Morgan verification failed and the task paused. You reassigned the task to Riley. Riley's check passed after Riley completed the repair.",
|
||||
"Today UTC: Morgan verification failed and the task paused. You reassigned the task to Riley. The check passed after the label was fixed by Riley.",
|
||||
"Today UTC: Morgan paused the task after verification failed. Avery reassigned the task to Riley. The verification passed once Riley added the missing label in launch.html.",
|
||||
"Today UTC: Morgan was blocked because verification failed. Avery reassigned the task to Riley. The verification passed once Riley added the missing label in launch.html.",
|
||||
"Today UTC: Morgan's verification of `launch.html` failed and the task paused. You reassigned the task to Riley. Riley added the missing label in `launch.html` and the verification passed.",
|
||||
])("keeps bounded causal success and owned file tokens valid: %s", reply => {
|
||||
const o = fixture(); o.reply = reply; expect(gradeWorkTimeline(o).passed).toBe(true);
|
||||
|
||||
Reference in new issue
Block a user