Repository navigation
Document safe-output data for persistent review state - #69437
Merged
Merged
Conversation
Co-authored-by: pelikhan <[email protected]>
Copilot
AI
changed the title
[WIP] Fix safe-output comments to allow hidden machine-readable state
Document safe-output data for persistent review state
Oct 16, 2026
Collaborator
|
@copilot resolve the merge conflicts in this pull request |
…idden-state # Conflicts: # docs/src/content/docs/reference/safe-outputs.md Co-authored-by: pelikhan <[email protected]>
Contributor
Author
Merged |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The recovery guidance references a workflow marker that published review comments do not contain.
1 open finding
What changed in this PR
Documents how gh-aw workflows can persist incremental-review baselines using existing safe-output structured data.
Changes:
- Add a schema-backed baseline example and cross-run recovery guidance.
- Add regression tests for JSON preservation and HTML-marker removal with footers enabled and disabled.
| File | Description |
|---|---|
| docs/src/content/docs/reference/safe-outputs.md | Explain structured state publication and recovery. |
| actions/setup/js/add_comment.test.cjs | Test baseline preservation under both footer settings. |
🧠 Review effort: Max
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| } | ||
| ``` | ||
|
|
||
| On a later run, including an `issue_comment`-triggered run, read the PR's comment history and parse the fenced JSON following "Structured data:" in the latest matching review comment. Filter by the expected comment author and [workflow marker](#searching-for-workflow-created-items). Validate the recovered SHA against the target PR before using it as a baseline. The state persists in the posted comment; `data` does not automatically restore it or provide a separate cross-run store. Do not put secrets in `data`. |
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Safe-output sanitization strips HTML markers, breaking incremental reviews that store baseline SHAs in them. Existing
safe-outputs.datapreserves structured state as visible JSON—not hidden metadata.The agent supplies
data: {"reviewed_sha": "<sha>"}alongsidebody; later runs recover it from the posted comment’s fenced JSON.