Repository navigation
Correct the documentation against what the code actually does - #106
Merged
Merged
Conversation
The docs had drifted behind several rounds of change, in places teaching the reader to reintroduce a vulnerability that was fixed. The worst of it: user-guide.md told readers to set VITE_API_KEY, and the website's setup steps and React and Vue samples all sent an operator API key from the browser. That key maps to a full Operator principal and a bundler inlines it as a literal string, which is exactly the defect #90 removed. Browser samples now start a session anonymously, carry the per-session token, keep the renewal each submission returns, and handle a spent credential. All three samples also read data.nextNode, a field the API has never returned. Other corrections against the code: - SSE endpoint is /events, not /stream (troubleshooting, components.md). - /auth/me is /api/auth/me. - SessionTimeoutMinutes defaults to 1440, not 60 - stated in four places. - The container diagram had no broker, though one is required above a single replica; the SPA was described as one surface rather than a public applicant route plus operator routes behind SSO. Additions covering behaviour that existed with no documentation: rate limit partitioning and the 429 path, applicant token renewal and terminal refusal, document session scoping, the per-session analytics trail, and running the broker-backed tests. docs/issues is emptied. All sixteen files were delivered and their GitHub issues closed, so they were a second, stale copy of requirements that no longer matched the code. Its README now explains what the directory is for and records what passed through it. Verified: every relative link and heading anchor resolves, all 36 documented config keys exist in the source, every documented /api path matches a real route, both website pages parse with balanced tags, and every markdown table is well formed. Co-Authored-By: Claude Opus 5 (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.
Brings the documentation back in line with the code after several rounds of change, and empties
docs/issues.The part that mattered most
user-guide.mdtold readers to setVITE_API_KEY, and the website's setup steps plus its React and Vue samples all sent an operator API key from the browser. That key maps to a fullOperatorprincipal and a bundler inlines it as a literal string — which is precisely the defect #90 removed. The docs were teaching people to reintroduce it.Browser samples now start a session anonymously, carry the per-session applicant token, keep the renewal each submission returns, and handle a spent credential (401 expired / 403 session ended) as distinct from a retryable
5xx. The Node sample keeps its API key — it is server-side, where that is correct — with a note saying why.All three samples also read
data.nextNode, a field the API has never returned. They now readcurrentNodeandisCompleted.Other corrections, each checked against the code
/sessions/{id}/stream/events(troubleshooting +components.md)GET /auth/me/api/auth/meSessionTimeoutMinutesdefaults to601440, in bothappsettings.jsonand the code fallback — stated wrongly in four placesdocs/issues/is "known gaps"Documented behaviour that previously had none
429path, proxy configuration, per-instance semantics, and the shared-credential trap. Added to the user guide, the website (new Rate Limits section), and troubleshooting. The website documented no limits at all, though a429is now reachable on every endpoint.404rather than403.REQUIRE_BROKER_TESTS=1.docs/issues emptied
All 16 files were delivered and their GitHub issues closed (#76–#86, #90–#95). Left in place they were a second, stale copy of requirements that no longer matched the code, and a reader could not tell which were outstanding. The README now explains what the directory is for, how to add an item, that the file should be deleted once delivered, and records what has passed through it. The creation workflow already exits cleanly on an empty directory.
Verification
Checked mechanically rather than by eye:
/api/...path matches a real controller route (27 routes cross-checked) — this caught the/streamand/auth/meerrors.</section>I had misplaced.One incidental fix: rebuilding
website.cssadded 10 selectors and removed none. Those classes were already used inindex.htmlmarkup but missing from the committed stylesheet, so the checked-in CSS was stale.🤖 Generated with Claude Code