Skip to content

feat: report test run results as a structured value - #795

Open
Quenty wants to merge 2 commits into
mainfrom
users/jamesonnen/structured-test-results
Open

feat: report test run results as a structured value#795
Quenty wants to merge 2 commits into
mainfrom
users/jamesonnen/structured-test-results

Conversation

@Quenty

@Quenty Quenty commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Test runs can now hand back a structured result instead of only printed output: a script's return value travels on ScriptRunResult.returnValues, filled in by the Open Cloud transport from the task's output.results and by the local transport from what the Studio bridge plugin marshals off the executed script. The field is absent rather than empty when a transport delivered no result at all, so a later consumer can tell "nothing came back" apart from "the script returned nothing" and fall back to log parsing only in the first case. Nothing reads the new field yet — this is the transport only, and it also corrects LuauTask.output, which claimed a { value?: string } wrapper that Open Cloud never sends.

Quenty added 2 commits August 10, 2026 17:29
An executed script's return value had nowhere to go: the plugin discarded
everything pcall handed back, and a caller could only learn what a run
produced by reading its printed output. Anything a caller must read back
exactly — test counts, for instance — had to be scraped out of log text.

The plugin's execute action now marshals every returned value onto
scriptComplete's payload.returnValues, and it surfaces on both ExecResult
and StudioBridgeResult. Tables are walked recursively (array-like tables
stay arrays), Roblox datatypes reuse the SerializedValue shapes, and
cycles, over-deep nesting and non-finite numbers are marked rather than
producing JSON the server cannot decode. The field stays absent whenever
no scriptComplete arrived, which keeps "we never learned what it
returned" distinct from "it returned nothing".

Nothing consumes the new field yet.
…sult

Test runs learn everything about themselves by scraping the engine's log
output, and Open Cloud truncates those logs on a long run — a script
printing 20,001 lines came back with 7,627 of them, and the window size
varies, so there is no threshold to stay under. Results have to travel as
a value instead of as text.

ScriptRunResult gains returnValues, filled in by both transports: the
cloud context reads the task's output.results, the local context takes
what the Studio bridge marshalled. LuauTask.output was typed as an array
of { value?: string } wrappers, which does not exist — the results are a
flat array of natively typed values, so a returned Lua table is real
nested JSON. Nothing read it, so nothing noticed.

returnValues is absent, not empty, when a transport delivered no result
at all: an oversize return value fails a cloud task outright rather than
truncating it (~4MB fails, ~2MB arrives intact), leaving no output and no
error message, and a later consumer needs to tell that apart from a
script that returned nothing so it knows when falling back to the logs is
worth it.

Nothing consumes the new field yet.
@Quenty
Quenty deployed to integration August 11, 2026 00:30 — with GitHub Actions Active
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Results

ℹ️ No changed packages with deploy targets were discovered for this PR. · View logs

Test Results

ℹ️ No changed packages with test targets were discovered for this PR. · View logs

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.

1 participant