Skip to content

[codex] Structure project favicon resolution failures#3369

Merged
juliusmarminge merged 2 commits into
codex/preserve-asset-access-causesfrom
codex/structure-project-favicon-errors
Jun 20, 2026
Merged

[codex] Structure project favicon resolution failures#3369
juliusmarminge merged 2 commits into
codex/preserve-asset-access-causesfrom
codex/structure-project-favicon-errors

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • add structured project favicon failures with operation, workspace, candidate path, and exact underlying cause
  • treat only true filesystem NotFound failures as optional fallback; surface permission, I/O, workspace normalization, and unsafe-path failures
  • preserve the structured resolver cause when AssetAccess maps the failure into its RPC error contract

Stack

This PR is stacked on #3342 (codex/preserve-asset-access-causes) so its AssetAccess cause mapping remains intact. Merge #3342 first, then retarget this PR to main.

Validation

  • vp test apps/server/src/project/ProjectFaviconResolver.test.ts apps/server/src/assets/AssetAccess.test.ts (14 tests)
  • vp check (passes; 20 pre-existing warnings)
  • vp run typecheck

Note

Medium Risk
RPC clients must handle richer AssetAccessError payloads, and favicon flows that previously got silent null now receive explicit failures for permission, I/O, and invalid workspace paths.

Overview
Project favicon resolution now fails with a tagged ProjectFaviconResolutionError (operation, workspace paths, underlying cause) instead of returning null when normalization, unsafe paths, or non-NotFound stat/read errors occur. Missing candidates still skip via NotFound-only handling.

Asset URL issuance extends the RPC AssetAccessError contract with AssetAccessOperation and the requested resource, and threads those through issueAssetUrl, workspace-context resolution in ws.ts, and favicon mapping (resolve-project-favicon with the resolver error as cause).

Tests assert structured fields and cause preservation for workspace assets and favicon resolution edge cases.

Reviewed by Cursor Bugbot for commit c554ee6. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Structure favicon resolution failures with typed errors in asset URL issuance

  • Introduces ProjectFaviconResolutionError, a tagged error class with operation, workspaceRoot, relativePath, absolutePath, and cause fields, replacing silent null returns for non-NotFound filesystem errors in ProjectFaviconResolver.resolvePath.
  • Augments AssetAccessError in assets.ts with operation and resource fields, providing a structured discriminator for all failure sites in issueAssetUrl.
  • Project favicon resolution failures in issueAssetUrl now propagate as AssetAccessError with operation: "resolve-project-favicon" instead of silently proceeding.
  • Behavioral Change: Consumers of ProjectFaviconResolver.resolvePath and AssetAccessError will see new required fields; previously swallowed errors now surface as typed failures.

Macroscope summarized c554ee6.

Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Jun 20, 2026
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5d402f46-bec4-4582-ae49-26d27b6cbd24

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/structure-project-favicon-errors

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size:L 100-499 changed lines (additions + deletions). label Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Adds structured error context (operation, resource fields) to asset access and project favicon resolution failures for improved debugging. Changes are additive to error structures without altering success paths or core business logic.

You can customize Macroscope's approvability policy. Learn more.

Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge merged commit 26f8074 into codex/preserve-asset-access-causes Jun 20, 2026
16 checks passed
@juliusmarminge juliusmarminge deleted the codex/structure-project-favicon-errors branch June 20, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant