refactor: one owner per rule — chip grammar, defaults, links, params, names, loaders and client fixtures #256
No reviewers
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!256
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/244"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #244
What
Every rule drift audit #234 (items 3, 4, 6–14 and the node lookup) found evaluated twice now has exactly one owner. Every rule the web client or a theme partial re-evaluates is pinned by a JSON fixture under the owning Go package's
testdata/, loaded by bothgo testand vitest. The vitest side uses one shared loader,web/src/test/goFixture.ts; the old pagepath fixture test uses it too.contentserializercontent/testdata/chip_cases.json(62 cases)element.Param.SpellsEmpty(v, keepRequired).inline)elemops.PlacementMsg,content.InsertChildelemops/testdata/placement_cases.jsonlinkrefs.Destinations/Classify/SplitTargetlinkrefs/testdata/link_type_cases.json(linkTypeOf+ renderedce/href.html)content.MetaLookup/MetaText/MetaBool,l10nconstantscontent.Shortcode.Param/SetParam/DeleteParam(copy-on-write)elemops.ShortcodeDisabledelemops/testdata/disabled_cases.json(disabledByParams+ renderedce/disabled.html)pagepath.ValidLangTagsidecardir.ValidName/CheckName,content.ValidParamNamesidecardir.RequireVersion1/ParseNameListpageops,categories,element,elemopspagetree.Node.FindByPathpagetree.PagePermalink(p, "", "");pageops.PageURLis removedcontent.ValidKeyFixes carried by the move
2.0re-serializes as2.0. The client keeps afloatslist on the chip node. A newline or CR in a chip value is refused by the client with the server's message.numberis still normalised by the server's save (2.0→2), as before and as AGENTS.md documents.Node.Permalink(or the content path), the same match resolve makes.TestPublishAllCheckAgreesWithLinkResolvecovers a page withurl:and a page withslug:.harness sidecaruses the loader's grammar, soMyBlock_2is accepted and-foois refused with the loader's message.harness sidecar -badis still refused (exit 2), but by Go's flag parser as an unknown flag. Withharness sidecar -- -badit gets the loader's message.[EN] …as a language.Other behaviour changes (all toward agreement)
MergeParamsand the hash shareSpellsEmpty, which compares againstEmpty(). So an unheldboolparam with nodefault:is no longer written asx=falseon an unchanged save; this is the #219 symptom for that type.linkrefsnow also sees and rewrites links written inside string params and front-matter values, for example a rich-text param. It also allows whitespace after](. Publish already saw these links through its raw regex scan, and the rewrite engine must never miss a link publish sees.?querybefore the page lookup, as the theme and publish do.Docs and skills
scaffold/site/AGENTS.mdgains:container: true⇒ paired tags, in a new Containers paragraph;edit-content,migrate-site,add-elementandremove-elementskills point at those sections instead of restating them.README.mdpublish link-check paragraph is updated.themes/deckle/README.mdis unchanged: no partial's contract changed.Verification
go vet ./...andgo test ./...pass with Hugo 0.167.0 on PATH, so the theme render tests ran rather than skipped.cd web && npm run build && npm testpasses: 120 files, 3117 tests.tsc --noEmitis clean.harness initinto a temp site, thenharness check, reports no problems.harness sidecar MyBlock_2writes the sidecar.2as int and2.0as float (round trip throughcontent.Parse).deckle-hostedor in the scaffold/testdata sites changes validity under the loader grammar.requiredexemption is kept as #219 intended; the mutation tests fail without it.Follow-ups noticed, out of scope
pageops/relocate.gobuilds rename pairs from the default pretty URL, so moving a page withslug:misses links that store its permalink. This is the same bug class as the publish fix.pagetree/hugopath.goandlangcmd;looksLikeHugoSiteincmd/harnessandcheckcmd;MediaModule.tsx.element.Uses.PageRefno longer has a non-test reader.javascript:: the canonical-anchor gate is shape-only and admits ajavascript:href. Go and the client agree on this, and the fixture records it explicitly. It is worth a security look on its own.🤖 Generated with Claude Code
[autoland] verdict: pass
PASS — validated against #244. Signal: CI aggregate success (ci / build-and-test: npm build+test, go vet, go test with Hugo 0.167.0, harness build). Conventional title, Closes #244 present, branch current with main (merge-base = main HEAD
8fffc2f). Diff matches the issue's owners table and acceptance criteria: one owner per rule, every client/theme mirror pinned by a Go-owned JSON fixture loaded by both suites, AGENTS.md + edit-content/migrate-site/add-element/remove-element skills updated, upload facts in AGENTS.md verified against internal/media. Non-blocking note: publish's draft-link check now matches exact permalinks only (internal/server/publish.go ~L850), so a non-canonical hand-written link (no trailing slash, or relative) to a draft page is no longer warned about; that follows from the issue's 'match as resolve does' decision.