Publish outputs to checked destinations and preserve failure evidence
This commit is contained in:
@@ -34,12 +34,12 @@ func Markdown(snapshot Snapshot) []byte {
|
||||
fmt.Fprintf(&b, "Recoveries: %s of %s model operations \n", showCount(snapshot.Summary.Recoveries), showCount(snapshot.Summary.LLMOperations))
|
||||
fmt.Fprintf(&b, "Proposal responses: %s; with filtering: %s\n\n",
|
||||
showCount(snapshot.Summary.ProposalResponses), showCount(snapshot.Summary.ProposalResponsesWithFiltering))
|
||||
fmt.Fprintf(&b, "Transcript input: %s \n", escapeMarkdown(snapshot.TranscriptPath))
|
||||
fmt.Fprintf(&b, "Transcript input: %s \n", stageCellEscaper.Replace(html.EscapeString(snapshot.TranscriptPath)))
|
||||
output := snapshot.OutputPath
|
||||
if output == "" {
|
||||
output = "stdout"
|
||||
}
|
||||
fmt.Fprintf(&b, "Transcript output: %s\n\n", escapeMarkdown(output))
|
||||
fmt.Fprintf(&b, "Transcript output: %s\n\n", stageCellEscaper.Replace(html.EscapeString(output)))
|
||||
|
||||
fmt.Fprintln(&b, "## Work-unit errors")
|
||||
fmt.Fprintln(&b)
|
||||
|
||||
@@ -119,6 +119,22 @@ func TestStageIDIsLiteralInMarkdownAndExactInYAML(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestMarkdownTreatsTranscriptPathsAsLiteralText(t *testing.T) {
|
||||
snapshot := Snapshot{
|
||||
TranscriptPath: "incoming/[raw](https://example.invalid)/_input_ <part>.json",
|
||||
OutputPath: "out/*file*\\name\nsecond",
|
||||
}
|
||||
rendered := string(Markdown(snapshot))
|
||||
for _, want := range []string{
|
||||
`incoming/\[raw\](https://example.invalid)/\_input\_ <part>.json`,
|
||||
`out/\*file\*\name<br>second`,
|
||||
} {
|
||||
if !strings.Contains(rendered, want) {
|
||||
t.Fatalf("missing escaped path %q in:\n%s", want, rendered)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func markdownTableRows(text string) []string {
|
||||
var rows []string
|
||||
for _, line := range strings.Split(text, "\n") {
|
||||
|
||||
Reference in New Issue
Block a user