Repository navigation
fix(test-plan): fail loud when strategy attachment is not fetched - #105
Merged
Merged
Conversation
Overflow strategies keep the full text in a <KEY>-strategy.md attachment whose content URL redirects to api.media.atlassian.com. The sandbox Jira profiles only allowed redhat.atlassian.net, so the download failed. The run then fell back to the truncated description, found no acceptance criteria, and published a score-0 Rework review. - Allow api.media.atlassian.com:443 (read-only) in both Jira profiles; attachment downloads are reads. - parse_strat.py workflow-inputs exits 1 with strategy_attachment_not_fetched when the overflow marker is still in the strategy, instead of reporting no_acceptance_criteria. - post-test-plan.py refuses to publish when .source-strategy.md still has the marker, so no review artifact leaves the sandbox. - Update the format_issue_as_markdown docstring to match. Strategies without the marker and without ACs still get the normal no-acceptance-criteria result. Pre-commit could not fetch hook repos (TLS failure). The hooks were run directly at their pinned revs. The RedHatQE flake8 plugins (UUC/UFN) could not be installed, so name uniqueness was checked by grep. Closes #104 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 2:50 PM UTC · Completed 2:59 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.78 |
|
Risk Assessment: moderate (2/5) DetailsModerate risk change modifying behavior in protected scripts to fail fast without feature flags, balanced by zero 30-day churn, historical stability, and full alignment with the linked bug fix scope. |
ReviewFindingsMedium
Labels: The PR fixes a defect (network failure reported as a content verdict) described in issue #104. |
fege
approved these changes
Nov 23, 2026
fege
left a comment
Collaborator
There was a problem hiding this comment.
Verified on a gitlab run with a real jira ticket
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a strategy is too long for its Jira description, the full text is stored in a
<KEY>-strategy.mdattachment. The attachment's content URL redirects (303) toapi.media.atlassian.com, which the sandbox Jira profiles did not allow, so the download failed. The run then fell back to the truncated description, found no acceptance criteria, and published a score-0 Rework review. A network failure ended up reported as a verdict on the strategy's content.Changes
.fullsend/test-plan/jira-profile.yaml,jira-read-only-profile.yaml: allowapi.media.atlassian.com:443withaccess: read-onlyin both profiles. Attachment downloads are reads, so the host is read-only even in the read-write profile.scripts/parse_strat.py(workflow-inputs): if the overflow marker is still in the strategy, the attachment was never fetched. The command now exits 1 with{"status": "failed", "error": "strategy_attachment_not_fetched"}instead of returningno_acceptance_criteria.test-plan-createStep 1.5 already stops when this command exits nonzero..fullsend/test-plan/post-test-plan.py: second check on the host. If.source-strategy.mdstill contains the marker, the hook raises before copying anything, so no review artifact is published for that run.scripts/strategy_source.py: docstring updated. The marker-bearing description is still kept, but the gate now rejects it instead of turning it into a no-AC verdict.Strategies with no marker and no acceptance criteria still get the normal
no_acceptance_criteriaresult. Tests cover this.Testing
TestWorkflowInputsCLI): a strategy that still has the marker now fails with the structured error, and a strategy with no marker and no ACs still returnsno_acceptance_criteria.api.media.atlassian.com:443as read-only.uv run --extra dev pytest tests/ --cov=scripts: 1574 passed, 2 skipped, 85% coverage..skillsaw.yamlunknown-rule warning.Caveats
pre-commitcould not fetch its hook repos in the sandbox (TLS certificate verification failed). I ran the hooks directly at their pinned versions instead: ruff, ruff-format, flake8, pymarkdown, and the standard pre-commit-hooks. All passed. The RedHatQE flake8 plugins (UUC/UFN) could not be installed, so I checked the new names for repo-wide uniqueness with grep.skills/test-plan-create/SKILL.md. Even a small change (adding|| exit 1after thefetch_issue.pycall) pushed that skill over skillsaw's 6,000-token warning limit. A failed fetch is still caught: the empty snapshot already fails the post-hook's non-empty check, and a description that still has the marker is rejected by the two new checks.🤖 Generated with Claude Code
Closes #104
Post-script verification
agent/104-fail-loud-attachment-fetch)6900c697f16ab8d3c9b4a991277c763678b4b66d..HEAD)