Skip to content

Show saved-value warnings with plain paths and links in the terminal - #3224

Open
Howard-149 wants to merge 1 commit into
promptdriven:mainfrom
Howard-149:fix/2953-plain-terminal-warnings
Open

Howard-149 wants to merge 1 commit into
promptdriven:mainfrom
Howard-149:fix/2953-plain-terminal-warnings

Conversation

@Howard-149

@Howard-149 Howard-149 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2953.

Status

  • Rebased onto main 02db5b9 (Nov 16). The patch is unchanged; only the hashes and two context lines from main moved (see Interface).
  • CI: since 0.1.33, CI installs the private promptdriven/runtime-client. A fork PR gets no RUNTIME_CLIENT_DEPLOY_KEY, so install-smoke and the test shards stop at the install step ("No configured secret has read access to promptdriven/runtime-client") before any test runs. Could you run CI with the secret, or rerun it from a branch in this repo?
  • Fix malformed corpus declaration validation precedence #3218 is still open and also edits prompts/cli/workflow-replay.prompt.md. Whichever merges second needs a rebase and interface re-approval.

Problem

Saved-value warnings in the command output used the PR body's escaping, so the terminal showed tests/add.json and https://… instead of plain paths and links.

Change

  • prompts/cli/workflow-replay.prompt.md: the Markdown, HTML and separator escaping is for the PR body only. With option terminal true, warnings keep the JSON form, Unicode escapes and inert markers, and show paths and links as plain text.
  • src/workflow-replay.mjs: formatReplayEvidence(result, {terminal}). The PR form is built on the same plain form, so it is unchanged.
  • src/workflow-runner.mjs: the two command-output call sites pass terminal: true. The PR-body call sites are unchanged.

Before / after in the terminal:

warning: Saved test values changed: tests/add.json /steps/0/checks/0/value 3 -> 999
warning: Saved test values changed: tests/add.json /steps/0/checks/0/value 3 -> 999

Interface

The prose change makes the approved Runtime interface of workflow-replay.prompt.md stale, so it is draft again and needs re-approval. After the rebase, prose_sha256 is 08c72da1… and the header in src/workflow-replay.mjs is the behavior hash 8b0758bc… (#3200). I could not run pdd test --fill-hash or pdd owner here, because both now need @promptdriven/runtime-client. I computed both values with the same rules as the pre-split code (proseSha256 from runtime-preflight.mjs at bce70f6, promptHeaderHash from file-owner.mjs), and checked those rules first: they reproduce main's recorded 1e33b057… / f9778f1a… and this branch's earlier e472fee8… / 4caf4584… exactly.

In src/workflow-runner.mjs, main's new noPublish and localPublication conditions are kept; this PR only adds terminal: true there.

Tests

  • New 2953 unit test: the terminal form shows tests/add_one.json and "https://example.com/a?x=1&y=2" as typed, keeps pdd-workflow: and ​ escaped, and the PR form still escapes.

  • The 2870 runner test now checks the terminal message reads tests/add.json /steps/0/checks/0/value 3 -> 999 with no /.

  • A/B on the same new test (node --import ./test/helpers/test-home.mjs --test --test-name-pattern='^2953:' test/workflow-replay.test.mjs), on the last base that has the Runtime code in this repo:

    Code Result
    A: src/ and prompts/ from main bce70f6 ✖ fail
    B: this change on bce70f6 (54cf46c) ✔ pass

    On the new base 02db5b9 I can't run it: the replay path calls gitFiles, format and other functions that now live in the private package. git range-diff shows the rebased patch is the same apart from the hashes and main's context lines.

  • Before this rebase, on main bce70f6: workflow-replay, workflow-runner, workflow-base-corpus, workflow-pr-publication and file-owner gave 340/341 pass. The one failure, 3088 repair 1: scenario-only publication…, also fails on main 9341f3b.

  • Full suite before the first rebase (macOS, mock keychain): branch 8,286/8,389 pass, main 9341f3b 8,274/8,388 pass. Every branch failure also fails on main, except four that pass on rerun.

The rebases kept #3150's exact large numbers in the warning line.

Question

A Try link inside a saved value now shows as a plain link in the terminal (it is still escaped in the PR). Command output is local, so I think that is fine, but the prompt asks to sanitize Try capabilities in displayed details. Should the terminal form remove Try links instead?

Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

The Markdown, HTML and separator escaping in formatReplayEvidence is for the
PR body. The runner's command output now passes terminal: true, so warnings
keep the JSON form, Unicode escapes and inert markers but show tests/add.json
instead of tests&promptdriven#47;add.json. Fixes promptdriven#2953.

This branch has not been deployed

No deployments
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.

Changed test-value warnings show escaped slashes (/) in the terminal

2 participants