artifact: add PR body generator example#208
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a deterministic PR body Markdown example along with a generation script and a regression test to ensure the committed artifact remains in sync with the generator. A review comment correctly identified that the artifact path in the test file is relative, which could lead to environment-dependent failures; a code suggestion was provided to anchor the path to the repository root for better robustness.
| from scripts.generate_pr_body_from_agent_bundle_example import generate_pr_body_from_agent_bundle_example | ||
|
|
||
| ARTIFACT_PATH = Path("artifacts/agent_artifact_bundle_example.json") | ||
| PR_BODY_ARTIFACT_PATH = Path("artifacts/pr_body_from_agent_bundle_example.md") |
There was a problem hiding this comment.
The path PR_BODY_ARTIFACT_PATH is defined as a relative path. This makes the test environment-dependent and likely to fail if executed from a directory other than the repository root (e.g., from within the tests/ directory). It is recommended to anchor this path using the repository root. Since scripts.pr_body_from_agent_bundle (imported as pr_body) already calculates and exposes REPO_ROOT, you can use it here for consistency and robustness.
| PR_BODY_ARTIFACT_PATH = Path("artifacts/pr_body_from_agent_bundle_example.md") | |
| PR_BODY_ARTIFACT_PATH = pr_body.REPO_ROOT / "artifacts" / "pr_body_from_agent_bundle_example.md" |
Adds a deterministic Markdown example artifact for the PR body generator.
Validation: