mirror of
https://github.com/tanweai/pua.git
synced 2026-08-29 02:02:20 +08:00
534b91c65f
Summary: - Treat /contribute.html and /contribute as first-class SPA routes so GitHub OAuth callback and documented upload links land on the uploader. - Switch the browser uploader from multipart/base64 to raw JSONL POSTs with metadata headers, while keeping JSON file_data and multipart compatibility on the API. - Add static upload-flow gates and Vitest coverage for authenticated upload sanitization, R2 writes, and D1 metadata recording. - Bump plugin and marketplace versions to 3.4.4. Rationale: - The upload path had two breakpoints: documented /contribute.html links rendered the homepage because routing only checked hash, and multipart browser uploads could be stripped by proxy/custom-domain behavior. - Raw JSONL avoids multipart body loss and avoids base64 size/memory bloat for large session files. Tests: - bash evals/test-upload-flow.sh - bash evals/test-release-consistency.sh - npm --prefix landing test -- --run src/test/upload-function.test.ts - static eval suite: governance, feedback auth, heartbeat, integrity guard, issue regressions, Microsoft flavor, platform compat, loop hook, Windows Python hooks, YAML frontmatter - npm --prefix landing run build - ./landing/node_modules/.bin/tsc -p pi/pua/tsconfig.json - git diff --check Co-authored-by: Codex <codex@openai.com>