chore(agents): run content-audit-agent daily task — audit upload docs

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-12 23:50:45 +00:00
1 parent 5324294b7a
commit eeaf89330e
8 files changed
+65 -33

No files matched your search

@@ -0,0 +1,13 @@
# Documentation Inventory
| Page | Claim | Code Location | Verified? |
|------|-------|---------------|-----------|
| `content/docs/guides/upload-content.md` | Accepted Video Types: `.mp4`, `.webm`, `.mov`, `.mkv`, `.ts`, `.m3u8`, `.mpg`, `.mpeg` | `components/upload-modal.html` (input accept attribute) | Yes |
| `content/docs/guides/upload-content.md` | Accepted Thumbnail Types: `image/*` | `components/upload-modal.html` (input accept attribute) | Yes |
| `content/docs/guides/upload-content.md` | File Size Recommended: Up to 2GB (Client-side hashing limit) | `js/utils/torrentHash.js` (in-memory buffer usage impl) | Yes |
| `content/docs/guides/upload-content.md` | Required Metadata: Title | `js/services/videoNotePayload.js` (`VIDEO_NOTE_ERROR_CODES.MISSING_TITLE`) | Yes |
| `content/docs/guides/upload-content.md` | Required Source: URL, Magnet, or IMETA | `js/services/videoNotePayload.js` (`VIDEO_NOTE_ERROR_CODES.MISSING_SOURCE`) | Yes |
| `content/docs/guides/upload-content.md` | HTTPS required for External URLs | `js/services/videoNotePayload.js` (`VIDEO_NOTE_ERROR_CODES.INVALID_URL_PROTOCOL`) | Yes |
| `content/docs/guides/upload-content.md` | CORS Policy JSON | `js/storage/s3-multipart.js` (`ensureBucketCors`) | Yes |
| `content/docs/guides/upload-content.md` | Automatic CORS Configuration | `js/services/s3Service.js` (`prepareS3Connection` calls `ensureBucketCors`) | Yes |
| `content/docs/guides/upload-content.md` | Upload Methods: R2, S3, External, Magnet | `js/ui/components/UploadModal.js`, `js/services/s3UploadService.js` | Yes |
@@ -0,0 +1,39 @@
# Verification Report
## 1. Accepted File Types
- **Claim**: `.mp4`, `.webm`, `.mov`, `.mkv`, `.ts`, `.m3u8`, `.mpg`, `.mpeg`.
- **Code**: `components/upload-modal.html`
```html
<input id="input-file" type="file" class="hidden" accept="video/*,.m3u8,.ts,.mp4,.webm,.mov,.mkv,.mpg,.mpeg" />
```
- **Status**: **Verified**.
## 2. File Size Limits
- **Claim**: 2GB recommended due to browser memory hashing.
- **Code**: `js/services/s3UploadService.js` calls `this.deps.calculateTorrentInfoHash(file)`. `js/utils/torrentHash.js` reads file into memory/buffer for hashing.
- **Status**: **Verified**.
## 3. Metadata Validation
- **Claim**: Title required. HTTPS for URLs.
- **Code**: `js/services/videoNotePayload.js`:
```javascript
if (!legacyFormData.title) errors.push(VIDEO_NOTE_ERROR_CODES.MISSING_TITLE);
if (legacyFormData.url && !/^https:\/\//i.test(legacyFormData.url)) errors.push(VIDEO_NOTE_ERROR_CODES.INVALID_URL_PROTOCOL);
```
- **Status**: **Verified**.
## 4. CORS Policy
- **Claim**: JSON policy provided in docs.
- **Code**: `js/storage/s3-multipart.js` `ensureBucketCors` constructs the policy dynamically but matches the structure (AllowedOrigins, AllowedMethods, AllowedHeaders=["*"], ExposeHeaders=[ETag, ...]).
- **Status**: **Verified**.
## 5. Upload Lifecycle
- **Claim**: "The client handles the upload, generates a magnet link...".
- **Code**: `js/ui/components/UploadModal.js` `handleVideoSelection` uploads video, then calls `generateTorrentMetadata`, then uploads `.torrent` file if successful.
- **Gap**: Docs do not explicitly mention that a `.torrent` file is also uploaded to the bucket.
- **Recommendation**: Update docs to mention `.torrent` file generation and upload.
## 6. S3/R2 Configuration
- **Claim**: Supports S3 and R2.
- **Code**: `js/services/s3Service.js` and `js/services/storageService.js` handle these providers.
- **Status**: **Verified**.