Skip to content

fix(platform): restrict SharePoint imports to one-time copies - #4199

Merged
yannickmonney merged 4 commits into
mainfrom
fix/sharepoint-sync-capability
Oct 4, 2026
Merged

yannickmonney merged 4 commits into
mainfrom
fix/sharepoint-sync-capability

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What changed

  • SharePoint settings expose only One-time import. Derive the effective import mode from the active Microsoft source so a previously selected OneDrive Sync cannot leak into SharePoint submission, progress or completion messages.
  • Refuse native sync batches containing SharePoint items before provider reads, sync registration or document writes, including mixed batches. Do not implement SharePoint sync.
  • Keep shared Google Drive/OneDrive sync available by default. Extend native and jsdom controls and record coverage in the manual automation register.

Verification

Verified the defect on current main 0592b64a9a02e44a442ef66bef0ca2781c011dc6 first: two native regressions returned successful copies and the dialog regression found the unsupported Sync choice.

Passing light checks:

  • Native import_files, derive_sync_targets, reconcile_folder_sync, and service.import-deps: 55 tests.
  • OneDrive and Google Drive dialogs, cloud listing failures and lapsed-session controls: 61 jsdom tests. Actual native import results drive the new SharePoint success/refusal and OneDrive sync dialog controls.
  • Cloud import outcome/lifecycle controls: 65 jsdom tests on a full isolated rerun. Initial combined run had one transient folder-query failure; retained logs and baseline isolated control (3 passed) are available in the task delivery box.
  • Scoped TypeScript check including changed roots, shared settings consumer and native route/service importers with real transitive imports (2 GiB heap); file-scoped type-aware oxlint; oxfmt; manual-register lint; commit/conflict gates.

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

@yannickmonney yannickmonney left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:120 derives 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:151 removes the unsupported choice for SharePoint. Its default supportsSync = true preserves the OneDrive/Google Drive shared consumer. Existing labelled controls remain intact; this is not an implementation of SharePoint sync.
  • import_files.ts:275 refuses 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:110 explicitly 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 0592b64a9a02e44a442ef66bef0ca2781c011dc6 reproduced 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^ HEAD passes; reviewed checkout remains clean.
  • Exact-head CI readback and gh pr checks --watch are 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/.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Updated head: . Conflicted file: . Interdiff contains only the manual register merge (all rows retained below the table delimiter).

@yannickmonney

Copy link
Copy Markdown
Contributor Author

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).

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Register-only rebase completed; merged current main and retained all automation-register rows. Exact new head: e4e17cc5328e5fba380812bc6b28933e265cb399. Scope unchanged except the merge; please recheck this head with fresh CI.

@yannickmonney

Copy link
Copy Markdown
Contributor Author

Register round (TALE-673): merged main and moved the register row beside its suite

From agent #2 (3f9fdcee), run 0879a521, dispatched by the manager (run 43f87a00, TALE-357 424ed2e3).

  • Heads:
    • old: e4e17cc5328e5fba380812bc6b28933e265cb399
    • new: 41ac81f92957ebdc162c23d2b9a437ae938cb18b, pushed at 14:48:04Z as a fast-forward. I didn't force-push or rewrite history.
  • What changed:
    • One merge commit brings in main 3af9e704d. Its parents are the old head and main.
    • The only conflict was this PR's single row in services/platform/tests/manual/reference/automation.md.
    • The resolution keeps main's file and adds the PR's row, unchanged, right after main line 245. That line is the knowledge row for the KNOW-F31 half (OneDrive and Google Drive import).
    • The row is now at line 246, no longer directly under the table delimiter. No other file was edited.
  • Proof:
    • Against main, each file's +/- equals the PR's own change (ALL_EQUAL, 6 files).
    • Since 76b2a2351, the change is register-only: the same file set, an equal patch-id outside the register, and identical row text.
    • bun run lint:manual and bun run lint:conflicts pass at the new head.
    • It merges cleanly with the other new heads of this round. It also merges cleanly with each of the 37 other open register PRs that merge cleanly with main.
    • All six new heads together on main merge cleanly (composition 345c5fbe1), and lint:manual passes there.
  • Verdict state: independent ACCEPT at 76b2a2351 (03:23Z). The old head e4e17cc53 was an earlier register-only merge, and the interdiff from the accepted head is register-only.
  • CI at the new head: 5 runs queued (Checks, Build, E2E, SAST, Commitlint). I didn't rerun or cancel anything.
  • Merge: this is an integration head, not a new implementation. Because I pushed it, root's 524935a8 rule makes me ineligible to merge it, so the manager routes the merge to a distinct merger. Exact-head CI must be green first. I merged nothing.

@yannickmonney
yannickmonney merged commit 78041d5 into main Oct 4, 2026
@yannickmonney
yannickmonney deleted the fix/sharepoint-sync-capability branch October 4, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: SharePoint reports Sync completed without registering a sync

1 participant