Skip to content

Promote: staging -> develop - #952

Merged
TaprootFreak merged 5 commits into
developfrom
staging
Aug 28, 2026
Merged

Promote: staging -> develop#952
TaprootFreak merged 5 commits into
developfrom
staging

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automatic Staging PR

This PR was automatically created after changes were pushed to staging.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge to promote into develop

TaprootFreakAI and others added 4 commits August 27, 2026 16:41
EN:
Adds a Tier-1 integration test for the BitBox sell path that starts with
too little ETH.
The cubit posts `/v1/faucet`, polls `/v1/blockchain/balances`, then
signs and broadcasts the unsigned swap and deposit through the DFX API.
The faucet response is held behind a Completer so polling cannot start
until the faucet call returns.
Existing tests that skip the faucet hop are unchanged. No production
code change.

DE:
Ergänzt einen Tier-1-Integrationstest für den BitBox-Sell-Pfad, der mit
zu wenig ETH startet.
Der Cubit sendet POST `/v1/faucet`, pollt `/v1/blockchain/balances` und
signiert dann Swap und Deposit über die DFX-API.
Die Faucet-Antwort liegt hinter einem Completer, damit das Polling erst
nach Rückkehr des Faucet-Calls startet.
Die bestehenden Tests, die den Faucet-Schritt überspringen, bleiben
unverändert. Kein Production-Code.

<details>
<summary>Details</summary>

The previous happy path in `test/integration/sell_bitbox_flow_test.dart`
set `ethBalance` above `requiredGasEth`, so `POST /v1/faucet` never ran.

The new case uses `_info(ethBalance: 0)` and wires the real
`DfxFaucetService` and `DfxBlockchainApiService` (plus the already-real
sell service) to the same `MockClient`. Sequence:

1. `POST /v1/faucet` is entered; the 200 is held on a Completer
2. a 5s elapse must not call `/v1/blockchain/balances` (timer not
installed yet)
3. Completer completes; cubit is `WaitingForEth`
4. after the 5s poll timer, `POST /v1/blockchain/balances` with
`blockchain=Ethereum` and ETH asset id 111
5. unsigned swap + deposit, two FakeBitbox signs, two broadcasts, one
confirm
6. `SellBitboxSuccess`

Unsigned/broadcast/confirm before the faucet POST fail the test. No
BitBox hardware and no live node. Local checks on the build host:
analyze clean, format unchanged, `flutter test
test/integration/sell_bitbox_flow_test.dart` +6 passed.

</details>

---------

Co-authored-by: TaprootFreakAI <315477232+TaprootFreakAI@users.noreply.github.com>
EN:
This PR reproduces the customer chart bug as goldens, without a product
fix.
MAX shows the old holdings curve, then a drop to zero. 1W, 1M, 3M and 1J
show the empty plot.

DE:
Dieser PR bildet den Kunden-Chart-Bug als Goldens ab, ohne Produkt-Fix.
MAX zeigt die alte Bestandskurve, dann den Abfall auf 0. 1W, 1M, 3M und
1J zeigen die leere Fläche.

<details>
<summary>Details</summary>

Fixtures: non-zero points older than one year (MAX curve), then zeros
through now (1W–1J collapse with `minY == maxY == 0`). Same sequence the
customer reported. PNGs from the self-hosted visual-regression runner.

</details>

---------

Co-authored-by: TaprootFreakAI <315477232+TaprootFreakAI@users.noreply.github.com>
EN:
The portfolio development chart disappeared for time windows where every
holding is zero.
The cubit now keeps a Y-range from 0 so the line stays drawn, and holds
the last value before the window so the stroke spans the selected
period.
A dashboard golden records the all-zero MAX view; the customer-report
1W–1J goldens show that full-width zero line on a 0…10 axis.
Unit tests cover an all-zero series, a one-week window of zeros, and
carrying a pre-window sample to minX.

DE:
Die Bestandsentwicklung verschwand in Zeitfenstern, in denen jeder Punkt
0 ist.
Der Cubit hält jetzt eine Y-Spanne ab 0, damit die Linie gezeichnet
bleibt, und übernimmt den letzten Wert vor dem Fenster, damit der Strich
die gewählte Periode ausfüllt.
Ein Dashboard-Golden dokumentiert die Null-MAX-Ansicht; die
Kunden-Goldens 1W–1J zeigen diese volle Null-Linie auf einer Achse 0…10.
Unit-Tests decken eine Null-Serie, ein 1W-Null-Fenster und das
Nachziehen eines Werts vor minX ab.

<details>
<summary>Details</summary>

When every visible point is 0, `average * 0.05` was 0, so `minY == maxY
== 0` and `LineChart` drew no curve. The cubit now falls back to a 5.0
currency-unit floor so the chart has a Y-range. Holdings cannot go
negative: the bottom line is always clamped to 0 (scale 0…10 for an
all-zero series), not centered through negative labels.

