storage: a WebDAV driver as a package of its own #67

Closed
opened 2026-10-05 21:07:16 +00:00 by orion · 9 comments
Collaborator

Context

The second remote driver of std/storage: webdav:// and webdavs:// references. It is a package of its own, in its own repository torb/webdav, not a directory of this repository (FIRST-PARTY.md sections 2 to 5, decided for torb/s3 in #20).

Source

Requirements

  • R1. The package torb/webdav shall provide WebDavStorage, a shared type with Storage whose schemes() answers webdav (http) and webdavs (https).
  • R2. When read is called, the driver shall send GET and answer the body as Bytes; a 404 shall answer StorageFailure.NotFound.
  • R3. When exists is called, the driver shall send HEAD; a 404 shall answer false, not a failure.
  • R4. When list is called, the driver shall send PROPFIND with Depth: 1, read the 207 Multi-Status reply with Xml().decode, and answer the sorted Uris of the entries directly below the collection, the collection itself left out.
  • R5. When write is called, the driver shall send PUT of the whole Bytes; where a parent collection is missing (409) it shall create the collections with MKCOL and retry once.
  • R6. When delete is called, the driver shall send DELETE, which removes a collection with everything below it; a 404 shall answer StorageFailure.NotFound.
  • R7. If the server answers anything else or the transport fails, the driver shall answer StorageFailure.Refused with status and reason; no failure text and no Show output shall contain credentials (HTTP Basic user and password live in the settings, never in the URI).

Done when

  • torb/webdav has a test file that starts a local WebDAV server inside the test (a std/http Server on port 0 over an in-memory tree, answering GET, HEAD, PUT, MKCOL, DELETE and PROPFIND with a 207 body) and covers every member: read, missing read, exists true and false, list of a collection with a file and a sub-collection, write incl. MKCOL of missing parents, delete, a refused status, and a failure text without the password.
  • CI of the torb/webdav PR is green; torb format --check is clean on the touched files.
  • The README names the limits (whole-body PUT, no locking, no ETag handling).

Design point and seed impact

  • Design: URI.md section 11 and slice 12, FIRST-PARTY.md. A package in TorbScript over std/http and std/xml.
  • Seed impact: no (no syntax, native, driver flag or std name the compiler looks up by string).
  • Size: one PR of torb/webdav as one or two Conventional Commits (about 300 lines of source plus the test server).

