Skip to content

Conversation

@continue-development-app
Copy link

@continue-development-app continue-development-app bot commented Dec 22, 2025

Summary

Adds extensive test coverage for the new error handling logic introduced in PR #9270.

New Test Coverage

Hub Error Re-throwing

  • ✅ Test re-throwing of 404 errors for non-existent hub slugs
  • ✅ Test re-throwing of network timeout errors
  • ✅ Test re-throwing of authentication (401) errors
  • ✅ Verify hub errors are preserved instead of generic "Not a markdown file" message

Hub Slug vs File Path Distinction

  • ✅ Test hub slug priority for two-part paths without extensions
  • ✅ Test file fallback for markdown paths when hub fails
  • ✅ Test NO file fallback for non-markdown paths when hub fails
  • ✅ Test hub slugs with hyphens (e.g., continue-dev/cloud-agent)
  • ✅ Test hub slugs with numbers (e.g., owner123/agent456)
  • ✅ Test rejection of paths with dots (e.g., owner.com/agent)

Markdown Extension Detection

  • ✅ Test recognition of .md extension
  • ✅ Test recognition of .markdown extension
  • ✅ Test rejection of non-markdown files (e.g., .txt)
  • ✅ Test case sensitivity for extensions
  • ✅ Test markdown extension handling in two-part hub-like paths

Test Plan

  • All new tests follow existing patterns
  • Tests cover edge cases and error scenarios
  • Tests verify both positive and negative cases

Related Issues


This agent session was co-authored by peter-parker and Continue.


Summary by cubic

Add comprehensive tests for AgentFileService error handling. Ensures hub errors are re-thrown, correct hub-vs-file resolution, and strict markdown detection.

  • New Tests
    • Re-throw hub errors (404, network timeout, 401) and keep original messages.
    • Prioritize hub for two-part paths; fall back to file only when the path has a markdown extension.
    • Validate slug formats: support hyphens/numbers; reject parts containing dots.
    • Detect .md and .markdown extensions; enforce case sensitivity; handle two-part paths with .md by trying hub then file.

Written for commit 550e480. Summary will update automatically on new commits.

Add extensive test coverage for the new error handling logic in AgentFileService:

- Test re-throwing of different hub error types (404, network, auth)
- Test hub slug vs file path distinction with various edge cases
- Test markdown extension detection for both .md and .markdown
- Test two-part paths with/without extensions
- Test hub slugs with hyphens, numbers, and dots
- Verify file fallback only occurs for markdown files

Co-authored-by: peter-parker <[email protected]>
@continue-development-app continue-development-app bot requested a review from a team as a code owner December 22, 2025 21:52
@continue-development-app continue-development-app bot requested review from sestinj and removed request for a team December 22, 2025 21:52
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 22, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

continue-development-app bot pushed a commit that referenced this pull request Dec 22, 2025
@continue
Copy link
Contributor

continue bot commented Dec 22, 2025

No documentation updates needed for this PR.

This PR adds test coverage for the error handling improvements in #9270. Since these changes are:

  • Internal test improvements
  • Bug fixes that improve error messages (no new user-facing behavior)
  • Already covered by existing documentation on agent referencing

The current documentation accurately describes how agents work and how to reference them. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

continue-agent size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant