diff --git a/docs/examples/configuration-sources/README.md b/docs/examples/configuration-sources/README.md index d5b27f3..497ba25 100644 --- a/docs/examples/configuration-sources/README.md +++ b/docs/examples/configuration-sources/README.md @@ -5,7 +5,7 @@ for pull-request documentation review, issue feedback, and release project review. Copy the contents of one directory into the root of a consumer repository; in particular, retain its `.github/` path. All wrappers call their reusable workflows at commit -`72177b0f334301559f866f19baca2e0204104121`. +`67039ac7f3157d0986952a5cb2c087827f5a9e1f`. | Directory | `configuration_source` | Additional files to copy | Use case | | --- | --- | --- | --- | @@ -52,7 +52,7 @@ workflow `uses:` SHA. The `release-project-review-self.yml` and `external-release-project-review.yml` workflow pins must point to a reviewed release commit containing `.github/workflows/opencode-release-project-review.yml`. The release-review -wrappers are pinned to `72177b0f334301559f866f19baca2e0204104121`, which +wrappers are pinned to `67039ac7f3157d0986952a5cb2c087827f5a9e1f`, which contains that workflow and accepts an explicitly supplied `target_repository`. When updating the pin, use a reviewed commit that retains that reusable-call schema. diff --git a/docs/examples/configuration-sources/central/.github/workflows/documentation-review.yml b/docs/examples/configuration-sources/central/.github/workflows/documentation-review.yml index 1ad4241..2d56369 100644 --- a/docs/examples/configuration-sources/central/.github/workflows/documentation-review.yml +++ b/docs/examples/configuration-sources/central/.github/workflows/documentation-review.yml @@ -10,7 +10,7 @@ permissions: jobs: review: - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read pull-requests: write diff --git a/docs/examples/configuration-sources/central/.github/workflows/external-release-project-review.yml b/docs/examples/configuration-sources/central/.github/workflows/external-release-project-review.yml index 10eb6f6..667aa2d 100644 --- a/docs/examples/configuration-sources/central/.github/workflows/external-release-project-review.yml +++ b/docs/examples/configuration-sources/central/.github/workflows/external-release-project-review.yml @@ -80,7 +80,7 @@ jobs: needs.find-scheduled-release.outputs.release_id != '' ) needs: [find-scheduled-release, find-dispatch-release] - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write diff --git a/docs/examples/configuration-sources/central/.github/workflows/issue-feedback.yml b/docs/examples/configuration-sources/central/.github/workflows/issue-feedback.yml index 39f1af4..52fbb52 100644 --- a/docs/examples/configuration-sources/central/.github/workflows/issue-feedback.yml +++ b/docs/examples/configuration-sources/central/.github/workflows/issue-feedback.yml @@ -10,7 +10,7 @@ permissions: jobs: feedback: - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write diff --git a/docs/examples/configuration-sources/central/.github/workflows/release-project-review-self.yml b/docs/examples/configuration-sources/central/.github/workflows/release-project-review-self.yml index ae0991e..7584f41 100644 --- a/docs/examples/configuration-sources/central/.github/workflows/release-project-review-self.yml +++ b/docs/examples/configuration-sources/central/.github/workflows/release-project-review-self.yml @@ -12,7 +12,7 @@ jobs: release-review: # The pin below must point to a reviewed release commit that contains both # the reusable workflow and the supplied release-project-review profile. - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write diff --git a/docs/examples/configuration-sources/default/.github/workflows/documentation-review.yml b/docs/examples/configuration-sources/default/.github/workflows/documentation-review.yml index eed6c82..6167bb8 100644 --- a/docs/examples/configuration-sources/default/.github/workflows/documentation-review.yml +++ b/docs/examples/configuration-sources/default/.github/workflows/documentation-review.yml @@ -10,13 +10,13 @@ permissions: jobs: review: - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read pull-requests: write with: configuration_source: default - configuration_ref: 72177b0f334301559f866f19baca2e0204104121 + configuration_ref: 67039ac7f3157d0986952a5cb2c087827f5a9e1f configuration_profile: documentation-review focus: documentation max_comments: 10 diff --git a/docs/examples/configuration-sources/default/.github/workflows/external-release-project-review.yml b/docs/examples/configuration-sources/default/.github/workflows/external-release-project-review.yml index 3c31cff..46a408e 100644 --- a/docs/examples/configuration-sources/default/.github/workflows/external-release-project-review.yml +++ b/docs/examples/configuration-sources/default/.github/workflows/external-release-project-review.yml @@ -80,7 +80,7 @@ jobs: needs.find-scheduled-release.outputs.release_id != '' ) needs: [find-scheduled-release, find-dispatch-release] - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write @@ -88,7 +88,7 @@ jobs: target_repository: ${{ inputs.target_repository || 'OWNER/REPOSITORY' }} release_id: ${{ inputs.release_id || needs.find-dispatch-release.outputs.release_id || needs.find-scheduled-release.outputs.release_id }} configuration_source: default - configuration_ref: 72177b0f334301559f866f19baca2e0204104121 + configuration_ref: 67039ac7f3157d0986952a5cb2c087827f5a9e1f configuration_profile: release-project-review validate_only: true secrets: diff --git a/docs/examples/configuration-sources/default/.github/workflows/issue-feedback.yml b/docs/examples/configuration-sources/default/.github/workflows/issue-feedback.yml index e1b2e11..a4a3e59 100644 --- a/docs/examples/configuration-sources/default/.github/workflows/issue-feedback.yml +++ b/docs/examples/configuration-sources/default/.github/workflows/issue-feedback.yml @@ -10,13 +10,13 @@ permissions: jobs: feedback: - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write with: configuration_source: default - configuration_ref: 72177b0f334301559f866f19baca2e0204104121 + configuration_ref: 67039ac7f3157d0986952a5cb2c087827f5a9e1f configuration_profile: issue-feedback focus: general max_issues: 20 diff --git a/docs/examples/configuration-sources/default/.github/workflows/release-project-review-self.yml b/docs/examples/configuration-sources/default/.github/workflows/release-project-review-self.yml index 81e715a..fbe2bba 100644 --- a/docs/examples/configuration-sources/default/.github/workflows/release-project-review-self.yml +++ b/docs/examples/configuration-sources/default/.github/workflows/release-project-review-self.yml @@ -12,7 +12,7 @@ jobs: release-review: # The pin below must point to a reviewed release commit that contains both # the reusable workflow and the supplied release-project-review profile. - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write @@ -21,7 +21,7 @@ jobs: release_id: ${{ github.event.release.id }} configuration_source: default # configuration_ref must be the same reviewed commit SHA as `uses:` above. - configuration_ref: 72177b0f334301559f866f19baca2e0204104121 + configuration_ref: 67039ac7f3157d0986952a5cb2c087827f5a9e1f configuration_profile: release-project-review validate_only: true secrets: diff --git a/docs/examples/configuration-sources/local/.github/workflows/documentation-review.yml b/docs/examples/configuration-sources/local/.github/workflows/documentation-review.yml index bbbc26d..92fce3f 100644 --- a/docs/examples/configuration-sources/local/.github/workflows/documentation-review.yml +++ b/docs/examples/configuration-sources/local/.github/workflows/documentation-review.yml @@ -10,7 +10,7 @@ permissions: jobs: review: - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-documentation-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read pull-requests: write diff --git a/docs/examples/configuration-sources/local/.github/workflows/external-release-project-review.yml b/docs/examples/configuration-sources/local/.github/workflows/external-release-project-review.yml index 49815dd..18e5e08 100644 --- a/docs/examples/configuration-sources/local/.github/workflows/external-release-project-review.yml +++ b/docs/examples/configuration-sources/local/.github/workflows/external-release-project-review.yml @@ -80,7 +80,7 @@ jobs: needs.find-scheduled-release.outputs.release_id != '' ) needs: [find-scheduled-release, find-dispatch-release] - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write diff --git a/docs/examples/configuration-sources/local/.github/workflows/issue-feedback.yml b/docs/examples/configuration-sources/local/.github/workflows/issue-feedback.yml index a64acf9..22b0347 100644 --- a/docs/examples/configuration-sources/local/.github/workflows/issue-feedback.yml +++ b/docs/examples/configuration-sources/local/.github/workflows/issue-feedback.yml @@ -10,7 +10,7 @@ permissions: jobs: feedback: - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-issue-feedback.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write diff --git a/docs/examples/configuration-sources/local/.github/workflows/release-project-review-self.yml b/docs/examples/configuration-sources/local/.github/workflows/release-project-review-self.yml index 2dcd54c..4b6524c 100644 --- a/docs/examples/configuration-sources/local/.github/workflows/release-project-review-self.yml +++ b/docs/examples/configuration-sources/local/.github/workflows/release-project-review-self.yml @@ -12,7 +12,7 @@ jobs: release-review: # The pin below must point to a reviewed release commit containing the # reusable workflow. - uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@72177b0f334301559f866f19baca2e0204104121 + uses: SecondSkoll/generic-agentic-workflows/.github/workflows/opencode-release-project-review.yml@67039ac7f3157d0986952a5cb2c087827f5a9e1f permissions: contents: read issues: write diff --git a/scripts/run_agentic_release_project_review.py b/scripts/run_agentic_release_project_review.py index 2999977..cb1950d 100644 --- a/scripts/run_agentic_release_project_review.py +++ b/scripts/run_agentic_release_project_review.py @@ -173,11 +173,13 @@ def run_release_preflight( check=False, ) output = (completed.stdout + completed.stderr).strip() - output = output[:MAX_PREFLIGHT_OUTPUT_BYTES] + # Test runners usually report the actionable failure summary last. + # Preserve that tail rather than the beginning of verbose output. + output = output[-MAX_PREFLIGHT_OUTPUT_BYTES:] status = "passed" if completed.returncode == 0 else f"failed (exit {completed.returncode})" except subprocess.TimeoutExpired as error: output = ((error.stdout or "") + (error.stderr or "")).strip() - output = output[:MAX_PREFLIGHT_OUTPUT_BYTES] + output = output[-MAX_PREFLIGHT_OUTPUT_BYTES:] status = f"timed out after {PREFLIGHT_TIMEOUT_SECONDS}s" artifact_lines: list[str] = [] for relative_path in PREFLIGHT_OUTPUT_ARTIFACTS.get(command, ()): diff --git a/tests/test_run_agentic_release_project_review.py b/tests/test_run_agentic_release_project_review.py index a708a11..c2e5398 100644 --- a/tests/test_run_agentic_release_project_review.py +++ b/tests/test_run_agentic_release_project_review.py @@ -994,6 +994,18 @@ def test_preflight_runs_approved_command_without_a_shell(self) -> None: self.assertEqual(run.call_args.kwargs["cwd"], Path(tmp)) self.assertNotIn("shell", run.call_args.kwargs) + def test_preflight_output_is_limited_to_its_tail(self) -> None: + output = "head-marker\n" + ("middle\n" * RUNNER.MAX_PREFLIGHT_OUTPUT_BYTES) + "tail-marker" + with tempfile.TemporaryDirectory() as tmp: + with mock.patch.object( + RUNNER.subprocess, + "run", + return_value=FakeProc(output, returncode=1), + ): + result = RUNNER.run_release_preflight(["python3 -m pytest"], Path(tmp)) + self.assertIn("tail-marker", result) + self.assertNotIn("head-marker", result) + def test_preflight_rejects_unapproved_command(self) -> None: with tempfile.TemporaryDirectory() as tmp: with self.assertRaises(RUNNER.ReleaseReviewError):