Hold 0115's creation, its capability answer and the core's lifetime (#115) - #288
Merged
Merged
Conversation
…115) 0115 decides what a client hands to creation, that creation reaches nothing, that a stop is bounded and reports which lane did not stop, that a stopped core is finished rather than restartable, and that a suspend keeps what a stop discards. None of it was anywhere in the tree: `Core` was still the placeholder this crate uses for a type whose issue has not been worked. src/lifecycle/mod.rs holds the part a value settles. `Supplied` is the whole of what creation takes and holds borrowed implementations and nothing else, so there is no state a creation could have filled in and no call it could have made. `WhatIsPresent` answers per implementation rather than as one flag, because three absences produce three differently reduced cores and a client that cannot tell them apart cannot explain any of them to an operator. `Lifetime` answers what a call does now, and it asks whether a stop was ASKED FOR rather than whether it succeeded, which is 0115 in its own words. The failure this prevents is the direction 0115 says three of its four answers go wrong in when a call site meets them first, which is towards making a call look like it succeeded. A stop that reports success after a timeout is a negative disclosure turned positive. A core that goes on taking work after a stop expired is one accepting requests while a lane it could not stop is still running. A second stop overwriting the first outcome is the same thing arriving by repetition, so the outcome is kept rather than replaced. The floor 0115 requires under the stop bound is NOT here, and that is a gap rather than a decision. It is fixed by how long the two uninterruptible things in 0009 take, neither record states either number, and a floor written here would be that number invented at the one call site needing it. What is refused is a bound of nothing, which is a stop that never waits for a lane at all. Nothing here starts, cancels or waits for a thread, for the same reason src/server/transport.rs holds no socket. Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.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.
The issue this belongs to
Refs #115. It reaches the first of that issue's three conditions and neither of
the other two, so no closing keyword is written here on purpose: three landings
on this board have written "does not close #N" and GitHub read the keyword out of
the sentence with the negation discarded, on #107, on #27 and on #29.
What changed
docs/decisions/0115-creating-and-stopping-the-core.mddecides what a clienthands to creation, that creation reaches nothing, that a stop is bounded and
names which lane did not stop, that a stopped core is finished rather than
restartable, and that a suspend keeps what a stop discards. None of it was
anywhere in
src/. The name that was there was the placeholder this crate usesfor a type whose issue has not been worked -
Core, with 0009's statement aboutits kind on it and a doc comment saying creating and stopping one is #115.
src/lifecycle/mod.rsholds the part a value settles.Suppliedis the whole of what creation takes: the byte store from 0040, thesecret store from 0033 and the diagnostics sink from 0100, each optional. It
holds borrowed implementations and nothing else, so there is no state a creation
could have filled in and no call it could have made, which is 0115's "creation
reaches nothing" as a shape rather than as a description.
WhatIsPresentanswers per implementation rather than as one flag, which is thatrecord's reason rather than a preference: three separate absences produce a core
that works in three different reduced ways, and a client that cannot ask is a
client that cannot explain any of them to an operator.
StopBoundcarries the two seconds and refuses a bound of nothing.LaneandHowTheStopEndedare 0009's two threads and the outcome that names one of them.Lifetimeanswers what a call does now.What failure it prevents
0115 says three of its four answers go wrong in the same direction when a call
site meets them first, and that direction is towards making a call look like it
succeeded. Each of those is a case here.
A stop that reports success after a timeout.
HowTheStopEndedhas no variantsaying a stop succeeded without saying both lanes stopped, and the expiry carries
the lane rather than being a bare failure.
A core that goes on taking work after a stop expired.
Lifetime::what_a_call_doesasks whether a stop was ASKED FOR and never whether it succeeded. Reading the
outcome instead leaves a core accepting requests while a lane it could not stop
is still running, which is the state the bound exists to report rather than to
continue through.
A second stop overwriting the first outcome. 0115 says a second stop returns
at once with the same outcome. Taking the later one lets a core that reported a
lane still running be asked again and answer that everything stopped, which is
the same negative disclosure turned positive, arriving by repetition.
What I decided that 0115 left open
A bound of nothing is refused and every other value is taken. 0009 makes a
stop wait for both lanes, so a bound of zero is a stop that never waits and
reports an expiry against a core that would have stopped.
A suspend or a resume against a finished core changes nothing. 0115 gives no
move back out of finished. A host setting aside a process whose core has stopped
is not a reason to unsay that, and the alternative is a
Lifetimethat is bothfinished and running.
Suppliedwrites its ownDebugand it says only which of the three arepresent. The implementations are the client's own and this core has no words
for them. A derived one would need each of the three interfaces to demand a
formatting from a client's type, for the benefit of a line nobody reads.
Evidence
Read at the commit being pushed.
The gate legs that need no network on this machine:
What a guard here refuses, and the proof it bites
Six deliberate violations, each a one-change neighbour, each run with
cargo test --locked --lib lifecycle. The green run is the one above: 12 passed,0 failed.
A call refused only after a stop that SUCCEEDED, which is the reading that
looks equivalent.
self.stopped.is_some()becameself.stopped == Some(HowTheStopEnded::BothLanesStopped):A second stop replacing the first outcome. The guard on the second call was
deleted:
A finished core suspended again. The same guard in
suspendedwas deleted:The three absences collapsing into one answer, which is what one flag would
be. Two of the three fields were read off the byte store:
A bound of nothing accepted. The zero arm was deleted:
A suspend cancelling what the caller still wants, which is the confusion
between a suspend and a stop that 0115 exists to separate. The call test was
pointed at
self.suspended:What this does not cover
Two of #115's three conditions. Starting a set of requests, stopping the core
and proving every one ended with no thread outliving the stop, and suspending and
resuming across a clock jump, each need something running. Nothing in this tree
starts a thread or makes a request, so nothing here starts, cancels or waits for
anything.
The floor 0115 requires under the stop bound is absent, and that is a gap
rather than a decision. That record says the floor is not a preference: it is
fixed by the two things 0009 makes uninterruptible, a decode running to the end
of its current step and a read already begun through the byte store. Neither
record states how long either may take, and no other record in this tree does:
So a floor written here would be a number this repository invented at the one
call site that needed it. It is named in the module where somebody setting a
bound meets it, and it is the thing to settle before a stop is built.
Nothing creates a core.
Coreinsrc/lib.rsis untouched and still carriesno method. What this adds is what a creation would take and what the resulting
lifetime answers, not the call itself, which needs the two lanes 0009 fixes.
The capability answer is not proven against a reduced core doing anything.
What is asserted is that the answer reports each of the three separately and
correctly. What each absence costs is 0033's, 0040's and 0100's, and
src/cache/cold_start.rsis where one of them is already held.src/lifecycle/is added as an area to the pinned coverage surface. That isa change to what the bar is measured over rather than only a module added under
an existing area. The argument is on the area's own line, and it is 0115's: a
defect here reports a stop as done while a lane it could not stop is still
running, or lets a core that was asked to stop keep taking work. The instrumented
run and the bar are the runner's; only the register's own fixtures were run here.
The
targetsandthread-detectorlegs did not run here. One needs crosstoolchains this machine has not set up and the other a nightly compiler it does
not carry.
Nothing was run that could raise a consent prompt on this machine.
Who has read it
Nobody other than me. There was no second reader available for it, and the
evidence above stands in place of one.