Skip to content

Add /favicon.ico route for connector icon#81

Merged
cmeans merged 1 commit into
mainfrom
feature/favicon
Mar 28, 2026
Merged

Add /favicon.ico route for connector icon#81
cmeans merged 1 commit into
mainfrom
feature/favicon

Conversation

@cmeans
Copy link
Copy Markdown
Owner

@cmeans cmeans commented Mar 28, 2026

Merge order: Depends on #82 (label automation) and #80 (license change) merging first. Rebase onto main after both land.

Summary

  • Serve the awareness logo at /favicon.ico from both ASGI middleware classes
  • Anthropic's Connectors UI uses Google's favicon service to display connector icons — this replaces the generic globe with the awareness eye logo
  • Route is public (served before secret path check) so external crawlers can reach it
  • favicon.ico included in the wheel via force-include in pyproject.toml

QA

Prerequisites

  • pip install -e ".[dev]"
  • Deploy to test instance on alternate port (AWARENESS_PORT=8421)

Manual tests (via HTTP — middleware routes, not MCP tools)

    • Favicon on secret-path deployment
    curl -sI https://<test-host>/favicon.ico
    

    Expected: HTTP 200, Content-Type: image/x-icon, ~15KB body

    • Favicon does NOT require secret path
    curl -sI https://<test-host>/favicon.ico
    

    Expected: Returns 200 even though other non-secret paths return 404

    • Health endpoint still works
    curl -s https://<test-host>/<secret>/health
    

    Expected: JSON with status "ok"

    • MCP endpoint unaffected
      Verify get_briefing still works via MCP client
    • Tests pass locally
    python -m pytest tests/test_middleware.py -v
    

    Expected: 15 tests pass (was 13, +2 favicon tests)

🤖 Generated with Claude Code

@cmeans cmeans added Ready for QA Dev work complete — QA can begin review and removed Ready for QA Dev work complete — QA can begin review labels Mar 28, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@cmeans cmeans added the merge-order: 2 Merge second — depends on merge-order: 1 label Mar 28, 2026
@cmeans cmeans added merge-order: 3 Merge third in current batch Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA and removed merge-order: 2 Merge second — depends on merge-order: 1 labels Mar 28, 2026
@cmeans
Copy link
Copy Markdown
Owner Author

cmeans commented Mar 28, 2026

Adding Awaiting CI — blocked on #82 and #80 merging first (merge-order: 3). Will rebase and get fresh CI once both land.

@cmeans cmeans added Dev Active Developer is actively working on this PR; QA should not start and removed Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA labels Mar 28, 2026
@cmeans
Copy link
Copy Markdown
Owner Author

cmeans commented Mar 28, 2026

Needs rebase after #80 merges. Holding until then.

Anthropic's Connectors UI uses Google's favicon service to show
connector icons. Serve the awareness logo at /favicon.ico from both
middleware classes so it displays in Claude.ai instead of a generic
globe. Route is public (no secret path required) so external crawlers
can reach it.

- favicon.ico copied into package, included in wheel via force-include
- SecretPathMiddleware: serves before secret path check
- HealthMiddleware: serves alongside /health
- 2 new tests (15 total in test_middleware.py)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA label Mar 28, 2026
@cmeans cmeans added Ready for QA Dev work complete — QA can begin review and removed Dev Active Developer is actively working on this PR; QA should not start Awaiting CI Dev complete, waiting for CI/Codecov to pass before QA labels Mar 28, 2026
@cmeans
Copy link
Copy Markdown
Owner Author

cmeans commented Mar 28, 2026

CI green after rebase. Ready for QA. (Manual promotion — force push breaks workflow_run PR lookup.)

@cmeans cmeans added the QA Active QA is actively reviewing; Dev should not push changes label Mar 28, 2026
@github-actions github-actions Bot removed the Ready for QA Dev work complete — QA can begin review label Mar 28, 2026
Copy link
Copy Markdown
Owner Author

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

QA Review — PR #81: Add /favicon.ico route for connector icon

Code Review

  • Favicon loaded at import time (_FAVICON_BYTES) — efficient, no repeated disk I/O. Graceful None fallback if file missing.
  • Both middleware classes serve /favicon.icoSecretPathMiddleware serves before secret check (correct for public route), HealthMiddleware serves alongside /health.
  • HealthMiddleware refactored to nested if within scope["type"] == "http" — clean, no logic change for existing /health behavior.
  • pyproject.toml force-include mirrors existing instructions.md pattern.
  • Response uses image/x-icon content type — correct for .ico files.
  • AGPL header present on modified middleware.py (pre-existing from #80).

Test Results

Check Result
test_middleware.py — 15 tests ✅ (was 13, +2 favicon)
Full suite — 383 tests ✅ (was 381, +2 favicon)
ruff ✅ (via CI)
mypy ✅ (via CI)
codecov/patch

Manual Tests

# Test Result
1 Favicon served — HTTP 200, image/x-icon, 15,086 bytes
2 Favicon served without secret path ✅ (tested on HealthMiddleware instance)
3 Health endpoint still works — {"status":"ok"}
4 MCP endpoint unaffected — get_briefing works ✅ (production instance verified via awareness MCP)
5 test_middleware.py — 15/15 pass

Verdict

Zero findings. Clean, focused PR. All 5 manual tests pass, 383/383 automated tests pass. Ready for signoff.

@cmeans
Copy link
Copy Markdown
Owner Author

cmeans commented Mar 28, 2026

Adding Ready for QA Signoff — all 5 manual tests pass, 383/383 automated tests (15/15 middleware), CI green, zero findings. Removing Ready for QA.

@cmeans cmeans added the Ready for QA Signoff QA passed — ready for maintainer final review and merge label Mar 28, 2026
@github-actions github-actions Bot removed the QA Active QA is actively reviewing; Dev should not push changes label Mar 28, 2026
Copy link
Copy Markdown
Owner Author

@cmeans cmeans left a comment

Choose a reason for hiding this comment

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

LGTM

@cmeans cmeans added QA Approved Manual QA testing completed and passed and removed Ready for QA Signoff QA passed — ready for maintainer final review and merge labels Mar 28, 2026
@cmeans cmeans merged commit b46d090 into main Mar 28, 2026
30 checks passed
@cmeans cmeans deleted the feature/favicon branch March 28, 2026 15:41
@cmeans cmeans mentioned this pull request Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-order: 3 Merge third in current batch QA Approved Manual QA testing completed and passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant