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:
@@ -0,0 +1,27 @@
|
||||
package tui
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.a-wan.net/alan/pipelines/internal/protocol"
|
||||
)
|
||||
|
||||
func TestArtifactsDeliverablesLeadAndDebugFilesAreMarked(t *testing.T) {
|
||||
artifacts := []protocol.StageArtifact{
|
||||
{Name: "input.md", ContentType: "text/markdown", Group: protocol.ArtifactGroupDebug},
|
||||
{Name: "history.md", ContentType: "text/markdown", Group: protocol.ArtifactGroupDebug},
|
||||
{Name: "public/report.png", ContentType: "image/png", Group: protocol.ArtifactGroupDeliverable},
|
||||
}
|
||||
ordered := deliverablesFirst(artifacts)
|
||||
if ordered[0].Name != "public/report.png" || ordered[1].Name != "input.md" || ordered[2].Name != "history.md" {
|
||||
t.Fatalf("order = %+v", ordered)
|
||||
}
|
||||
widths := artifactWidthsFor([]artifactVisit{{artifacts: ordered}})
|
||||
if row := artifactRowText(ordered[1], widths, 100, false); !strings.Contains(row, "[dbg] input.md") {
|
||||
t.Fatalf("debug row not marked: %q", row)
|
||||
}
|
||||
if row := artifactRowText(ordered[0], widths, 100, false); !strings.Contains(row, "[img] public/report.png") {
|
||||
t.Fatalf("deliverable row: %q", row)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user