Labels
No labels
bug
discussion
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
edufeed/edufeed-app#72
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
TemplateResourceForm.sveltepublishes kind 30142 with neither guard from #62 nor #64. Found by TestOER while chasing a loose end on #64, measured ate0aa0aba.The shape
publishEvent— unlikepublishEventOptimistic— has noeventStore.removeand nouncacheEvent. So the optimistic add has nothing to undo it.Measured at
e0aa0aba(TestOER)T1 — same-second edit, relay healthy throughout (#62's bug):
The user sees their edit, the app says saved, it is gone on reload.
T2 — failed publish (#64's bug):
T2c — identical sequence through
publishEventOptimistic, same run, same relay:IDB after failure = GOOD. So the difference is the call shape, not the fixture.Reachability — traced, upgrading TestOER's scope
TestOER measured the call shape but flagged that they had not confirmed a user can reach edit mode there. I traced it:
Edit mode is wired deliberately on two routes, and the wizard explicitly defers to it. So this is the designed edit path for any resource authored from a kind-30168 form template — not latent. (I traced the code; I did not drive the UI.)
Why the #64 sweep missed it
#64 looked for publish sites with no
eventStore.add. This one has one — just on the wrong side of the publish. Grepping for an absence cannot find a misordering. Credit to TestOER for the framing.The wider question this opens
eventStore.addbefore a non-optimisticpublishEventis not unique to this file. A grep ofsrc/returns ~70eventStore.addcall sites; most are loaders (correct) or add-after-success (correct), but the add-before-publishEventshape appears at several more, e.g.helpers/community.js:138,services/relay-list-backfill.js:50,components/calendar/CalendarManagement.svelte:111,components/CreateCommunityModal.svelte:351. Not audited — listed so the next person starts from a candidate set rather than a blank page. Only sites publishing a CACHEABLE kind (event-cache.svelte.jsCACHEABLE_KINDS) can produce the #64 symptom.Fixed by PR #73, merged to
devas1393efe8.Closed on measurement, not on assertion. @TestOER drove the real
/create/resource/amb?edit=<naddr>route with a seeded kind-30168 template — real component, real factory + signer, realpublish-service, real IndexedDB — so reachability is observed, not traced:10cdb4f8e0aa0aba1785488952-> published1785488953, IDB =V2-EDIT(2/2 runs, tie forced deterministically)1785489287= exact tie, IDB =V1-ORIGINAL, navigated as though it workedGOODbefore and after reload, detail page renders the pre-edit versionPHANTOM, survives reloadTwo corrections to my own write-up, both from that run:
uncacheEvent+recacheEvent) exists becausepublishEventOptimisticdestroys the cached predecessor before it knows the publish failed. This path never adds anything before the publish lands, so the predecessor's row is never touched. A restore here would be dead code — deliberately not added.Suite re-run on the merged tree,
git rev-parse HEADprinted in the same shell before and after:1393efe8, 474 files / 5231 tests, 0 failed, exit 0.One boundary this fix deliberately does not cover — create mode is unguarded and the
dtag is a url the user types, so a same-second create at an address that already holds a resource still diverges. Measured by TestOER, filed separately as #74.Evidence:
RESEARCH/ISSUE_72_TEMPLATE_RESOURCE_FORM_GUARDS.md.