A clipped period (1W/1M/3M/1J) previously started the stroke at the
first interior sample. If that sample sat months into the window, the
line began mid-chart. The last sample before `minX` is now held at the
window edge so the stroke spans the selected period. An empty window
(every sample older than the period) stays empty.

`dashboard_portfolio_chart_zero.png` is the all-zero MAX view. After
#953, the mixed-history 1W/1M/3M/1J goldens pin the full-width zero line
on the 0-axis.

</details>

---------

Co-authored-by: TaprootFreakAI <315477232+TaprootFreakAI@users.noreply.github.com>
EN:
Five synthetic test customers document different buying patterns on the
holdings chart.
Each history has at least ten trades inside one year; the diagrams are
golden baselines, not live accounts.
Handbook spec 80 lists every trade and maps six screenshots (MAX for all
five, plus 1J after a sell-to-zero).
The screenshot count guard moves from 278 to 284.

DE:
Fünf synthetische Testkunden dokumentieren unterschiedliches
Kaufverhalten auf der Bestandsentwicklung.
Jede Historie hat mindestens zehn Trades in einem Jahr; die Diagramme
sind Golden-Baselines, keine Live-Konten.
Handbook-Spec 80 listet alle Trades und sechs Screenshots (MAX für alle
fünf, plus 1J nach Verkauf auf 0).
Der Screenshot-Count-Guard steigt von 278 auf 284.

<details>
<summary>Details</summary>

Personas: monthly DCA (12×80), lump then top-ups, eight buys then four
sells to zero, interleaved mix, rising scale. Fixtures are
local-midnight offsets so MAX and 1J stay stable. No addresses or
personal data.

</details>

---------

Co-authored-by: TaprootFreakAI <315477232+TaprootFreakAI@users.noreply.github.com>
@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
The only red check is Handbook PRD deploy: the mail-preview generator now writes 28 HTML files, while the guard still expected 25.

DE:
Der einzige rote Check ist der Handbook-PRD-Deploy: der Mail-Preview-Generator schreibt 28 HTML-Dateien, der Guard erwartet noch 25.

Details

Failed job: deploy-prd / Build and deploy to PRD on the push to staging (head b7841e94). Analyze & Test, Visual Regression, and Coverage Floor Gate on this promotion PR are already green.

Expected exactly 25 mail preview HTML files … got 28.

The three extra previews come from DFXswiss/api#5221 (black-squad, kyc-payment-data, recommendation-confirmation). The generated /mails/ index already carries trigger text; this repo's handbook page only links there, so no extra cards.

Fix: #956 (EXPECTED_HTML_COUNT: 28, base staging). Required checks there are green; it still needs a human approval and merge. After it lands on staging, this promotion PR will move to the new head and Handbook CI/CD will run again.

@TaprootFreakAI

Copy link
Copy Markdown
Collaborator

EN:
Fix PR #956 is CI-green on the current head; it still needs a human approval and merge.

DE:
Der Fix-PR #956 ist auf dem aktuellen Head CI-grün; es fehlen noch Freigabe und Merge.

Details

Head 0783d49c: Analyze & Test, Visual Regression, Coverage Floor Gate, and BitBox quirks audit all succeeded. Both commits are verified. After #956 merges into staging, this promotion PR will move and Handbook CI/CD will run again with EXPECTED_HTML_COUNT: 28.

EN:
Handbook PRD deploys have been failing because the mail-preview
generator now writes 28 HTML files, not 25.
This updates the exact-count guard so a push to staging can ship the
handbook again, including spec 80.
No product UI change.

DE:
Die Handbook-PRD-Deploys schlagen fehl, weil der Mail-Preview-Generator
jetzt 28 HTML-Dateien schreibt, nicht 25.
Dieser Guard-Stand lässt den Staging-Push wieder nach PRD, inklusive
Spec 80.
Keine Produkt-UI-Änderung.

<details>
<summary>Details</summary>

Count is 24 standalone `add()` mails + 3 `pendingTypes` expansions + 1
index = 28. The loop `add()` template is not counted in the 24.
Confirmed against the failed deploy log on staging (got 28).

The three extra previews come from DFXswiss/backend#5221: `black-squad`,
`kyc-payment-data`, `recommendation-confirmation`. The handbook page
`#spec-mails` only links to the generated `/mails/` index, so no extra
cards.

This unblocks #952 (`Promote: staging -> develop`), whose
only red check is `deploy-prd / Build and deploy to PRD`.

</details>

---------

Co-authored-by: TaprootFreakAI <315477232+TaprootFreakAI@users.noreply.github.com>
@TaprootFreak
TaprootFreak merged commit ce45560 into develop Aug 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants