hub: review fix 5 — a window request the hub cannot read is 400; every answer says accepts_ended (version skew)
- POST /offsite/window-open answered 200 on a body it could not parse and decided the window on „count 0”; now 400 (the empty body of the oldest boxes is still „no count”). - Every answer carries accepts_ended, granted or not: a box sends its end records only to a hub that said so, so a new box never sends a large request to an older hub that reads 4 KiB. Carries the red-proof of both halves (the controller's is the next commit there). Tests seen red; 3 hub mutations seen red, 1 after a redo. Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
6d2d4bd09d
commit
45848f6ee4
8 files changed
+168
-5
No files matched your search
@@ -55,6 +55,7 @@ type fakeKeySvc struct {
|
||||
gotPub string
|
||||
gotFP string
|
||||
gotEnded []offsitekeys.EndedClaim
|
||||
opened int
|
||||
err error
|
||||
}
|
||||
|
||||
@@ -68,6 +69,7 @@ func (f *fakeKeySvc) ConfirmKey(_ context.Context, _ string, fp string) (int, er
|
||||
}
|
||||
func (f *fakeKeySvc) OpenWindowFor(_ context.Context, _ string, _ int, ended ...offsitekeys.EndedClaim) (offsitekeys.WindowGrant, error) {
|
||||
f.gotEnded = ended
|
||||
f.opened++
|
||||
return offsitekeys.WindowGrant{Granted: false, Reason: "not due"}, f.err
|
||||
}
|
||||
func (f *fakeKeySvc) CloseWindowFor(context.Context, string, offsitekeys.WindowResult) error {
|
||||
|
||||
Reference in new issue
Block a user