Ready for Fable code review
- Branch
feat/google-import, tip5fc14f2, base35dd773(=origin/main, unchanged). Commits:cd0d8b9-era first slice (calc.Inspect, store.TextInput),0bdaa76converter,5fc14f2app integration. Not merged, not deployed; Google configuration off everywhere. - Estilo pin
amadan.net/oficina/estilo.git v0.0.0-20261101213957-7a19588e736f(estilo main7a19588, reviewed in estilo #31). No local replace. - Hub CI: queued on
5fc14f2at time of posting (amadan ci status oficina/sheets -branch feat/google-import).
Local evidence (all at 5fc14f2's tree)
make test— vet (incl.-tags browser), gofmt, build,rastrillo migration check("models and migrations agree"),go test -count=1 ./..., race on store/live: all pass.PLAYWRIGHT=/Users/paulcampbell/amadan.net/oficina/docs-general/fixtures/engines/node_modules/playwright/index.mjs go test -tags browser -run '^TestGoogleImportBrowserKeepsValuesAndEdits$' -count=1 ./internal/sheets— PASS (Chromium + WebKit; parent ran it, I re-ran it: 35.6 s). Real app over TLS (__Hostcookies), controlled Google SDK and export: chooser → real multipart/sheets/import→ job → report → grid (00123 /=x/ TRUE kept as text, Google-only formula frozen to 7,A2+3kept, edit A2 → reload recalculates 13) → report reopened from File menu → scriptless upload and table. Test files written by the parent session, committed here.- Not run here:
make test-browser(the chromedp OnTap/DocumentStyles checks) — no Chromium on PATH in this session (RASTRILLO_CHROMEunset). Nothing in those pages' CSS changed; worth one run by whoever has Chromium wired. - Fuzz:
FuzzTextInputReadsBackAsItself20 s, ~330k execs, clean.
Fixture provenance
All synthetic. internal/sheets/xlsx/rawbook_test.go writes workbooks part by part in the XML shapes Google/Excel emit (DUMMYFUNCTION in IFERROR, COMPUTED_VALUE neighbours, t="str" with <v></v>, absent <v>, t="e", shared/array formulas, adversarial duplicates/decoys/depth). import_omissions_test.go builds one of each omitted feature with excelize. internal/sheets/importreport_test.go has a two-sheet Google-shaped workbook. No real Google export fixture and no live Google consent: by Paul's choice Google Cloud is configured after review.
Decisions a reviewer should check
- Supported formulas whose saved value is an error (
=1/0saved#DIV/0!) are kept and compared by error kind, not refused; the refuse-on-t=erule applies to frozen (unsupported) formulas only. Supported formulas with no<v>are kept and reported unchecked. - Literal cells:
t="e"andt="d"literal cells, non-0/1 booleans and non-finite numbers now refuse the import (previously became text silently). Behaviour change for ordinary uploads too. - Every import path (upload and Google) goes through the same converter; ordinary uploads now get reports and the freeze rules — e.g. a workbook with a cross-sheet reference used to abort and now imports with that cell frozen and reported.
- Recalc cap: if any write's recalculation was capped (>5000 dependents), every kept formula is reported unchecked rather than compared (parent's point; tested with 5001 formulas).
sameValuecompares kinds strictly (our blank vs saved 0/"" is a reported difference).- Scan/excelize agreement: formula presence, declared type for every scanned cell, and saved
<v>text for formula cells (excepts/inlineStr/d). Duplicate coordinates (case-insensitive), duplicate<f>/<v>, unknownf/@t, ref-less or mis-rowed formula/string cells, chartsheet-first, depth > 64 all refuse. Exact-path matching ignores decoys. - Report reachable by anyone who can read the sheet; 404 otherwise. Job lands on the report; native API keeps
location= sheet and addsreport(Mac app parses the last segment). - Finding for the spec record: the parser rejects
Sheet2!A1outright (the review guessed it parsed); a textual!/[guard is there anyway.
Known gaps / follow-ups
- Built-in number formats (numFmtId < 164) are reported as partial formatting rather than carried; pre-existing.
- Export writes formulas without saved values (LibreOffice's default is not to recalculate Excel files on load); pre-existing, outside this slice.
- Typed-in
NaN/Infstill become floats in the grid (pre-existingliteralNode); import is protected byTextInput. - Native Mac app does not yet show the report (API field present).