lalph 0.1.91 → 0.1.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -144662,9 +144662,9 @@ ${options.task.description}
144662
144662
  - Add important discoveries about the codebase, or challenges faced to the task's
144663
144663
  \`description\`. More details below.
144664
144664
  4. Run any checks / feedback loops, such as type checks, unit tests, or linting.
144665
- 5. ${!options.githubPrNumber ? `Create a pull request for this task.${options.targetBranch ? ` The target branch for the PR should be \`${options.targetBranch}\`. If the target branch does not exist, create it first.` : ""}` : "Commit and push your changes to the pull request."}
144665
+ 5. ${!options.githubPrNumber ? `Create a pull request for this task. If the target branch does not exist, create it first.` : "Commit and push your changes to the pull request."}
144666
144666
  ${sourceMeta.githubPrInstructions}
144667
- The PR description should include a summary of the changes made.
144667
+ The PR description should include a summary of the changes made.${options.targetBranch ? `\n - The target branch for the PR should be \`${options.targetBranch}\`.` : ""}
144668
144668
  - **DO NOT** commit any of the files in the \`.lalph\` directory.
144669
144669
  - You have permission to create or update the PR as needed. You have full permission to push branches, create PRs or create git commits.
144670
144670
  6. Update the prd.yml file to reflect any changes in task states.
@@ -144820,11 +144820,11 @@ var Prd = class extends Service()("lalph/Prd", { make: gen(function* () {
144820
144820
  state: "todo"
144821
144821
  });
144822
144822
  }, syncSemaphore.withPermit);
144823
- const mergeConflictInstruction = "Next step: Rebase PR and resolve merge conflicts.";
144823
+ const mergeConflictInstruction = "**Before doing anything else**: rebase the PR against the target branch, and resolve any merge conflicts.";
144824
144824
  const flagUnmergable = fnUntraced(function* (options) {
144825
144825
  const issue = current.find((entry) => entry.id === options.issueId);
144826
144826
  if (!issue) return;
144827
- const nextDescription = issue.description.includes(mergeConflictInstruction) ? issue.description : `${mergeConflictInstruction}\n\n${issue.description.trim()}`;
144827
+ const nextDescription = issue.description.includes(mergeConflictInstruction) ? issue.description : `${mergeConflictInstruction}\n\n---\n\nPrevious description:\n\n${issue.description.trim()}`;
144828
144828
  yield* source.updateIssue({
144829
144829
  issueId: issue.id,
144830
144830
  description: nextDescription,
@@ -145159,7 +145159,7 @@ const run = fnUntraced(function* (options) {
145159
145159
  const autoMerge = gen(function* () {
145160
145160
  let prState = yield* viewPrState();
145161
145161
  yield* log$1("PR state", prState);
145162
- if (isNone(prState)) return;
145162
+ if (isNone(prState)) return yield* prd.maybeRevertIssue({ issueId: taskId });
145163
145163
  if (isSome(options.targetBranch)) yield* exec`gh pr edit --base ${options.targetBranch.value}`;
145164
145164
  yield* exec`gh pr merge -sd`;
145165
145165
  yield* sleep(seconds(3));
@@ -145323,7 +145323,7 @@ const commandSource = make$28("source").pipe(withDescription("Select the issue s
145323
145323
 
145324
145324
  //#endregion
145325
145325
  //#region package.json
145326
- var version = "0.1.91";
145326
+ var version = "0.1.93";
145327
145327
 
145328
145328
  //#endregion
145329
145329
  //#region src/Tracing.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lalph",
3
3
  "type": "module",
4
- "version": "0.1.91",
4
+ "version": "0.1.93",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/src/Prd.ts CHANGED
@@ -69,7 +69,7 @@ export class Prd extends ServiceMap.Service<
69
69
  }, syncSemaphore.withPermit)
70
70
 
71
71
  const mergeConflictInstruction =
72
- "Next step: Rebase PR and resolve merge conflicts."
72
+ "**Before doing anything else**: rebase the PR against the target branch, and resolve any merge conflicts."
73
73
 
74
74
  const flagUnmergable = Effect.fnUntraced(function* (options: {
75
75
  readonly issueId: string
@@ -82,7 +82,7 @@ export class Prd extends ServiceMap.Service<
82
82
  )
83
83
  const nextDescription = hasInstruction
84
84
  ? issue.description
85
- : `${mergeConflictInstruction}\n\n${issue.description.trim()}`
85
+ : `${mergeConflictInstruction}\n\n---\n\nPrevious description:\n\n${issue.description.trim()}`
86
86
 
87
87
  yield* source.updateIssue({
88
88
  issueId: issue.id!,
package/src/PromptGen.ts CHANGED
@@ -167,9 +167,9 @@ ${options.task.description}
167
167
  - Add important discoveries about the codebase, or challenges faced to the task's
168
168
  \`description\`. More details below.
169
169
  4. Run any checks / feedback loops, such as type checks, unit tests, or linting.
170
- 5. ${!options.githubPrNumber ? `Create a pull request for this task.${options.targetBranch ? ` The target branch for the PR should be \`${options.targetBranch}\`. If the target branch does not exist, create it first.` : ""}` : "Commit and push your changes to the pull request."}
170
+ 5. ${!options.githubPrNumber ? `Create a pull request for this task. If the target branch does not exist, create it first.` : "Commit and push your changes to the pull request."}
171
171
  ${sourceMeta.githubPrInstructions}
172
- The PR description should include a summary of the changes made.
172
+ The PR description should include a summary of the changes made.${options.targetBranch ? `\n - The target branch for the PR should be \`${options.targetBranch}\`.` : ""}
173
173
  - **DO NOT** commit any of the files in the \`.lalph\` directory.
174
174
  - You have permission to create or update the PR as needed. You have full permission to push branches, create PRs or create git commits.
175
175
  6. Update the prd.yml file to reflect any changes in task states.
@@ -436,7 +436,9 @@ const run = Effect.fnUntraced(
436
436
  const autoMerge = Effect.gen(function* () {
437
437
  let prState = yield* viewPrState()
438
438
  yield* Effect.log("PR state", prState)
439
- if (Option.isNone(prState)) return
439
+ if (Option.isNone(prState)) {
440
+ return yield* prd.maybeRevertIssue({ issueId: taskId })
441
+ }
440
442
  if (Option.isSome(options.targetBranch)) {
441
443
  yield* exec`gh pr edit --base ${options.targetBranch.value}`
442
444
  }