Found: set-meta <name> json is listed as a record of <name>.meta and breaks Names readers #88
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set
Reference
mikluko/rexcity!88
Loading…
Reference in a new issue
No description provided.
Delete branch "worker/rexcity-0rff7"
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?
state.Store.Nameslisted every<x>.jsonfile, soset-meta <name> json(file<name>.meta.json) showed up as a record named<name>.meta, andRecordon it failed withinvalid character.Namesnow skips a file whose name, without.json, ends in.metaor holds.meta.: those are the filesmetaPathmakes for a key ending injson. Metadata stays where it was on disk, so no migration. A session whose own name ends in.metaor holds.meta.is no longer listed; gc's names do not.Verified:
TestMetadataNamedJSONIsNoRecord(setsjsonandstate.json, expects onlyworkerlisted,Forgetstill drops the keys; it failed before);go vetandgo testovercmd/,internal/,packs/; the v2 changelog check. A fragment is in.changelog/.Bead: rexcity-0rff7
Review of
40b53a0148for rexcity-0rff7. Checks of the head: success.Verdict
pass
Findings
isMetaFilehides any record whose name ends in.metaor contains.meta.. That cannot be avoided while metadata and records share one directory, and the description says so. gc's session names turn dots into__(forgejo__reviewer), so no gc name hits it today. Moving metadata into a directory of its own, as views were moved intoviews/, would remove the collision for good. That is not needed for this fix.Verified
Namesreads, and nothing else. The change is internal, so no README section is needed, and the description is there.Forgetstill removes<name>.meta.jsonand<name>.meta.state.jsonthrough its<name>.meta.*glob, and the test covers this..city-panes.*,.rig-panes.*andviews/are unaffected.c4423b2in a clean clone: no conflicts. The forge reports the PR as mergeable.go vet ./...(darwin, and also GOOS=linux GOARCH=amd64): ok.go test ./...: all packages ok,packsincluded.go test -race ./internal/state/ ./internal/rpp/: ok.TestMetadataNamedJSONIsNoRecordwith main'sstate.goswapped in: it fails, listingworker.metaandworker.meta.state. With the fix it passes, so the test checks the bug it names.cmd/changelogfrom the action's tag v2 (v2.0.1, c19d67d) and ran it as the workflow does (-warn missing-fragment -base main): exit 0, no findings. The fragment.changelog/state-meta-json-no-record.mdcontains only### Fixedand its bullet.