You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add sample code branch push step to PR verification agent
After verification passes, the agent now pushes the verification sample
to a dedicated branch (verification/pr-<N>) for future reference.
Changes:
- Added Step 5.5: Push Verification Sample to Branch
- Updated behavioral rules: clarify no source code changes, add branch isolation rule
- Updated success criteria to include branch pushing
- Updated Step 7: samples are now pushed, not deleted
@@ -353,13 +492,74 @@ Post a comment on the **linked GitHub issue** (not the PR) with the verification
353
492
354
493
### Conclusion
355
494
356
-
<PASS: "All verification checks passed. The fix works as described in the PR.">
495
+
<PASS: "All verification checks passed. The fix works as described in the PR. Verification sample and e2e tests pushed to `verification/pr-<pr-number>` branch.">
357
496
<FAIL: "Verification failed. See details above. The fix may need additional work.">
358
497
```
359
498
360
499
**Important:** The comment must start with `<!-- pr-verification-agent -->` (HTML comment)
361
500
so the idempotency check in Step 1 can detect it.
362
501
502
+
## Step 5.5: Push Verification Sample to Branch
503
+
504
+
After posting the verification comment and **only if verification passed**, push the
505
+
sample code to a dedicated branch for future reference.
506
+
507
+
### Branch Naming Convention
508
+
509
+
Create a branch named: `verification/pr-<pr-number>`
510
+
511
+
Example: For PR #123, create branch `verification/pr-123`
512
+
513
+
### Push Procedure
514
+
515
+
```bash
516
+
# Create and switch to the verification branch (from main)
517
+
git checkout main
518
+
git checkout -b verification/pr-<pr-number>
519
+
520
+
# Create the samples directory structure if needed
git commit -m "Add verification sample for PR #<pr-number>
529
+
530
+
This sample was automatically generated by the pr-verification-agent.
531
+
It reproduces the customer scenario addressed by PR #<pr-number> and
532
+
validates the fix against the DTS emulator.
533
+
534
+
Scenario: <scenario-name>
535
+
Verification status: PASSED
536
+
Generated: <ISO timestamp>"
537
+
538
+
# Push the branch
539
+
git push origin verification/pr-<pr-number>
540
+
```
541
+
542
+
### Post-Push Cleanup
543
+
544
+
After pushing, switch back to `main`:
545
+
546
+
```bash
547
+
git checkout main
548
+
```
549
+
550
+
### Update Verification Comment
551
+
552
+
Edit the verification comment on the issue to include a link to the pushed sample:
553
+
554
+
```markdown
555
+
### Sample Code
556
+
557
+
The verification sample has been pushed to branch [`verification/pr-<pr-number>`](https://github.com/microsoft/durabletask-js/tree/verification/pr-<pr-number>/examples/verification-samples/pr-<pr-number>-verify.ts).
558
+
```
559
+
560
+
**Note:** If the push fails (e.g., permission issues, branch already exists), log
561
+
the error but continue with label updates. The sample is still captured in the
562
+
issue comment.
363
563
## Step 6: Update PR Labels
364
564
365
565
After posting the verification comment:
@@ -374,16 +574,19 @@ If verification **failed**, do NOT update labels. Instead:
374
574
375
575
## Step 7: Clean Up
376
576
377
-
- Delete the temporary verification sample file (it's captured in the issue comment).
577
+
- The verification sample has been pushed to a branch - no need to delete it locally.
578
+
- Clean up the local working directory if any temporary files remain.
378
579
- Do NOT stop the DTS emulator (other tests or agents may be using it).
379
580
380
581
## Behavioral Rules
381
582
382
583
### Hard Constraints
383
584
384
585
-**Idempotent:** Never post duplicate verification comments. Always check first.
385
-
-**No code changes:** This agent does NOT modify any source files in the repository.
386
-
It only creates temporary sample files, runs them, and posts results.
586
+
-**No source code changes:** This agent does NOT modify any SDK source files in the
587
+
repository. It only creates verification samples in `examples/verification-samples/`.
588
+
-**Branch isolation:** Verification samples are pushed to `verification/pr-<N>` branches,
589
+
never to `main` or feature branches.
387
590
-**No PR merges:** This agent does NOT merge or approve PRs. It only verifies.
0 commit comments