Artifacts: runner-internal turn files move to a Debugging files group

Each recorded artifact now carries a server group (deliverable or debug).
public/ files are deliverables; input/memory/history/output.md, session
exports and private/ scratch are debugging files. The app's Artifacts tab
lists deliverables and the Debug toggle reveals a separate Debugging files
group (older servers fall back to the filename rule); the TUI lists
deliverables first and marks debug rows; artifact search excludes debug
files unless include_debug / --debug-files is set.
This commit is contained in:
2026-11-04 17:43:47 +00:00
parent b5927505cc
commit 57f5219628
24 changed files with 541 additions and 30 deletions
@@ -83,6 +83,15 @@ JsonMap probeRunDetail() => {
'size_bytes': 4096,
'url': '/artifacts/7/2/release-dashboard.html',
},
if (_turnFiles)
for (final name in _turnFileNames)
{
'name': name,
'content_type': 'text/markdown',
'size_bytes': 640,
'url': '/artifacts/7/2/',
'group': 'debug',
},
],
'file_changes': _probeChanges([
'lib/release/train.dart',
@@ -138,6 +147,18 @@ int _fillerStepCount = 0;
/// serves its bytes from the build directory (see notes/artifact-fullscreen.md).
bool _htmlArtifact = false;
/// `?turn=1` adds the runner-internal turn files the server records for a model
/// visit (group `debug`) to run 7's build visit, so the Artifacts tab's hidden
/// Debugging files group can be reviewed.
bool _turnFiles = false;
const List<String> _turnFileNames = [
'input.md',
'memory.md',
'history.md',
'output.md',
'private/build-log.md',
];
List<JsonMap> _fillerSteps() => [
for (var i = 0; i < _fillerStepCount; i++)
{
@@ -618,6 +639,7 @@ class _FixtureSink implements WebSocketSink {
/// `?runs=200` / `?steps=60` append filler runs / run-7 steps for scroll
/// performance captures;
/// `?html=1` adds an HTML artifact to run 7 (`release-dashboard.html`);
/// `?turn=1` adds run 7's debug turn files (input/memory/history/output.md);
/// `?q=release` types that query into Search once its field is shown;
/// `?platform=cupertino` renders the Cupertino host (`material`, the
/// default, renders Material as browsers do);
@@ -650,6 +672,7 @@ void main() {
_fillerStepCount = int.tryParse(params['steps'] ?? '') ?? 0;
probeUsage = params['usage'] == '1';
_htmlArtifact = params['html'] == '1';
_turnFiles = params['turn'] == '1';
final cupertino = params['platform'] == 'cupertino';
final route = params['route'];
final opensRoute = route != null && route.startsWith('/');