2f8ff2414c
gates / gates (push) Successful in 17s
R-537 — the contents label is now PER TIER. One string computed from the app's shape was rendered on all three tier rows; a Tier-1 unit has no file-copy step, so for the four class-A apps it was claiming „Adatok" for files it does not hold. R-538 — a unit restore REFUSES before anything is touched when the unit cannot return the app's drive-side files, and names the route that can. It runs before the stack is stopped because the measured harm included the app's own wastebasket going unreachable, which still held every byte. R-536 — „Alkalmazás telepítve" moved from the deploy's acceptance to its completion, with app_deploy_started and app_deploy_failed as the honest pair. Each fix red-proofed: seen failing with its own sentence, passing when restored. Requires hub v0.116.0 for the two new event types. MinAgent unchanged (0.131.0). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
37 lines
1.5 KiB
Go
37 lines
1.5 KiB
Go
package api
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// R-536 — the ACCEPT-time path must not claim the app is installed.
|
|
//
|
|
// The router holds a concrete *notify.Notifier, so there is no seam to fake here; the claim is
|
|
// therefore asserted where it actually lives — in the source of the deploy handler. This is the same
|
|
// shape as the stacks package's AST test, and it exists for the same reason: the defect was not a
|
|
// wrong value, it was a call in the wrong place.
|
|
//
|
|
// What it pins: the deploy handler (which writes 202 „Telepítés elindítva" and returns, while the
|
|
// compose up runs afterwards) may announce that the install STARTED, and may not announce that it
|
|
// finished. The finishing half is stacks.deployDoneHook → main.go → NotifyAppDeployed, pinned by
|
|
// TestDeployDoneHook_FiresAtTheEndAndSaysWhichEndItWas.
|
|
//
|
|
// Red-proof: put `r.notifier.NotifyAppDeployed(name, displayName)` back beside the 202 → this fails.
|
|
func TestDeployAcceptance_DoesNotClaimTheAppIsInstalled(t *testing.T) {
|
|
src, err := os.ReadFile("router.go")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
body := string(src)
|
|
|
|
if strings.Contains(body, "NotifyAppDeployed(") {
|
|
t.Fatal("the deploy handler announces an INSTALLED app at accept time — the install has not run yet; " +
|
|
"an interrupted deploy then stands on the timeline as a completed one (measured 2026-09-16, mealie)")
|
|
}
|
|
if !strings.Contains(body, "NotifyAppDeployStarted(") {
|
|
t.Fatal("the acceptance is no longer recorded at all — the timeline loses the fact that the customer asked for this app")
|
|
}
|
|
}
|