9 Commits

Author SHA1 Message Date
Matt Stevens
4efb2d7c5e This test is shit 2026-07-30 17:55:19 +01:00
Gamah Gamerson
42cee6807d Http.RequestStreamAsync: stream the response instead of buffering it
RequestStreamAsync went through RequestAsync, which sends with the
default HttpCompletionOption.ResponseContentRead - so the whole body was
downloaded before the task resolved, and the "stream" handed back was
the buffer. A response that never ends (NDJSON, SSE, a chunked long
poll) therefore never resolved at all.

It also did `using var response`, disposing the response and with it the
content stream, before returning that stream to the caller. That second
bug hid the first: you could not read the stream far enough to notice
the buffering.

Send with ResponseHeadersRead and return a stream that owns the
HttpResponseMessage and disposes it with itself. RequestAsync's
signature is untouched, so no Sandbox.Access change is needed, and the
consumer side (System.IO.Stream.*, StreamReader) was already
whitelisted. Validation is unaffected: SboxHttpHandler runs
Http.IsAllowedAsync before every send, redirects included, all before
the headers come back.

WebTests.HttpStreamTest serves paced chunked NDJSON on localhost:8080 (a
port Http.IsAllowed accepts) and asserts the call returns before the
body ends, that the lines arrive spread across it rather than at once,
and that a non-2xx still throws.
2026-07-30 17:55:19 +01:00
Alex Guthrie
36e207de0c CSS Isolation Property (#5351) 2026-07-30 15:46:09 +01:00
sboxbot
d51e726fc2 Preserve survivor hierarchy during non-additive scene loads (#5287)
Co-authored-by: Josh Mobley <8387317+deadmonstor@users.noreply.github.com>
2026-07-08 08:10:33 +01:00
Lorenz Junglas
fad06b476f Fix nested prefab instances getting wiped when applying changes (#5232)
* Add tests for applying added prefab instances to prefabs

* Fix nested prefab instances getting wiped when applying changes

Prefab update serialization only kept instance data for nested roots sitting directly under the instance root, deeper ones (under group objects) got their mappings wiped in the prefab cache scene where they can't be rebuilt.
Also only convert children to nested after applying, flagging the applied root itself made it get silently adopted when dragged into another instance later.
2026-07-02 12:29:14 +02:00
Lorenz Junglas
5a1fb77116 ! Fix malformed package exception (#5151)
* !Extra validation for visibility origins

* !Warn instead of throwing when receiving malformed packet

Makes sure the server is still able to process other messages

* !Add test for malformed packet handling

* ! Cherry pick some try catch cleanup from #5195

* ! Tests can no longer check for exceptions

* ! Make sure chunk assembly self heals after exception
2026-06-30 11:52:24 +02:00
Lorenz Junglas
da9ee038db Don't persist runtime flags (#5136)
* Don't persist runtime flags

We already dropped some flags when deserializing,
but really we should also prevent them from serializing in the first place.

This will prevent runtime flags like Loading (envmap probe) messing with prefab diffs.

Full flag set is still serialized when networking the object.
2026-06-25 10:30:16 +02:00
Lorenz Junglas
01e494b65a Fix nested prefab instances after break/reparent (#5097)
* Add test ensuring nested prefabs have valid mappings after unlinking there parent

* Initialize nested mappings in PostSerialize

InitMappingsForNestedInstance ran during deserialization before the object's id and children were set, so loaded nested instances got a lookup keyed by stale temporary ids.
Defer building those mappings to PostDeserialize.
2026-06-18 08:46:10 +02:00
Garry Newman
d95169d8fa Unit Test Cleanup (#5064)
* Move all unit tests to Engine/Tests
* Fix Margin.EdgeSubtract
* Fix Capsule.Contains
* EnvironmentVariables.Remove if it's null
* Fixed ray trace never returning startedsolid
* Fix HistoryList.Navigate on empty list
* Fix GameObject.WorldPosition accepting NaNs
* Fix flex: initial expanding to the wrong grow/shrink
* Translation.TryConvert shouldn't throw on invalid enum strings
* Skip sound file tests on machines with no audio device
2026-06-12 13:23:50 +01:00