Fix HTTPS capture uploads and document token setup - #145
Conversation
Compile the Rust capture HTTP client with minreq HTTPS support so token validation and event uploads can reach the AWS CaptureWebService endpoint. Add the student-facing capture token setup guide and link it from the main README and VS Code extension README. Document the SecretStorage token flow, local spool behavior, AWS ingestion path, and verified capture event coverage in the implementation notes and changelog.
Update Rust dependency locks to remove vulnerable webbrowser and rkyv paths reported by cargo-audit. Document and apply a scoped temporary ignore for RUSTSEC-2026-0258 because h2 0.3.x is still pulled through the latest compatible actix-http release.
|
At first glance, this looks good! Thanks for updating docs, not just code. |
Wait for the visible TinyMCE editor to become interactable before typing in the long-doc-block scroll preservation regression test. This addresses the macOS ChromeDriver element-not-interactable failure reported by the PR check.
|
Excerpts of a Claude review: 1. Student-facing guide points at a plain-HTTP bare IPcapture-token-setup-guide.html:310 tells students to visit This undercuts the security posture the same PR documents. capture.rs:397 hard-rejects non-HTTPS service URLs, and README/implementation.md both stress "token-bearing requests require HTTPS" — then the guide trains students that the legitimate way to obtain that token is an unauthenticated form on an unencrypted bare IP. Anyone on-path at a coffee shop or on campus wifi can serve a lookalike page and harvest addresses; the guide even helpfully publishes the Separately, a raw EC2 public IP checked into the repo will rot the first time that instance is replaced. Recommend a DNS name with a real certificate before this goes to students, even for the dev/test deployment. 2.
|
Switch the capture HTTP client from minreq's bundled-root HTTPS feature to https-rustls-probe plus proxy support so AWS capture requests use platform certificate verification and standard proxy environment variables. Add a unit regression guard that fails if minreq is built without HTTPS support, keeping token validation and upload failures from silently returning as service-unavailable at runtime. Tighten the student capture setup guide by removing the insecure temporary portal URL, public class code, token-format hint, and internal schema detail, then document the reachable Waiting, Off, and Error status states and fix the token-status log casing. Update README, VS Code README, implementation notes, changelog, and all tracked Cargo lockfiles to reflect the reviewed transport behavior.
|
Workoff for Bryan/Claude review comments:
Regression run before pushing:
|
Summary
This PR fixes the CodeChat capture client path so token validation and event upload work against the AWS-hosted CaptureWebService HTTPS endpoint, then documents the updated capture setup and behavior for students, extension users, and maintainers.
What Changed
Enables HTTPS support for the Rust
minreqHTTP client used by the bundled CodeChat server.server/Cargo.tomland the corresponding lockfiles used by the server and VS Code extension build.Adds a student-facing HTML setup guide at
docs/capture-token-setup-guide.html.Updates documentation in the main README and VS Code extension README.
Updates implementation documentation.
Updates CI/test maintenance.
CI Follow-Up
The first PR run failed in the Ubuntu
Run testsjob duringcargo audit. I corrected that failure in commitf494070.webbrowser1.2.1 path by resolving towebbrowser1.2.4.minify-htmlgit dependency resolution fromb5cce195to1519cf31, which removes the vulnerablerkyv0.7.46 dependency chain from the server, VS Code extension, and standalone lockfiles.actix-httplockfile resolution from 3.13.1 to 3.13.3 everywhere it is audited.cargo audit --ignore RUSTSEC-2026-0258inbuilder/src/main.rsfor the remainingh2advisory.h20.3.27 dependency is transitive through the current compatibleactix-httprelease.actix-httpexposes anh20.4.16+ dependency path.RUSTSEC-2026-0258.The next PR run passed Ubuntu, then failed on macOS in
overall_5::test_edit_preserves_cursor_scroll_in_large_doc_blockwith ChromeDriverElementNotInteractablewhile typing into TinyMCE. I corrected that failure in commitce98afb.#TinyMCE-instand sending keys..CodeChat-CodeMirror #TinyMCE-inst:not(.CodeChat-doc-hidden)and waits forwait_until().clickable()before sending keys.Security / Privacy Notes
Validation Performed
Ran
npm run compilefromextensions/VSCode.tsc -noEmitcompleted through the extension build..nodefile loaded; after closing that host, the compile passed cleanly.Reproduced the failed CI area locally.
cargo auditpath with the scopedRUSTSEC-2026-0258ignore.builder,extensions/VSCode,extensions/standalone, andtest_utilswith the same scoped ignore.rkyvis no longer present in the VS Code extension dependency tree.webbrowserresolves to 1.2.4 in the standalone/extension dependency paths.Ran builder validation locally.
cargo fmt --manifest-path builder/Cargo.toml --all --checkpassed.cargo check --manifest-path builder/Cargo.tomlpassed.cargo run --manifest-path builder/Cargo.toml flintpassed after installing the same dev helper and JS dependencies that CI installs through./bt install --dev.flintstill reports existing allowed/non-fatal warnings: the Rustchacha20yank warning, the builderproc-macro-error2unmaintained warning, and client-sidepnpm auditadvisories. These are not the failingcargo auditvulnerabilities from the PR run.Validated the macOS test hardening locally as far as this Windows workstation allows.
cargo fmt --manifest-path server/Cargo.toml --all --checkpassed after rustfmt formatting.cargo check --manifest-path server/Cargo.toml --testspassed.thirtyfour/ChromeDriver. The GitHub macOS runner is the authoritative execution path for that browser-specific failure.Verified capture service behavior through the live AWS dev/test deployment.
capture_enabled=truefor a valid portal-issued token.403.400and did not insert rows.Verified the actual CodeChat extension capture path.
Capture: Remote.Verified resulting rows in the AWS PostgreSQL capture database.
session_start,write_doc,reflection_prompt_inserted, andsave.write_code,switch_pane,doc_session,compile,compile_end,run,run_end,session_end,capture_settings_changed,task_start,task_submit,debug_task_start,debug_task_submit,handoff_start, andhandoff_end.Files Changed
server/Cargo.tomlserver/Cargo.lockserver/tests/overall/overall_5.rsextensions/VSCode/Cargo.lockextensions/standalone/Cargo.lockbuilder/src/main.rsREADME.mdextensions/VSCode/README.mddocs/implementation.mddocs/capture-token-setup-guide.htmlCHANGELOG.md