Repository navigation
refactor: refusals of the page in one module; the range of a new batch decided in the batch layer; the rules of the design - #258
Merged
Conversation
Problem, Missing and why were defined in page.py, yet Pages raised them
too, importing them from the module of one batch. They move to
web/refusals.py, with say (the reason at a field) and kept, one context
manager that says a write the definitions refuse (NotKept) as "The change
was not kept: ...". Page actions, the corrections of runs, removing a
batch and making one all use it, so take and load_table no longer re-raise
NotKept by hand, and Pages.create no longer says it as "The batch was not
made: ...".
Pages.create and Page.take catch what the batch layer refuses (ValueError,
and KeyError for create) instead of every exception: anything else that a
source raises is a defect of its code. Pages.check is the one place that
says "There is no batch X." for Pages.page, Pages.remove and Page._held.
Removing a batch answers a Notice instead of an untyped {}.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"A batch that follows has no last row" and "no row now takes no row" were rules of Pages.create and its helper taken, so code and the command did not get them. source.between becomes source.Range(first, last, later): a choose that a person picks, which refuses later with an end, and whose last BatchManager.create can see, so create refuses follow with a last row. Pages.create passes the range as given and says what the manager refuses. create takes columns, the parameters that are columns of empty cells: Pages wrapped choose to add them, which would hide the Range from the manager. The tests of ranges move to manager_test; the web tests keep that the refusal reaches the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every call that runs a source (making a batch, marking a range, offering and taking rows) goes through refusals.refused: a write the definitions refuse reads "The change was not kept: ...", and ValueError, KeyError and OSError read as what was asked plus why. OSError is said since the files a source is given may fail to list, such as a mount that went away, which is no defect of the code; anything else a source raises is a defect and is not turned into a message. rows_of and offered caught every exception before. ADR 0013 said the manager cannot see a last row since choose is code; the range is a value the manager reads, and create refuses follow with a last row. The guide, the ADR, the demo and the toys use Range and columns where a lambda picked a range or added an empty column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Who decides, the one lock, the owner of each piece of state, what an action answers, how a change is noticed, where a refusal is said, the queue of the browser, and the settings form as a draft. A change that breaks one of them needs a reason. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… draft
A source, the file source and a drawing are code of the application and
may raise anything. The page says it and keeps working, as it did before
the previous commits narrowed this for sources: refusals.said reads a
ValueError or OSError as its text and anything else, a defect, with its
type ("RuntimeError: boom", "KeyError: 'run'"). refused uses it for the
requests that run a source, and the listing, the step of Follow and the
plot use it for their text. refused wraps kept and adds no second period.
Pages.create checks settings_from and looks up a spec through
BatchManager.spec_named (was _bound), which refuses with ValueError, so a
KeyError inside the block is a defect.
Load table changes which parameters are columns, so it is refused while
the settings form holds a change, as "Make this a column" is; before, it
dropped the draft without a word. It says OSError of reading the file.
The page shows the notice of removing a batch. ADR 0013, Range and
create say that only a Range with a last row is refused with follow: a
function may choose any rows. The rules in the web README say what holds.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 20, 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.
The last two of the pull requests that bring the web layer of the batch page to one set of rules, and the rules written down.
Every refusal of the page is said in one module.
Problem(422 with a message),Missing(404) and how an exception of the batch layer reads as a sentence were defined in the module of one batch, thoughPagesraises them too. A refused write to the definitions read "The change was not kept: …" in three places and "The batch was not made: …" in a fourth, and two methods re-raised it by hand.web/refusals.pynow holds all of it, and one context manager says a refused write.One rule for what code of the application raises. A source, the file source and a drawing are code of the application and may raise anything; the page says it and keeps working. A refusal (
ValueError,OSError) reads as its text; anything else is a defect of that code and reads with its type (KeyError: 'run'), where it read as a bare word ("run."). The four requests that run a source, the listing, the step of Follow and the plot use one function for the text.Which rows a new batch takes is decided in the batch layer. The page decided that a batch that follows has no last row, and that "no row now" takes none. The range is now a value that the manager reads:
choosemay still be any function of the rows. The refusal is of aRangewith a last row: a function chooses any rows in code, and the filled rows it leaves out are considered, so Follow adds only what arrives later. ADR 0013 said the manager cannot see a last row becausechooseis code, and now says this.Rangereplacessource.between, andcreatetakescolumns=for the empty parameter columns, so the page passes what the form holds as given.The rules of the design are a new section of the page's README: who decides, the one lock, the owner of each piece of state, what a request answers, how a change is noticed, where a refusal is said, the queue of the browser, and the settings form as a draft. A reviewer checked each against the code; three were false as first worded and are corrected, one by a fix (below).
Changes a person can see, found by running the code before and after side by side:
Notice, where it answered{}.🤖 Generated with Claude Code