Skip to content

aliases: website.case-sensitive-paths opts in to case-only alias/page pairs (#944) - #952

Merged
cscheid merged 2 commits into
mainfrom
feature/issue-944
Oct 28, 2026
Merged

cscheid merged 2 commits into
mainfrom
feature/issue-944

Conversation

@cscheid

@cscheid cscheid commented Oct 28, 2026

Copy link
Copy Markdown
Member

Closes #944. Braid: bd-ex8qvuwu. Triage record: claude-notes/issue-reports/944/triage.md.

What

An alias whose redirect stub differs from a rendered page only by case (r/index.qmd declaring aliases: [/R/]) was a hard Q-5-25 error with no escape hatch. That implemented decision 3 of the 2026-08-12 aliases plan, whose premise ("no realistic scenario wants a case-only pair") the Posit Connect docs port refuted: the site is served from S3, where R/ and r/ are distinct keys and the old URLs must keep redirecting.

This PR keeps the error as the default and adds an affirmative option:

website:
  case-sensitive-paths: true

With it set:

  • plan_alias_stubs compares paths exactly, so a case-only pair plans two stubs. Each stub that would have collided carries a CaseFoldTwin naming the page or earlier stub it folds onto.
  • write_alias_redirects probes the output directory (probe file written lowercase, looked up uppercase; only when a twin exists) and, if the directory folds case, skips the twinned stub with the new warning Q-5-51 instead of overwriting the page with a redirect. Pages always win; between two stubs the one that sorts first wins.
  • Both Q-5-25 diagnostics now end with a hint naming the option. A non-website project that sets it gets a "no effect" warning, like website.llms-txt.

Docs: Q-5-25.qmd and the aliases guide gain a "hosts that distinguish case" section and an expanded Quarto 1 comparison (Q1 compares exact strings, so it writes both files on Linux and silently replaces the page on macOS/Windows). New Q-5-51.qmd, catalog entry, sidebar entry. Decision 3 of the plan is amended with a pointer to the triage.

Tests — please watch both filesystem kinds in CI

The new integration tests do not gate on cfg!(target_os). Each probes the temp directory it rendered into and asserts the outcome that directory calls for:

  • case-sensitive (Linux CI, or a case-sensitive macOS volume): both files written, no Q-5-51, stub redirects to its page;
  • case-insensitive (default macOS, Windows): page intact, no stub, Q-5-51 present, no probe file left in _site.

Locally both branches ran: default APFS, and a Case-sensitive APFS disk image mounted as TMPDIR. This is the first test in the repo whose assertions depend on the runner's filesystem, so the Linux and macOS/Windows jobs are exercising different branches of the same tests.

cargo xtask verify --skip-hub-build green locally. cargo clippy -p quarto-core --all-targets -- -D warnings clean. The Windows cross-check (--target x86_64-pc-windows-msvc) cannot run from macOS here because wasmtime/tree-sitter/aws-lc-sys build scripts compile C for the target; the new code uses no platform-specific APIs (SystemRuntime only).

🤖 Generated with Claude Code

cscheid and others added 2 commits October 28, 2026 07:52
…/page pairs render (bd-ex8qvuwu)

Triage record and minimal repro for GH #944. Q-5-25 reproduces at main @
49cb226; it implements decision 3 of the 2026-08-12 aliases plan, which
the issue deliberately revisits. Direction: keep the error by default, add
an affirmative website.* option declaring the deployment target
case-sensitive, and document the Quarto 1 discrepancy.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… pairs (#944, bd-ex8qvuwu)

Q-5-25 rejected an alias whose stub differs from a rendered page only by
case, with no escape hatch. Posit Connect's docs need exactly that pair:
served from S3, R/ and r/ are distinct keys and the old URL must redirect.

Keep the error as the default; add `website: case-sensitive-paths: true`.
With it, plan_alias_stubs compares paths exactly and marks each stub that
would have collided with a CaseFoldTwin. write_alias_redirects probes the
output directory and, where it folds case, skips the twinned stub with the
new Q-5-51 warning instead of overwriting the page. Both Q-5-25 shapes now
hint at the option; non-website projects warn that it has no effect.

Docs: Q-5-25, new Q-5-51, aliases guide, catalog, sidebar; decision 3 of
the 2026-08-12 plan amended. Integration tests branch on a runtime probe
of the temp dir so Linux CI exercises the write and macOS/Windows the skip.
Triage doc: escape @-mentions and a possessive so claude-notes renders
under --strict.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@posit-snyk-bot

posit-snyk-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cscheid
cscheid merged commit 370e433 into main Oct 28, 2026
17 checks passed
@cscheid
cscheid deleted the feature/issue-944 branch October 28, 2026 14:47
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.

website: alias differing from its page only by case (Q-5-25) is a hard error; needs warning or opt-out for case-sensitive hosts

2 participants