Skip to content

Fix custom favicon persistence across instances on Development - #1936

Merged
Paul Lizer (paullizer) merged 2 commits into
microsoft:Developmentfrom
paullizer:paullizer-development-favicon-persistence
Nov 13, 2026
Merged

Paul Lizer (paullizer) merged 2 commits into
microsoft:Developmentfrom
paullizer:paullizer-development-favicon-persistence

Conversation

@paullizer

@paullizer Paul Lizer (paullizer) commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Port only the favicon fix from commit 48eab1c86 / #1935 onto Development c158f26bb; no main promotion history is included.
  • Restore stored favicon bytes at startup and reconcile the instance-local icon before its existing static URL is served. Redis-backed settings, Cosmos-only settings and Redis-read fallback use the existing settings resolver without new cache settings.
  • Validate stored ICO data, skip identical writes, atomically replace changed files and log explicit failures with temporary-file cleanup. Preserve logo behavior, favicon version counters and classic/V2 URLs; add real-module and browser regressions for both interfaces. Review follow-up documents the expected missing-file recovery without changing behavior.

Linked issue

Refs #1932. Separate Development port of the main-targeted #1935. Neither PR is merged by this work.

Release Notes & Latest Features

  • New Feature
  • Bug Fix
  • UI Enhancement
  • Breaking Change
  • Internal only

Is this visible to end users?

  • Yes
  • No

Is this admin-facing (Admin Settings, governance, deployment, config)?

  • Yes
  • No

Should this become a Latest Feature card?

  • Yes
  • No
  • Already added

Screenshot needed for the card?

  • Yes
  • No
  • Attached

Version bump

  • application/single_app/config.py VERSION third segment bumped, or not needed because this is docs-only
  • deployers/version.txt bumped, or not needed because deployers/ was not changed

Development version: 0.261.439 → 0.261.441 (initial port 0.261.440, explanatory-comment follow-up 0.261.441). No deployer changes.

Testing / validation

Current review follow-up:

  • python -m pytest .\functional_tests\test_custom_favicon_persistence.py -q -x — 4 passed.
  • python -m pytest .\ui_tests\test_custom_favicon_persistence.py -q -x — 2 passed, classic and V2 favicon URLs serve actual red/blue ICO bytes after settings changes and local file loss.
  • python -m py_compile .\application\single_app\config.py .\functional_tests\test_custom_favicon_persistence.py .\ui_tests\test_custom_favicon_persistence.py — passed.
  • python .\scripts\check_cosmos_response_boundaries.py — passed, 1104 owners, 430 doubles, 0 review gaps.
  • git --no-pager diff --check and git diff --cached --check — passed.

Initial port validation (production behavior is unchanged by the follow-up):

  • python -m pytest .\functional_tests\test_custom_favicon_persistence.py .\functional_tests\test_app_settings_store_consistency.py .\functional_tests\test_app_settings_import_boundaries.py .\functional_tests\test_v2_bootstrap_branding_and_navigation.py -q -x — 45 passed; 10 existing return-value warnings in V2 tests. Fresh real-module imports in normal/optimized Python exercise independent instance roots, startup, Redis/Cosmos/read fallback, missing/unchanged/invalid files, failed replacement cleanup, whole-file concurrent reads and real V2 shell/bootstrap URL builders.
  • python -m pytest .\ui_tests\test_custom_favicon_persistence.py -q -x — 2 passed after capturing image decoding outside assertions. Offline temporary fixtures do not change deployed branding.
  • python -X utf8 .\functional_tests\test_custom_logo_file_preservation_on_startup.py — passed.
  • python -X utf8 .\functional_tests\route_tests\test_route_blueprint_policy_inventory.py — 15 passed.
  • python -X utf8 .\functional_tests\route_tests\test_route_unauthenticated_policy_contract.py — 10 passed.
  • python -X utf8 .\functional_tests\route_tests\test_route_policy_test_coverage.py — 4 passed.
  • python .\functional_tests\test_docs_site_quality.py — 6 passed.
  • python .\functional_tests\test_docs_app_surface_coverage.py — 7 passed, inventory current.
  • python .\scripts\check_cosmos_response_boundaries.py --refresh — completed, no inventory changes. These edited modules contain no inventoried point-response owners requiring renewed review.
  • $env:PYTHONPATH = "$PWD\application\single_app;$PWD\functional_tests"; python .\scripts\check_cosmos_response_boundaries.py --run-contracts — not completed. Started the full 251-selector owner/SDK evidence suite, then stopped the overly broad run after partial progress because this port changes no inventoried Cosmos owner or double. No full-suite pass is claimed; deterministic inventory validation and the targeted real-module runtime suites above completed.
  • python -m py_compile .\application\single_app\app.py .\application\single_app\config.py .\functional_tests\test_custom_favicon_persistence.py .\ui_tests\test_custom_favicon_persistence.py — passed.
  • python .\functional_tests\test_app_settings_cache_versioning.py — 1 passed, 1 failed (pre-existing Development source-marker expectation). python -m pytest .\functional_tests\test_app_settings_cache_versioning.py -q -x identifies line 45: it expects the outdated literal apply_updates, expected_etag=expected_etag, write_guard=guard_embedding_write. Verified that the test and all three inspected settings modules are byte-identical to origin/Development, whose settings source also lacks that literal. Left this unrelated baseline test unchanged; runtime settings and favicon fallback tests pass.

Documentation

  • Release notes updated, or not needed
  • Feature documentation updated, or not needed
  • Fix documentation updated, or not needed

Added the Development fix note, classic/V2 branding guide note, [BRANDING] logging inventory and release entry under 0.261.441.

Security checklist

  • New Flask routes include @swagger_route(security=get_auth_security())
  • Settings sent to non-admin frontends use sanitize_settings_for_user()
  • Browser JavaScript is served from local SimpleChat static assets only; no CDN-hosted JS
  • No secrets, keys, connection strings, or local-only artifacts are included

No production routes, authorization changes or new browser assets. Stored base64 remains server-side; existing settings sanitization and V2 projections are preserved.

Port favicon restoration and atomic synchronization from 48eab1c without main promotion history. Cover classic and V2 URLs with isolated runtime and browser regressions. Bump Development to 0.261.440.

Refs microsoft#1932

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread application/single_app/config.py Fixed
Document why FileNotFoundError falls through to materialization rather than representing a swallowed failure. Preserve favicon behavior and advance version metadata to 0.261.441.

Refs microsoft#1932

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) merged commit 1389ee3 into microsoft:Development Nov 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants