Add upload pipeline session summary
This commit is contained in:
parent
f9ec9edd49
commit
2587b7347c
@ -0,0 +1,62 @@
|
||||
# Session Summary: Upload Pipeline & Filesystem Consolidation
|
||||
|
||||
Date: 2026-03-01
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
This session consolidated the file system architecture and resolved issues in the upload pipeline from browser to agent.
|
||||
|
||||
---
|
||||
|
||||
## Filesystem Architecture
|
||||
|
||||
Game server filesystem operations are handled exclusively by the agent. The API proxies all requests — it never touches the filesystem directly.
|
||||
|
||||
Capabilities documented:
|
||||
|
||||
- Read (list, stat, read, download)
|
||||
- Write (server.properties, config/*.toml, config/*.json, config/*.properties)
|
||||
- Delete (constrained to mods-removed/, mods-uploaded/, logs/)
|
||||
- Upload (mods/*.jar, world/datapacks/*.zip)
|
||||
- Revert (shadow backup restore)
|
||||
|
||||
Shadow backups created on first write. 7-day retention, 6h cleanup cycle.
|
||||
|
||||
---
|
||||
|
||||
## Provenance Tracking
|
||||
|
||||
`.zlh_metadata.json` written after every upload:
|
||||
|
||||
```json
|
||||
{
|
||||
"mods/sodium.jar": {
|
||||
"source": "user",
|
||||
"uploaded_at": "2026-03-01T22:37:01Z"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
`stat` responses include `source: "user" | null`. No curated inference implemented.
|
||||
|
||||
---
|
||||
|
||||
## Upload Transport Fix (API Layer)
|
||||
|
||||
Uploads initially failed with `502` errors when proxied from the API to the agent.
|
||||
|
||||
Root cause:
|
||||
The Node API upload proxy was forwarding `Content-Length` incorrectly while streaming the request body.
|
||||
|
||||
Resolution:
|
||||
The upload route now uses a raw Node `http.request` stream:
|
||||
|
||||
- `req.pipe(proxyReq)`
|
||||
- `proxyRes.pipe(res)`
|
||||
- `Content-Type` preserved
|
||||
- `Content-Length` not forwarded
|
||||
- Upload timeout extended to 5 minutes
|
||||
|
||||
This allows large multipart uploads to stream directly from the client → API → agent without buffering.
|
||||
Loading…
Reference in New Issue
Block a user