Fix what the review of Phase 9 found in accounts, access, capital, health and publication

A position left out together with its stop kept the account prudent for good: the
stop was still asked for shares that no longer exist. The cover required now stops
at what the account holds, the stops are compared again after the choice, and where
one is still missing Align takes the excluded position up again. After the choice
the account waits for the stop with its own reason, so it returns to normal by
itself also past the 15 minutes; a new difference still gets its own 15 minutes.

A right password alone no longer clears the wrong second-factor codes: it takes
back only its own attempt.

Capital and shares are planned and written in one transaction, so overlapping
changes cannot apply twice and an interruption leaves nothing halfway; sending the
same figures again completes what an old one left. The cash that purchases under
way still hold is no longer given away, counted as the risk engine counts it.

/health said healthy when the trading engine had failed to start. It now says so at
once, or after ten minutes of a stalled start, and the host tries the start again
every minute; the guard still sees a start that does not move.

The image of the manual publication says its version and its commit, marked when
the tree is dirty, and publish.sh refuses before any login an image that does not
come from the commit of the tag.

refs #75

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-12-01 22:07:46 +01:00
1 parent 24e20584d4
commit 81d6c5f667
20 files changed
+814 -174

No files matched your search

+12
View File
@@ -22,6 +22,18 @@ expected=$(sed -n 's:.*<Version>\(.*\)</Version>.*:\1:p' "$root/Directory.Build.
[ -n "${REGISTRY_TOKEN:-}" ] || fail "manca il segreto REGISTRY_TOKEN (token Gitea con il permesso write:package)."
name="$REGISTRY/balbosoft/anubis"
# The image says what it was made from (its labels): only what comes from the commit of the tag is published as that tag.
# Without the tag here, as in the CI, the commit checked out is the tag's.
commit=$(git -C "$root" rev-parse --verify --quiet "refs/tags/$tag^{commit}" || git -C "$root" rev-parse --verify --quiet HEAD) || fail "non riesco a leggere il commit del tag."
label() {
docker image inspect --format "{{ index .Config.Labels \"org.opencontainers.image.$1\" }}" "$image"
}
built=$(label version) || fail "non trovo l'immagine $image."
# The image built by hand for vX.Y.Z-something says X.Y.Z, the version of Directory.Build.props: the commit tells them apart.
[ "$built" = "$version" ] || [ "$built" = "$expected" ] || fail "l'immagine $image dice di essere la versione '$built', non $version: ricostruiscila."
source=$(label revision) || fail "non trovo l'immagine $image."
[ "$source" = "$commit" ] || fail "l'immagine $image viene dal commit '$source', non da $commit: ricostruiscila dal commit del tag, senza modifiche in sospeso."
# latest moves only for the highest plain version among the tags of the repository.
latest=""
case "$version" in