Skip to content

[Request]: Identify project-relative static path failures without exposing host paths #808

Closed

Description

@jimhoyd

Problem or use case

In runtime 0.6.4, a missing static-directory reference still emits only {"event":"error","message":"Required file or directory not found"} from local validation. Two of three recent small-task agent trials receiving valid handler schemas confused site-relative app/assets with project-relative assets; this error did not identify the route, field or root distinction.

Minimal synthetic reproduction: a site has an existing app/assets directory, and app/urlcode.yaml contains:

version: "1"
routes:
  /assets/*:
    static:
      directory: app/assets

Run urlcode validate --local --project app from the site. The error above is reproduced. The correct directory reference is assets because YAML source references resolve from the route project root.

Proposed behavior and alternatives

Complete the authoring diagnostics for ordinary in-project static/page/download references: identify the route, YAML pointer/line when available, configured project-relative reference, and that resolution is relative to the selected project. A safe relative diagnostic is sufficient; do not expose arbitrary absolute host paths.

Preserve the traversal/MCP redaction decision in #610. References escaping the authorized project must stay redacted and must not become filesystem-existence oracles. Keep server responses generic; any richer CLI-only fields need explicit channel boundaries.

Add focused fixtures for an ordinary missing asset directory, the doubled app/app prefix mistake, and a traversal-shaped reference proving redaction remains intact. This is a specific remaining path under the broader diagnostics work #581, not a request to undo its security fixes.

Activity

  1. added
    enhancement
    ai-first
    on Sep 27, 2026
  2. jimhoyd commented on Sep 27, 2026

    @jimhoyd
    CollaboratorAuthor

    Reproduced on main 04d96e1c: the issue's exact site (app/assets exists, route static.directory: app/assets) run with urlcode validate --local --project app from the site root still prints only {"event":"error","message":"Required file or directory not found"} — no route, field or project-root hint.


    Generated by Claude Code

  3. added
    in-progress
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-firstenhancementin-progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions