You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
queryAll on slug-history sheet returns empty after staff-approve merge #47
In the account-claim test for post-onboarding merge approval, after store.transact commits the slug-history record (file visible via git ls-tree HEAD slug-history/person/<oldSlug>.toml), app.store.public['slug-history'].queryAll() returns [].
The same is true for query(). The test had to fall back to git show HEAD:slug-history/person/<oldSlug>.toml to verify.
Test: apps/api/tests/account-claim.test.ts → submit + staff-approve merges fresh Person into legacy
Reverting that test's git-based assertion to queryAll() reliably fails
Likely cause
The gitsheets sheet's in-memory tree pointer isn't updated between transactions for sheets that aren't pre-loaded into our InMemoryState (slug-history and revocations are queried on-demand only). Other sheets like people get their post-commit state via loadInMemoryState at boot and then via StateApply.upsertX in-memory, so the staleness doesn't matter for our route handlers — but it shows up the moment a test or admin script does a direct read against the gitsheets-side query API.
Impact
Production: the existing slug-history redirect lookup in the request handler (gitsheets' byEntityTypeAndOldSlug index) doesn't necessarily share this staleness; that should be verified.
Tests/scripts: direct queryAll() on slug-history (and possibly revocations) is unreliable post-transaction.
Next steps
Reproduce in isolation against the gitsheets v1.0.x API.
File upstream if it's a gitsheets bug, or document a refresh hook here if it's expected behavior.
Activity
chore(plans): add importer-cleanup-trio in-progress
docs(storage): document gitsheets dataTree caching limitation (closes #…