docs(v0.4.0): align README + frozen contract + protocol-comparison with reality#63
Merged
docs(v0.4.0): align README + frozen contract + protocol-comparison with reality#63
Conversation
…th reality
Closes audit findings HIGH H9/H10/H11/H12/H13 + medium "one whitelisted code
path" claim. Final of 5 PRs gating v0.4.0; pure docs.
README
- Replaced the partial endpoint bullet list (5 routes) with a complete table
of 16 routes — the prior list was missing /api/peer/info, the transfer
lifecycle endpoints, /api/hash, /api/browse-local, /api/browse/stats,
/api/manifest/register, /api/relay/push, and /api/metrics. Anyone reasoning
about attack surface or writing a non-UI client now sees the full picture.
- Replaced the single-paragraph hash claim ("xxh3-128") with a two-layer
description that matches the implementation: per-chunk wire verification is
XXH3-128, full-file finalize is SHA-256, and the JSON field name kept its
historical "hashHex" identifier for v0.x wire-format stability (rename
scheduled for v1.x).
- Sidecar contents now correctly list FOUR files: data.partial, meta.json,
chunks.bitmap, AND chunks.hashes (the per-chunk XXH3 file added in v0.2.5
for selective re-verify on full-file mismatch). The README pre-v0.4.0
showed three.
- "Tested on Linux. Runs on macOS and Windows too" rephrased to honestly
reflect the reality: Linux is the only platform under CI / shipped images;
macOS and Windows are best-effort with documented quirks.
tasks/contracts/data-formats.md
- All persistent-state JSON examples now show LOWERCASE enums
("inbound" / "tcp" / "running" / "skip"), matching the wire format since
v0.3.0. Pre-v0.4.0 examples were uppercase, contradicting every actual
state file.
- TCP wire-protocol section updated to v2: documents the new DATA_END_V2
frame (0x09) carrying the trailer XXH3-128, explains the negotiated-min
protocol-version handshake, and describes the v1 (two-pass) vs v2
(single-pass) trade-offs.
- Added schemaVersion field to JobState and SidecarMeta examples + a top-of-
file note explaining read-side reject semantics.
- Added new endpoints that grew during 0.x: /api/manifest/register,
/api/browse/stats, /api/peer/info / /api/metrics implications, the
acknowledgeOverwrite gate on POST /api/transfers, the per-job metrics
block in GET /api/transfers/{id}, and TransferRegistered /
TransferDismissed WS events.
- New section on chunks.hashes (pre-doc undocumented).
- Stats-walk depth cap (32) and HELLO-watchdog timeout documented.
docs/protocol-comparison.md
- Removed the "_TBD_" results table that the V5 verify task never filled
in. The README links to this doc; landing on a page that says "TBD"
undermines confidence.
- Replaced with honest design notes describing where each protocol wins,
acknowledging that real-world LAN throughput is dominated by the slower
of the two disks (source HDD seek + receiver fsync) regardless of
protocol choice. Manual reproduction steps preserved.
Local mvn test: ArchitectureTest 8/8 pass; compile clean. Linux CI handles
the Jetty server-tier suites.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes audit findings HIGH H9/H10/H11/H12/H13 + the medium "one whitelisted code path" claim. Final of 5 PRs gating v0.4.0; pure docs.
After this lands the v1.0.0 audit's Blocker / High / Medium tier is fully closed.
Changes
README
/api/health,/api/browse,/api/manifest,/api/transfers,/ws/progressand stopped. Anyone evaluating attack surface saw half the picture. Now: full table of 16 routes with auth posture and one-line purpose.hashHexis documented as kept-for-v0.x-stability, with a note that the rename tosha256Hexis for v1.x.chunks.hashes, the per-chunk-XXH3 file used by the selective re-verify path since v0.2.5).SafeFileOps,FileFinalizer,JsonJobStore,FileSidecarStore). New banned APIs (FileChannel.truncate,TRUNCATE_EXISTING) listed. Already covered in the foundation PR but the prose is now consistent.tasks/contracts/data-formats.md"protocol": "TCP","state": "RUNNING"etc; the actual wire format has been lowercase since v0.3.0 (commit81ce723). Anyone implementing a parser by reading this contract was getting wrong info.DATA_END_V2(frame type 0x09) carrying the trailer XXH3-128. Documents the negotiated-min handshake (server is v2, downgrades cleanly to v1 against legacy clients) and the single-pass vs two-pass trade-off.schemaVersionfield added to JobState and SidecarMeta examples + a top-of-file note explaining read-side reject semantics./api/manifest/register,/api/browse/stats,/api/peer/info,/api/metrics, theacknowledgeOverwritegate onPOST /api/transfers, the per-job metrics block inGET /api/transfers/{id}, andTransferRegistered/TransferDismissedWS events.chunks.hashes(previously undocumented).docs/protocol-comparison.md_TBD_results table that the V5 verify task never filled in. The README links here as the source of truth; landing on a page that says "TBD" undermines confidence.Test plan
mvn compileclean;mvn test -Dtest=ArchitectureTest8/8 pass.App.java(or its route registrations).🤖 Generated with Claude Code