ONC-72: Fix repeated 412 on push with weak ETags behind a compressing proxy #73

Open
planet-express wants to merge 6 commits from onc-72-weak-etag-push into main
Collaborator

What changed

  • Strip the weak W/ prefix only when sending an existing ETag in WebDAV If-Match for text and binary PUT. Keep GET results and persisted ETags unchanged, including existing sync state. The existing 412 conflict path remains in place.
  • Add regression tests for weak and strong ETags, stale preconditions, text and binary writes, executor sync, and state round trips.
  • Document the proxy finding and add an ONC-72 manual acceptance case with English and German guides.

Work: PLA-11 (implementation) and PLA-16 (supplementary tests).

Tests

  • npm run build: passed.
  • npm run lint: passed.
  • npm test: passed, 66 files and 2,205 tests.
  • npm run test:int: unverified. The local Docker test server could not start because Docker is unavailable in the test workspace; the integration test setup then stopped before running tests. No production server was used.
  • Desktop, mobile and affected-vault checks have not yet been performed. There is no compressing-proxy integration test; automated tests cover weak ETags, while the affected-vault check remains the real-world confirmation.

Manual acceptance

  • Preview: Obsidian · Nextcloud. The PR preview comment is authoritative for readiness and build links.
  • Guides: English · Deutsch.
  • The guides cover the preview's seeded vault and collective, a real concurrent conflict, mobile sync, and an affected vault with a stored weak ETag. Use the throwaway accounts in scripts/dev-nextcloud/.env.example.

Open points

  • Run the local-Docker integration suite and the desktop/mobile preview checks before merge.
  • Check the original affected vault behind the compressing proxy if available; otherwise keep that verification explicitly open.

Closes #72

## What changed - Strip the weak `W/` prefix only when sending an existing ETag in WebDAV `If-Match` for text and binary PUT. Keep GET results and persisted ETags unchanged, including existing sync state. The existing 412 conflict path remains in place. - Add regression tests for weak and strong ETags, stale preconditions, text and binary writes, executor sync, and state round trips. - Document the proxy finding and add an ONC-72 manual acceptance case with English and German guides. Work: PLA-11 (implementation) and PLA-16 (supplementary tests). ## Tests - `npm run build`: passed. - `npm run lint`: passed. - `npm test`: passed, 66 files and 2,205 tests. - `npm run test:int`: unverified. The local Docker test server could not start because Docker is unavailable in the test workspace; the integration test setup then stopped before running tests. No production server was used. - Desktop, mobile and affected-vault checks have not yet been performed. There is no compressing-proxy integration test; automated tests cover weak ETags, while the affected-vault check remains the real-world confirmation. ## Manual acceptance - Preview: [Obsidian](https://192.168.6.138:10073) · [Nextcloud](http://192.168.6.138:11073). The PR preview comment is authoritative for readiness and build links. - Guides: [English](tests/acceptance/onc-72/guide.en.md) · [Deutsch](tests/acceptance/onc-72/guide.de.md). - The guides cover the preview's seeded vault and collective, a real concurrent conflict, mobile sync, and an affected vault with a stored weak ETag. Use the throwaway accounts in `scripts/dev-nextcloud/.env.example`. ## Open points - Run the local-Docker integration suite and the desktop/mobile preview checks before merge. - Check the original affected vault behind the compressing proxy if available; otherwise keep that verification explicitly open. Closes #72
ONC-72: Test that the state stores weak ETags unchanged and needs no migration
All checks were successful
Preview / Remove (pull_request) Has been skipped
Preview / Remove orphaned previews (pull_request) Has been skipped
Integration (Nextcloud versions) / Nextcloud latest (pull_request) Successful in 3s
CI / build-and-test (pull_request) Successful in 1m40s
CI / mirror-github (pull_request) Has been skipped
Preview / Deploy (pull_request) Successful in 2m56s
Integration (Nextcloud versions) / Nextcloud 35 (pull_request) Successful in 11m22s
3ff14b79f5

PR preview: ready

  • Obsidian in the browser: https://192.168.6.138:10073 (self-signed certificate: accept the warning once; no login). The vault there already has the plugin enabled and connected.
  • Nextcloud: http://192.168.6.138:11073, user alice, password local-alice-pw (admin: admin, password local-admin-pw). Throwaway test credentials from scripts/dev-nextcloud/.env.example.
  • Plugin files for a phone, to copy into <vault>/.obsidian/plugins/nextcloud-collectives/: main.js · manifest.json · styles.css

Test cases

Commit 3ff14b79f5c2f6fbc86bc8710b3561c673889752 · Workflow run

<!-- onc-preview --> ### PR preview: ready - Obsidian in the browser: https://192.168.6.138:10073 (self-signed certificate: accept the warning once; no login). The vault there already has the plugin enabled and connected. - Nextcloud: http://192.168.6.138:11073, user `alice`, password `local-alice-pw` (admin: `admin`, password `local-admin-pw`). Throwaway test credentials from `scripts/dev-nextcloud/.env.example`. - Plugin files for a phone, to copy into `<vault>/.obsidian/plugins/nextcloud-collectives/`: [main.js](http://192.168.6.138:12073/main.js) · [manifest.json](http://192.168.6.138:12073/manifest.json) · [styles.css](http://192.168.6.138:12073/styles.css) **Test cases** - onc-72: [EN](https://forgejo.home.msc.wtf/keineantwort.de/nextcloud-collectives/src/commit/3ff14b79f5c2f6fbc86bc8710b3561c673889752/tests/acceptance/onc-72/guide.en.md) · [DE](https://forgejo.home.msc.wtf/keineantwort.de/nextcloud-collectives/src/commit/3ff14b79f5c2f6fbc86bc8710b3561c673889752/tests/acceptance/onc-72/guide.de.md) Commit `3ff14b79f5c2f6fbc86bc8710b3561c673889752` · [Workflow run](https://forgejo.home.msc.wtf/keineantwort.de/nextcloud-collectives/actions/runs/222)
All checks were successful
Preview / Remove (pull_request) Has been skipped
Preview / Remove orphaned previews (pull_request) Has been skipped
Integration (Nextcloud versions) / Nextcloud latest (pull_request) Successful in 3s
CI / build-and-test (pull_request) Successful in 1m40s
Required
Details
CI / mirror-github (pull_request) Has been skipped
Preview / Deploy (pull_request) Successful in 2m56s
Integration (Nextcloud versions) / Nextcloud 35 (pull_request) Successful in 11m22s
Required
Details
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'onc-72-weak-etag-push:onc-72-weak-etag-push'
git switch 'onc-72-weak-etag-push'
Sign in to join this conversation.
No reviewers
No labels
factory:go
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
keineantwort.de/nextcloud-collectives!73
No description provided.