fix: remove content_category entrypoint heuristic that breaks re-deploys#4112
Conversation
…oys (#4110) The contentCategoryField heuristic (added in #4048) set content_category to "site" in the manifest when the entrypoint path started with _site/ or _book/. This causes Connect error 110 on re-deploys of content that was originally created without content_category, since Connect does not allow changing categorization after first deploy. Testing confirmed that content_category: "site" is not required for Connect or Connect Cloud to correctly serve multi-page static HTML sites, including revealjs presentations. The _site.yml/_bookdown.yml detection in manifest.ts (carried over from the original Go implementation) is preserved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Claude finished @zackverham's task in 1m 40s —— View job Code Review Complete
Review SummaryVerdict: Approve ✅ This is a well-executed fix for a real regression. The PR correctly removes the problematic What Changed
Why This Fix Is CorrectThe root cause analysis in the PR description is accurate:
Important PreservationThe PR correctly preserves the existing detection in if (KNOWN_SITE_CONFIG_FILES.includes(path.toLowerCase())) {
manifest.metadata.content_category = "site";
}This only triggers when Test Coverage
Minor ObservationsNo issues found. The code removal is clean and focused. The test changes correctly flip from asserting |
Summary
Fixes #4110 — Re-deploying static HTML content fails with Connect error 110: "You cannot change the categorization of content once deployed."
Root cause
The
contentCategoryFieldheuristic added in #4048 setscontent_category: "site"in the deployment manifest whenever the entrypoint path starts with_site/or_book/. This causes a regression for any content originally deployed withoutcontent_category(e.g., by an older Publisher version using the Go bundler, or by the TS bundler before #4048). Connect lockscontent_categoryafter first deploy and rejects any change with error 110.Investigation
We tested
content_category: "site"against both standard Connect and Connect Cloud:Standard Connect — deployed identical multi-page Quarto site bundles (including revealjs presentations) with and without
content_category: "site":content_categorycontent_categoryConnect Cloud — deployed a multi-page Quarto site (including revealjs) without
content_category: "site":content_category: "site"has no observable effect on content serving behavior forapp_mode: "static"on either platform.Fix
contentCategoryFieldentrypoint-path heuristic frommanifestFromConfig.ts_site.yml/_bookdown.ymlfile detection inmanifest.ts(carried over from the original Go implementation) is preserved — this only triggers when those config files are actually present in the bundleTest plan
manifestFromConfig.test.ts— confirmscontent_categoryis not set from entrypoint pathbundler.test.ts— confirms bundle for_site/entrypoint does not includecontent_categorymanifest.test.tsunchanged —_site.yml/_bookdown.ymldetection still workscontent_category— all pages serve correctly🤖 Generated with Claude Code