docs: correct two things the #77 and #81 work left wrong - #84
Merged
Conversation
NotFoundMessage told readers a page_id was "not found (deleted, trashed, or wrong)" and its comment claimed the API answers 404 either way. A trashed page answers 200 with status "trashed", as does an archived page with status "archived", so neither ever reaches this message -- naming trashing there tells someone debugging exactly that case that they have found their answer. Detecting those two states is #17 and needs a status check. Also records that v2's space-key lookup is case-insensitive, which is what makes find's --space guard safe to sit in front of CQL, and appends to the retry plan the two places the implementation diverged from it.
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.
Cleanup from the #77 and #81 work. No behaviour change.
pageref.NotFoundMessagesaid something untruewith a doc comment asserting "the API answers 404 either way, and markfluence has no way to tell which happened."
A trashed page answers
GET /wiki/api/v2/pages/{id}with 200 andstatus: "trashed"— recorded in folders.md, and confirmed against a real trashed page while looking at #17:So a trashed page never reaches this message at all; it sails past the nil check that produces it and on into whatever the command was doing. An archived page does the same with
status: "archived". Offering "trashed" as a cause tells someone debugging precisely that case that they have found their answer, when they have found the opposite.The parenthetical is now "(deleted or wrong)", and the comment explains why trashing is deliberately absent and points at #17, which is where detecting those two states belongs. The test gains an assertion that the word does not come back.
Both tests that pinned the old sentence are updated — they exist to catch exactly this kind of edit, so they did their job.
A finding from #77 that never got written down
v2's
GET /wiki/api/v2/spaces?keys=is case-insensitive (webplatforms,WEBPLATFORMS,WebPlatformsall resolve to the same space), as is CQL'sspace =.I probed that specifically to check
find's--spaceguard: it resolves the key through the v2 lookup only to reject an unknown one, then hands the key itself to CQL. If the v2 lookup were the stricter of the two, the guard would refuse keys the search would have matched. It isn't — but that reasoning existed only in a conversation, so it is now insearch.mdnext to the CQL half.Plan drift
_plans/021was written before the code and two decisions turned out to be wrong as specified — theRetry-After: 0presence-vs-delay problem, and a field the retry hook needed for theUpdatePagerecovery. Appended as a "what changed while implementing" section rather than edited away, since the mistakes are the useful part of a design record.