Dependencies

  • Not #78 any more: Xml().decode and parse (merged) read the PROPFIND reply, and the request body is a fixed string. Neither step 3c (#805) nor step 4 (mapping DSL) is needed.
  • Waits for the repository torb/webdav (owner: repository creation and trusted publishing are outside the loop's contract).

Moved from the planning lists of the docs; the design record stays the specification.

## Context The second remote driver of `std/storage`: `webdav://` and `webdavs://` references. It is a package of its own, in its own repository `torb/webdav`, not a directory of this repository (FIRST-PARTY.md sections 2 to 5, decided for `torb/s3` in #20). ## Source - [ROADMAP.md, milestone 10 file systems](https://git.torb.dev/torbscript/language/src/commit/393ef2608e4a60b8ff76d8b6b408951b822d887d/docs/ROADMAP.md#L159) - [URI.md slice 12](https://git.torb.dev/torbscript/language/src/commit/393ef2608e4a60b8ff76d8b6b408951b822d887d/docs/design/URI.md#L2003) and section 11 (the package cut) ## Requirements - R1. The package `torb/webdav` shall provide `WebDavStorage`, a `shared type` with `Storage` whose `schemes()` answers `webdav` (http) and `webdavs` (https). - R2. When `read` is called, the driver shall send `GET` and answer the body as `Bytes`; a 404 shall answer `StorageFailure.NotFound`. - R3. When `exists` is called, the driver shall send `HEAD`; a 404 shall answer `false`, not a failure. - R4. When `list` is called, the driver shall send `PROPFIND` with `Depth: 1`, read the `207 Multi-Status` reply with `Xml().decode`, and answer the sorted `Uri`s of the entries directly below the collection, the collection itself left out. - R5. When `write` is called, the driver shall send `PUT` of the whole `Bytes`; where a parent collection is missing (409) it shall create the collections with `MKCOL` and retry once. - R6. When `delete` is called, the driver shall send `DELETE`, which removes a collection with everything below it; a 404 shall answer `StorageFailure.NotFound`. - R7. If the server answers anything else or the transport fails, the driver shall answer `StorageFailure.Refused` with status and reason; no failure text and no `Show` output shall contain credentials (HTTP Basic user and password live in the settings, never in the URI). ## Done when - [ ] `torb/webdav` has a test file that starts a local WebDAV server inside the test (a `std/http` `Server` on port 0 over an in-memory tree, answering GET, HEAD, PUT, MKCOL, DELETE and PROPFIND with a 207 body) and covers every member: read, missing read, exists true and false, list of a collection with a file and a sub-collection, write incl. MKCOL of missing parents, delete, a refused status, and a failure text without the password. - [ ] CI of the `torb/webdav` PR is green; `torb format --check` is clean on the touched files. - [ ] The README names the limits (whole-body PUT, no locking, no ETag handling). ## Design point and seed impact - Design: URI.md section 11 and slice 12, FIRST-PARTY.md. A package in TorbScript over `std/http` and `std/xml`. - Seed impact: no (no syntax, native, driver flag or std name the compiler looks up by string). - Size: one PR of `torb/webdav` as one or two Conventional Commits (about 300 lines of source plus the test server). ## Dependencies - Not #78 any more: `Xml().decode` and `parse` (merged) read the PROPFIND reply, and the request body is a fixed string. Neither step 3c (#805) nor step 4 (mapping DSL) is needed. - Waits for the repository `torb/webdav` (owner: repository creation and trusted publishing are outside the loop's contract). _Moved from the planning lists of the docs; the design record stays the specification._
Author
Collaborator

[loop:torbscript] intake: in scope (author orion, label loop), sources ROADMAP.md milestone 10 and URI.md slice 12, not a duplicate, no collision with a design record. A package in TorbScript over std/http and std/xml, no seed impact expected; depends on #78. next: waiting (dependency #78) until 2026-10-10T04:00:00Z

[loop:torbscript] intake: in scope (author orion, label loop), sources ROADMAP.md milestone 10 and URI.md slice 12, not a duplicate, no collision with a design record. A package in TorbScript over `std/http` and `std/xml`, no seed impact expected; depends on #78. next: waiting (dependency #78) until 2026-10-10T04:00:00Z
Author
Collaborator

[loop:torbscript] wait until 2026-11-06T04:00Z: dependency #78 (std/xml) is still open and nothing in this package can be built before it lands.
next: waiting (dependency #78)

[loop:torbscript] wait until 2026-11-06T04:00Z: dependency #78 (std/xml) is still open and nothing in this package can be built before it lands. next: waiting (dependency #78)
Author
Collaborator

[loop:torbscript] claim refine by session:loop-torbscript-20261115 until 2026-11-15T02:40:00Z

[loop:torbscript] claim refine by session:loop-torbscript-20261115 until 2026-11-15T02:40:00Z
Author
Collaborator

[loop:torbscript] refine: body rewritten to the writing standard and the dependency on #78 dropped, but not ready, next: waiting (owner decision: repository torb/webdav) until 2026-11-22T08:00:00Z

decided by the loop:

  • std/xml is enough as merged. The PROPFIND reply is read with Xml().decode/parse (steps 3a, 3b, 3b-fix are on main) and the request body is a fixed string. Step 3c (#805, Xml as Format<XmlError>, streaming entry points) and step 4 (mapping DSL) are not needed, so no depends_on #805. The "Depends on #78" line is gone.
  • Size: fits one PR (about 300 lines plus a local test server built from std/http Server on port 0, which exists), one or two Conventional Commits. No slicing. Seed impact: no.
  • Design choices recorded in the body: schemes webdav/webdavs, Depth: 1 PROPFIND for list, MKCOL of missing parents on write, HTTP Basic held in settings, never in the URI.

Why still not ready: URI.md section 11 and FIRST-PARTY.md sections 2 to 5 put the driver in its own repository torb/webdav (the same rule that put torb/s3 in #20). GET /repos/torb/webdav answers 404; the org torb has only app-template, package-template, postgres, redis, sql. Creating the repo and its trusted publishing are outside this loop's contract, and torbscript/language PRs cannot carry the package.

owner decision: create torb/webdav (and torb/s3 for #20) from torb/package-template and give orion write access? Plain words: the two drivers each need their own home on the code server before anyone can write them. Options: (a) create both repos, recommended, it is how torb/sql, torb/postgres and torb/redis were done; (b) build them as folders in the language repo, which breaks the rule in FIRST-PARTY.md; (c) later. No blocking question block could be filed from this session (the tasks tool only reads this forge), so this comment is the record; the owner ping goes through the TorbScript group.

Worker usage: about 40k tokens (sonnet).

[loop:torbscript] refine: body rewritten to the writing standard and the dependency on #78 dropped, but not ready, next: waiting (owner decision: repository torb/webdav) until 2026-11-22T08:00:00Z **decided by the loop:** - `std/xml` is enough as merged. The PROPFIND reply is read with `Xml().decode`/`parse` (steps 3a, 3b, 3b-fix are on `main`) and the request body is a fixed string. Step 3c (#805, `Xml` as `Format<XmlError>`, streaming entry points) and step 4 (mapping DSL) are not needed, so no `depends_on #805`. The "Depends on #78" line is gone. - Size: fits one PR (about 300 lines plus a local test server built from `std/http` `Server` on port 0, which exists), one or two Conventional Commits. No slicing. Seed impact: no. - Design choices recorded in the body: schemes `webdav`/`webdavs`, `Depth: 1` PROPFIND for `list`, MKCOL of missing parents on write, HTTP Basic held in settings, never in the URI. **Why still not `ready`:** URI.md section 11 and FIRST-PARTY.md sections 2 to 5 put the driver in its own repository `torb/webdav` (the same rule that put `torb/s3` in #20). `GET /repos/torb/webdav` answers 404; the org `torb` has only `app-template`, `package-template`, `postgres`, `redis`, `sql`. Creating the repo and its trusted publishing are outside this loop's contract, and `torbscript/language` PRs cannot carry the package. **owner decision:** create `torb/webdav` (and `torb/s3` for #20) from `torb/package-template` and give `orion` write access? Plain words: the two drivers each need their own home on the code server before anyone can write them. Options: (a) create both repos, recommended, it is how `torb/sql`, `torb/postgres` and `torb/redis` were done; (b) build them as folders in the language repo, which breaks the rule in FIRST-PARTY.md; (c) later. No blocking question block could be filed from this session (the tasks tool only reads this forge), so this comment is the record; the owner ping goes through the TorbScript group. Worker usage: about 40k tokens (sonnet).
Author
Collaborator

[loop:torbscript] owner decision: the packages torb/webdav (this issue) and torb/s3 (#20) each need a repository of their own in the organisation torb (made from torb/package-template, write access for orion), as FIRST-PARTY.md sections 2 to 5 decide. Creating repositories in the org is reserved for the owner by the loop contract. Recommendation: yes, create both.

v: 1
id: q1
asked_by: orion
to: torben
kind: decision
type: decision
blocking: true
reason: owner_scope
sla: this-week
on_expiry: park
recommendation: yes
headline: "Repos torb/webdav und torb/s3 anlegen?"
question: "Für WebDAV (#67) und S3 (#20) braucht es je ein eigenes Repo in der Org torb, aus der Vorlage torb/package-template, mit Schreibzugriff für orion. Ohne die Repos kann kein Worker starten."
checked: "Read #67 and #20 and FIRST-PARTY.md sections 2 to 5; the loop may not create repos in the org; the #78 dependency is already dropped."
options:
  - id: yes
    label: "Ja, beide Repos anlegen und orion Schreibzugriff geben"
  - id: no
    label: "Nein, vorerst nicht"
[loop:torbscript] owner decision: the packages `torb/webdav` (this issue) and `torb/s3` (#20) each need a repository of their own in the organisation `torb` (made from `torb/package-template`, write access for orion), as FIRST-PARTY.md sections 2 to 5 decide. Creating repositories in the org is reserved for the owner by the loop contract. Recommendation: yes, create both. ```hos-question v: 1 id: q1 asked_by: orion to: torben kind: decision type: decision blocking: true reason: owner_scope sla: this-week on_expiry: park recommendation: yes headline: "Repos torb/webdav und torb/s3 anlegen?" question: "Für WebDAV (#67) und S3 (#20) braucht es je ein eigenes Repo in der Org torb, aus der Vorlage torb/package-template, mit Schreibzugriff für orion. Ohne die Repos kann kein Worker starten." checked: "Read #67 and #20 and FIRST-PARTY.md sections 2 to 5; the loop may not create repos in the org; the #78 dependency is already dropped." options: - id: yes label: "Ja, beide Repos anlegen und orion Schreibzugriff geben" - id: no label: "Nein, vorerst nicht" ```
Owner

[owner-answer] q=q1 option=yes „Ja, beide Repos anlegen und orion Schreibzugriff geben“ 2026-11-15T11:11:49Z

[owner-answer] q=q1 option=yes „Ja, beide Repos anlegen und orion Schreibzugriff geben“ 2026-11-15T11:11:49Z
Author
Collaborator

[loop:torbscript] refine: owner decision recorded (q1: create both repos, write access for orion). torb/webdav and torb/s3 now exist, made from torb/package-template, with write access for orion and argus. Blocker gone; the body already meets the writing standard, so this issue is ready. The work lands as PRs in torb/webdav. next: implement (worker).

[loop:torbscript] refine: owner decision recorded (q1: create both repos, write access for orion). `torb/webdav` and `torb/s3` now exist, made from `torb/package-template`, with write access for orion and argus. Blocker gone; the body already meets the writing standard, so this issue is ready. The work lands as PRs in `torb/webdav`. next: implement (worker).
Author
Collaborator

[loop:torbscript] claim implement by session:loop-torbscript-67-impl until 2026-11-15T19:29Z

[loop:torbscript] claim implement by session:loop-torbscript-67-impl until 2026-11-15T19:29Z
Author
Collaborator

[loop:torbscript] release implement by session:loop-torbscript-67-impl: PR torb/webdav#1 open, head 56675f62de5a236daad480261eddbfa6efe081e0, CI pending (ci and pdisc queued, not finished after ~5 min). next: review (merge gate)

[loop:torbscript] release implement by session:loop-torbscript-67-impl: PR https://git.torb.dev/torb/webdav/pulls/1 open, head 56675f62de5a236daad480261eddbfa6efe081e0, CI pending (ci and pdisc queued, not finished after ~5 min). next: review (merge gate)
argus closed this issue 2026-11-15 14:45:50 +00:00
Sign in to join this conversation.
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
torbscript/language#67
No description provided.