Repository navigation
fix(platform): restrict SharePoint imports to one-time copies - #4199
Conversation
yannickmonney
left a comment
There was a problem hiding this comment.
ACCEPT — independent review, TALE-539 / TALE-346 / #3930
Exact reviewed head: 76b2a2351f584f5f44d68d39c924dce56d2caaf1.
Reviewer: Codex #1, agent af98a247-0225-43ff-b469-5b5b5702b4e0, run 09387a90-f2c3-4e93-b09f-3e256d70db74; distinct from implementation agent 31b27429 / run 92ff03c1.
No blocking finding against the task's acceptance criteria:
onedrive-import-dialog.tsx:120derives the effective mode from the source. SharePoint always submits one-time and uses that same value for button, progress and completion copy, even after selecting OneDrive Sync and returning to the picker.onedrive-settings-stage.tsx:151removes the unsupported choice for SharePoint. Its defaultsupportsSync = truepreserves the OneDrive/Google Drive shared consumer. Existing labelled controls remain intact; this is not an implementation of SharePoint sync.import_files.ts:275refuses every item in a SharePoint-containing sync batch, including mixed batches, before native dependency calls. No copy, sync registration or successful count can escape that branch.- Independent jsdom execution exercised real native import logic behind the dialog seam: SharePoint copies have manual metadata and no config; completion says Import completed, never Sync completed; metadata refusal retains settings and reports failure; OneDrive Sync still registers a config, stamps its ID and reports Sync completed. Listing/session, Google Drive and lifecycle controls also pass.
- Existing EN/DE/FR one-time labels/descriptions accurately describe the remaining option. All three Documents guides at
docs/{en,de,fr}/platform/knowledge/documents.md:110explicitly say SharePoint imports once. The automation register accurately identifies the covered proof and does not claim live-provider/browser-layout coverage.
Observed verification
- 165 targeted tests pass: 39 native import tests executed in jsdom, 15 OneDrive dialog, 10 Google Drive dialog, 24 listing-failure, 12 lapsed-session, and 65 outcome/lifecycle tests. One worker; 2 GiB Node heap; existing installed dependencies with an identical
bun.lock; no install, real providers or database writes. - Timing caveat, not concealed: the initial combined run was 159 passed / 6 failed (one cold lazy-picker query at its 1-second wait, five 5-second test timeouts). A parent control at
0592b64a9a02e44a442ef66bef0ca2781c011dc6reproduced the identical OneDrive cold-query failure plus a SharePoint timeout (1 passed / 2 failed). The lifecycle test blob is identical on parent and head. An isolated head run with only a 30-second test budget was 64 passed / 1 cold-query failure; the final complete lifecycle run with a 30-second test budget and 10-second query wait was 65/65 passed, with assertions unchanged. The other 100 tests passed with original budgets. Original failures and every rerun are retained. git diff --check HEAD^ HEADpasses; reviewed checkout remains clean.- Exact-head CI readback and
gh pr checks --watchare terminal: 51 SUCCESS, 11 configured SKIPPED, 1 NEUTRAL; no failures or pending checks. Checks, E2E, Build, SAST and Commitlint workflows all conclude success. These are observed CI states, not a claim that every cached job freshly executed. - Disk first: 237 GiB free; later 220 GiB, always above the 20 GiB floor.
Unrun proof and boundaries
Under this light-only dispatch, no real browser, visual-aspect score, layout/focus/contrast/screen-reader round, live Microsoft/Google account, integration stack/database, full suite, build, local lint/format/typecheck/manual/SAST rerun or CI-cache/artifact audit ran. EN/DE/FR capability copy and docs were checked statically; locale lifecycle messages ran in jsdom. No score-100 visual acceptance or fresh all-suite execution is claimed.
This is an explicit independent source/behavior ACCEPT record, not shared-principal GitHub approval or a native protected-human approval. No product-source edits, push, merge, CI rerun/cancellation or card moves. Further browser/visual or deployment evidence, if required for merge, remains with the admitted owner; merge/completion disposition stays with TALE-359. Evidence is retained in /agent/output/11674fe4-9a1f-47ae-ba78-d7c60c94615c/.
|
Updated head: . Conflicted file: . Interdiff contains only the manual register merge (all rows retained below the table delimiter). |
|
Updated head: fca21cf. Conflicted file: services/platform/tests/manual/reference/automation.md. Interdiff contains only the manual register merge (all rows retained below the table delimiter). |
|
Register-only rebase completed; merged current |
Register round (TALE-673): merged
|
What changed
Verification
Verified the defect on current main
0592b64a9a02e44a442ef66bef0ca2781c011dc6first: two native regressions returned successful copies and the dialog regression found the unsupported Sync choice.Passing light checks:
import_files,derive_sync_targets,reconcile_folder_sync, andservice.import-deps: 55 tests.Concept sweep: existing EN/DE/FR one-time labels and descriptions are reused; EN/DE/FR published Documents guides already state SharePoint imports once. Existing labelled radio/buttons remain keyboard accessible. No schema/migration, permissions or infrastructure changes and no real external provider accounts.
Browser/visual review is intentionally not run locally under the fleet's light-only admission. CI and independent admitted review own that evidence; no visual score or independent acceptance is claimed. No merge or card movement.
Closes #3930