The floor's tags are the seat git's verb tags and its requirements what the catalog half's entries name for the package (indexer_requirements and the forge bridge's bridge_tags go from code and manifest); a catalog revision the builder hears wakes a silent floor (the forge stream's consume and its wake go). The guard test says A-107 relaxes ADR 0437 section 8 for a seat's verbs and accepted kinds. The integration bed creates the state bounds the step bounds are kept in. The assignments view's seat form (A-119 (3)) is not built here. Builds: design 47 G §7, A-82, A-107, A-119 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
52 lines
2.3 KiB
Go
52 lines
2.3 KiB
Go
package versions
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"strings"
|
|
"time"
|
|
)
|
|
|
|
// The tools' descriptions.
|
|
const (
|
|
FloorAgainDescription = "Ask the floor of one name again now, by hand (design 51 *The floor*): the seat's versions, the seat git's " +
|
|
"git.tags and the indexer's indexer_requirements, as the builder asks them by itself when a silent source says something. " +
|
|
"Answers which sources were silent and whether the floor is now known. A name the builder's versions already hold needs no floor: " +
|
|
"refused, saying so. A hand act."
|
|
)
|
|
|
|
// Acts are the builder's hand acts on its versions, answered by its program (the tools bundle writes them to reasks).
|
|
type Acts struct {
|
|
Numberer *Numberer
|
|
// Reconsider looks at every module again, so a claim asks a name's floor.
|
|
Reconsider func(ctx context.Context)
|
|
// Republish queues the reserved versions builder_publish_again names (design 47 G §588): the versions it queued.
|
|
Republish func(ctx context.Context, module, version string) ([]string, error)
|
|
// DropOldForm drops a retired node from the old form's count by hand (builder_old_form): its answer, or why not.
|
|
DropOldForm func(ctx context.Context, node, by, why string, at time.Time) (string, error)
|
|
// DropReserved drops a module's reservation of one MAJOR.MINOR by hand (builder_reserved_drop): its answer, or why not.
|
|
DropReserved func(ctx context.Context, module, series, by, why string, at time.Time) (string, error)
|
|
}
|
|
|
|
// FloorAgain is builder_floor_again of name: the floor counts only for a name the versions hold nothing of.
|
|
func (a Acts) FloorAgain(ctx context.Context, name string) (string, error) {
|
|
entries, err := a.Numberer.Versions.Of(ctx, name)
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
if len(entries) > 0 {
|
|
return "", fmt.Errorf("%s holds %d versions: its floor counts only for its first number, so nothing is asked", name, len(entries))
|
|
}
|
|
answer := name + " waits on no floor in this builder: the floor is asked at its next claim"
|
|
if a.Numberer.Waits != nil {
|
|
for _, w := range a.Numberer.Waits.Waiting() {
|
|
if w.Name == name {
|
|
answer = fmt.Sprintf("the floor of %s is asked again (%s were silent)", name, strings.Join(w.Silent, ", "))
|
|
}
|
|
}
|
|
a.Numberer.Waits.Wake(WakeByHand, "", "", name)
|
|
}
|
|
a.Reconsider(ctx)
|
|
return answer + "; builder_versions shows its version once numbered", nil
|
|
}
|