upgrade gitsheets 1.4.1 → 2.x (Rust core), pairing with upstream per-sheet refresh (gitsheets#184)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- git, rust, typescript
Research direction
Start with the gitsheets 2.x migration guide and upstream issue #184, then inspect apps/api/src/store/store.ts, apps/api/src/routes/attachments.ts, apps/api/src/lib/data-repo-lock.ts, apps/api/src/store/public.ts, importer.ts, and people.ts. Done means the API runs on 2.x, the stale-cache workarounds are removed where upstream support permits, and the noted casts are checked against the new API.
Written by the indexing model from the issue text.
Description
The API is pinned to `gitsheets ^1.4.1` — a full major version behind the 2.x line, which replaced the JS engine with a Rust core (canonical TOML, schema validation, and tree ops all native; measured ~4–5× faster on large-sheet commit workloads, with byte-identical output). A migration guide ships with 2.x.
Beyond the version bump, the upgrade is the right moment to retire three workarounds that all trace to the stale-`Sheet`-cache gap tracked upstream as JarvusInnovations/gitsheets#184:
- `apps/api/src/store/store.ts` — `swapPublic()` and the funnel-all-reads-through-memory rule exist because direct `sheet.query*()` after a transact reads the pre-commit tree (documented in `specs/behaviors/storage.md` under "Direct gitsheets reads after a transact").
- `apps/api/src/routes/attachments.ts` — deliberately bypasses `Sheet.getAttachment()` and streams via raw `git cat-file` to dodge the same cache.
- `apps/api/src/lib/data-repo-lock.ts` — a parallel mutex because gitsheets' internal one isn't exposed for non-transact git ops.
Ideally the upgrade lands alongside (or drives) the upstream #184 implementation so those can be deleted rather than ported.
Also worth checking during the upgrade: the `asValidator()` cast in `apps/api/src/store/public.ts` (Zod v4 vs `StandardSchemaResult` structural mismatch) and the `BlobObject.write(hologit, buf as unknown as string)` casts (`importer.ts`, `people.ts`) — the 2.x API surface (`BlobHandle`, typed error classes) may eliminate both.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 1
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CodeForPhilly/codeforphilly-ng
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
MarkdownEditor toolbar: use Radix Toolbar from radix-ui instead of the hand-rolled roving tabindex Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
All issues in CodeForPhilly/codeforphilly-ng
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·