Skip to content

Commit bdd9621

Browse files
chore(plans): mark incremental-reload done (PR #202)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 42fc2d2 commit bdd9621

1 file changed

Lines changed: 23 additions & 5 deletions

File tree

‎plans/incremental-reload.md‎

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
status: planned
2+
status: done
33
depends: [gitsheets-freshness]
44
specs:
55
- specs/behaviors/storage.md
6+
pr: 202
67
---
78

89
# Plan: incremental hot reload via `sheet.diffFrom`
@@ -45,14 +46,14 @@ Out: the boot path stays a full load.
4546

4647
## Validation
4748

48-
- [ ] Spec updated first
49-
- [ ] Equivalence test: for a series of upstream commits (add, modify,
49+
- [x] Spec updated first
50+
- [x] Equivalence test: for a series of upstream commits (add, modify,
5051
delete, rename in each sheet), state after the incremental apply deep-
5152
equals state after a full rebuild
52-
- [ ] Config change under `.gitsheets/` triggers the full-rebuild fallback
53+
- [x] Config change under `.gitsheets/` triggers the full-rebuild fallback
5354
- [ ] Sandbox: reload timing and peak heap for a one-record upstream change
5455
vs. a full rebuild
55-
- [ ] `type-check` + `lint` + full api suite green
56+
- [x] `type-check` + `lint` + full api suite green
5657

5758
## Risks / unknowns
5859

@@ -62,4 +63,21 @@ Out: the boot path stays a full load.
6263

6364
## Notes
6465

66+
- **Unchecked: sandbox timing and peak heap.** Needs a release on the
67+
sandbox. The webhook response and log now carry `reloadMode`, so it can
68+
be read off the first real reload.
69+
- Didn't reuse `StateApply`'s remove ops: several don't mirror `index*`
70+
exactly (e.g. leaving empty Sets a full load never creates). Wrote
71+
`unindex*` in `state.ts` as exact inverses instead, which is what makes a
72+
plain deep-equal against a full load possible.
73+
- `diffFrom` records lack the `gitsheets-sheet` / `gitsheets-path` symbols
74+
that `queryAll()` attaches, and gitsheets' delete/upsert rely on them, so
75+
the apply step adds them. The test deletes an incrementally loaded record
76+
through gitsheets to pin this.
77+
- The fallback threshold (5,000 changed records) is a judgment call.
78+
Full-import merges exceed it by an order of magnitude; routine pushes are
79+
a handful of records.
80+
6581
## Follow-ups
82+
83+
- Tracked as: sandbox reload timing/heap after the next release (see Notes).

0 commit comments

Comments
 (0)