Skip to content

fix(test-plan): fail loud when strategy attachment is not fetched - #105

Merged
fege merged 1 commit into
mainfrom
agent/104-fail-loud-attachment-fetch
Nov 23, 2026
Merged

fege merged 1 commit into
mainfrom
agent/104-fail-loud-attachment-fetch

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

When a strategy is too long for its Jira description, the full text is stored in a <KEY>-strategy.md attachment. The attachment's content URL redirects (303) to api.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: allow api.media.atlassian.com:443 with access: read-only in 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 returning no_acceptance_criteria. test-plan-create Step 1.5 already stops when this command exits nonzero.
  • .fullsend/test-plan/post-test-plan.py: second check on the host. If .source-strategy.md still 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_criteria result. Tests cover this.

Testing

  • New unit tests (TestWorkflowInputsCLI): a strategy that still has the marker now fails with the structured error, and a strategy with no marker and no ACs still returns no_acceptance_criteria.
  • New integration tests: the post-hook rejects a snapshot that still has the marker and publishes nothing, but still publishes a genuine no-AC review. Both Jira profiles list api.media.atlassian.com:443 as read-only.
  • I removed the fix from the code and confirmed the new tests fail without it.
  • uv run --extra dev pytest tests/ --cov=scripts: 1574 passed, 2 skipped, 85% coverage.
  • skillsaw: 0 errors. The one warning is the existing .skillsaw.yaml unknown-rule warning.

Caveats

  • pre-commit could 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.
  • I did not edit skills/test-plan-create/SKILL.md. Even a small change (adding || exit 1 after the fetch_issue.py call) 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

  • Branch is not main/master (agent/104-fail-loud-attachment-fetch)
  • Secret scan passed (gitleaks — 6900c697f16ab8d3c9b4a991277c763678b4b66d..HEAD)
  • PR body secret scan passed (gitleaks — no-git)
  • Final PR description secret scan passed (gitleaks — no-git)

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>
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Nov 23, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 2:50 PM UTC · Completed 2:59 PM UTC

Commit: c9827fa · View workflow run →

Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.78

@fullsend-ai-review fullsend-ai-review Bot added the risk/moderate PR risk: moderate label Nov 23, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: moderate (2/5)

Details

Moderate 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.

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium


Labels: The PR fixes a defect (network failure reported as a content verdict) described in issue #104.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment kind/bug Something isn't working labels Nov 23, 2026

@fege fege left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on a gitlab run with a real jira ticket

@fege
fege merged commit 7754920 into main Nov 23, 2026
63 of 64 checks passed
@fege
fege deleted the agent/104-fail-loud-attachment-fetch branch November 23, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working ready-for-review Triggers review agent dispatch requires-manual-review Review requires human judgment risk/moderate PR risk: moderate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sandbox cannot reach api.media.atlassian.com — attachment-backed strategies silently degrade to Rework / no-acceptance-criteria

1 participant