Repository navigation
Answer an unbound file binding as no file, not a refusal - #2348
Merged
Merged
Conversation
A page whose file editor names a binding it lacks is a designed state: the file-editor author instructions say a copied page "explains that it is unavailable", and the developer worked example ships unbound. The server answered its read with 400, so Chrome logged "Failed to load resource" on every live page holding one. That broke test_a_composed_page_does_not_offer_history_it_does_not_have from #2202 on, since the corpus composes the unbound example and the suite rejects every console error. GET /api/files/<id> now answers an unbound id with 200 and `null`, as /favicon.ico answers 204 to keep the console clean. The browser transport turns that null into the same "No file is bound as '<id>'." failure the editor already showed, so the reader sees no change. A save against an unbound id still refuses with 400, and a malformed bindings entry now says so rather than reading as unbound. Tests: the HTTP door test asserts the null read and the refused save; the sample editor test asserts the explanation's text instead of consuming the 400 it no longer produces. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 11, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
A malformed binding entry is still treated as missing.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 11, 2026
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.
A page whose file editor names a binding it lacks is a designed state: the file-editor author instructions say a copied page "explains that it is unavailable", and the developer worked example (
examples/developer/file-editor.html) ships unbound. The server answered its read with 400, so Chrome logged "Failed to load resource" on every live page holding one. That broketest_a_composed_page_does_not_offer_history_it_does_not_havefrom #2202 on, since the corpus composes the unbound example and the suite rejects every console error.GET /api/files/<id>now answers an unbound id with 200 andnull, as/favicon.icoanswers 204 to keep the console clean. The browser transport (runtime/file-api.js) turns that null into the same "No file is bound as ''." failure the editor already showed, so the reader sees no change. A save against an unbound id still refuses with 400, and a malformed bindings entry now says so rather than reading as unbound.Tests: the HTTP door test asserts the null read and the refused save; the sample editor test asserts the explanation's text instead of consuming the 400 it no longer produces.