test(#3733): add fork PR bash-routing smoke scenario - #5654
Conversation
Add one behaviour scenario (dummy runtime) verifying that a fork pull request dispatched through the bash routing path (reusable-dispatch.yml route job) on a per-repo install completes end-to-end. The scenario opens a fork PR, labels it ready-for-review, and asserts the review stage runs successfully. New step definition: "the fullsend workflow dispatches the review stage" polls for the fullsend-review artifact to confirm the bash router dispatched the review stage. This is a time-boxed guard superseded when #2902 removes bash routing. Closes #3733
|
🤖 Finished Review · ✅ Success · Started 8:53 PM UTC · Completed 9:06 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsLow
Labels: PR adds e2e behaviour test for fork PR dispatch routing |
|
/fs-fix Remove the new near-duplicate step Then the harness "review" workflow completes successfullyThat already calls |
|
🤖 Finished Fix · ✅ Success · Started 8:02 AM UTC · Completed 8:08 AM UTC |
Remove the near-duplicate step `the fullsend workflow dispatches the review stage` / thenFullsendWorkflowDispatchesReview and its unit test. The feature file now uses the existing `the harness "review" workflow completes successfully` step which calls thenHarnessWorkflowCompletes and is behaviorally identical. Addresses review feedback on #5654
🔧 Fix agent — iteration 1 (human-triggered)Removed the near-duplicate step thenFullsendWorkflowDispatchesReview and its unit test. The feature file now uses the existing harness review workflow completes successfully step, which is behaviorally identical. Fixed (3):
Tests: passed Updated by fullsend fix agent |
|
/fs-fix Root cause (BT failure)Bash routing does dispatch the built-in Evidence: https://github.com/halfsend-05/test-repo-05/actions/runs/30344149877 FixMirror the triage behaviour pattern: the dummy agent must emit a schema-valid review
{
"action": "comment",
"pr_number": 1,
"repo": "owner/repo",
"head_sha": "0000000",
"body": "Behaviour smoke: bash-routed review completed."
}
Given a dummy agent that would:
| description | op | args |
| Prove bash routing | write_fixture | output/bash-routing-ok.json, fixtures/dispatch/ok.json |
| Emit review JSON | write_fixture | output/agent-result.json, fixtures/review/comment.json |
Goal: BT scenario passes end-to-end because review validation (and post-script) succeed after bash routing dispatches review. |
|
🤖 Finished Fix · ✅ Success · Started 9:06 AM UTC · Completed 9:13 AM UTC |
The review harness validates output/agent-result.json after the dummy agent runs. The fork bash-routing scenario only wrote bash-routing-ok.json, causing validation to fail with "agent-result.json not found". Add a write_fixture row that emits a schema-valid review comment result to output/agent-result.json, mirroring the triage scenario pattern. Addresses review feedback on #5654
🔧 Fix agent — iteration 2 (human-triggered)Added a schema-valid review comment fixture (e2e/behaviour/fixtures/review/comment.json) and updated the fork bash-routing feature to write output/agent-result.json via write_fixture, fixing the harness validation failure. Fixed (1):
Tests: passed Decision points
Updated by fullsend fix agent |
|
/fs-fix Root cause (latest BT failure)Schema validation now passes. Review post-script fails: Evidence: https://github.com/halfsend-11/test-repo-08/actions/runs/30345793151
FixUpdate
Goal: Review job completes successfully after bash routing so the behaviour scenario passes. |
|
🤖 Finished Fix · ✅ Success · Started 10:09 AM UTC · Completed 10:15 AM UTC |
The post-review CLI (postreview.go) requires head_sha to be a 40 or 64 character hex string. The fixture had "0000000" (7 chars), which passed schema validation (minLength: 7) but failed the CLI regex check, causing the e2e behaviour scenario to fail at the post-script step. Replace with a static 40-char hex string to satisfy both the schema and the CLI. Addresses review feedback on #5654
🔧 Fix agent — iteration 3 (human-triggered)Fixed head_sha in review fixture from 7-char to 40-char hex string to satisfy the post-review CLI validation regex. The fixture now passes both schema validation and the CLI's hexSHARe check. Fixed (1):
Tests: passed Updated by fullsend fix agent |
|
🤖 Finished Retro · ✅ Success · Started 11:34 AM UTC · Completed 11:48 AM UTC |
Retro: PR #5654 -- fork PR bash-routing smoke scenarioWorkflow: Issue #3733 -> code agent (run 30303294460) -> PR #5654 -> review agent approved with 1 low finding -> 3 human-driven Rework: 3 fix iterations on a 27-line change. All three fixes were diagnosed and directed by the human reviewer (
Review agent performance: The review agent correctly identified the code duplication issue (fix 1). It could not reasonably have caught fixes 2-3 without deep knowledge of the BT infrastructure and the schema/CLI validation mismatch. Evidence for existing open issues:
2 proposals filed below. Both target Proposals filed
|
Summary
Add one behaviour scenario (dummy runtime) that exercises fork PR bash routing on per-repo installs as a time-boxed guard until harness CEL cutover (#2902).
Related Issue
Part of #3733 — interim bash-routing fork smoke until harness cutover.
Changes
e2e/behaviour/features/dispatch/fork-bash-routing.featurewith one scenario:ready-for-reviewto triggerpull_request_target labeledeventfullsend-reviewartifactthe fullsend workflow dispatches the review stageindispatch.go— polls for thefullsend-reviewartifact to confirm the bash router dispatched the review stageTesting
go build ./...passesgo vet ./...passesgo test ./pkg/behaviourtest/...passes (all existing + new test)golangci-lintnot available in sandbox; deferred to CICloses #3733
Post-script verification
agent/3733-fork-bash-routing-smoke)0b0263ab84ceefc47fb8263e7b92a64d8278e9e4..HEAD)