Repository navigation
Add share-safe proof report artifacts - #209
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds share-safe report generation across benchmark, compare, and review-compare: each proof run now writes a second artifact, report.share-safe.json, where paths and sensitive text are sanitized to stable placeholders while the full local report.json is preserved. ChangesShare-safe report generation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/infrastructure/compare.ts (1)
64-70:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftNative-agent compare still misses the new share-safe report contract.
This wires
report.share-safe.jsoninto the prompt-pack compare path only.--baseline-mode native_agentstill goes throughNativeAgentCompareReport/writeNativeAgentReport()and emits justreport.json, so one supported compare workflow does not get the advertised share-safe companion artifact.Also applies to: 273-304
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/infrastructure/compare.ts` around lines 64 - 70, The compare flow is not emitting the share-safe companion artifact for native-agent baseline mode; update the NativeAgentCompareReport implementation (and its writer function writeNativeAgentReport) to generate and write the share-safe report alongside report.json using the share_safe_report path defined in ComparePromptArtifactPaths, ensuring the same serialization/shape as report.share-safe.json produced by the prompt-pack path; also apply the same change to the other similar logic block referenced around the 273-304 region so both code paths produce the share-safe artifact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/infrastructure/benchmark/runner.ts`:
- Around line 253-291: The mapping into the share-safe report is using
cwd-relative values from localReportArtifacts, so toShareSafeArtifactPath falls
back to basenames for temp files; fix by resolving each artifact path to an
absolute path under shareSafeRoots.artifactRoot before calling
toShareSafeArtifactPath. In the block that builds the share-safe artifacts (the
Object.entries(localReportArtifacts).map(...) and the share_safe_report
assignment), detect non-absolute paths and resolve them against
shareSafeRoots.artifactRoot (e.g., via path.resolve or equivalent) then pass
that absolute path into toShareSafeArtifactPath; do the same for
artifacts.share_safe_report so writeFileSync writes absolute-rooted share-safe
entries.
In `@src/infrastructure/review-compare.ts`:
- Around line 157-164: rewriteShareSafeStderr currently only strips path-like
data via sanitizeShareSafeText but leaves credential-shaped values (e.g.
"OPENAI_API_KEY=...", "API_KEY=...", "Bearer ...") intact; update
rewriteShareSafeStderr (or add a helper used by it) to run an additional
credential-redaction pass on stderr values using conservative regexes that match
common env-assignment and bearer/token patterns (keywords like API_KEY, SECRET,
TOKEN, PASS, KEY and "Bearer <token>") and replace the secret portions with a
fixed mask (e.g. "<REDACTED>") either before or after calling
sanitizeShareSafeText; reference the existing function name
rewriteShareSafeStderr and reuse or extend
sanitizeShareSafeText/ShareSafePathRoots so all branches (verbose/compact)
return redacted, share-safe output.
---
Outside diff comments:
In `@src/infrastructure/compare.ts`:
- Around line 64-70: The compare flow is not emitting the share-safe companion
artifact for native-agent baseline mode; update the NativeAgentCompareReport
implementation (and its writer function writeNativeAgentReport) to generate and
write the share-safe report alongside report.json using the share_safe_report
path defined in ComparePromptArtifactPaths, ensuring the same
serialization/shape as report.share-safe.json produced by the prompt-pack path;
also apply the same change to the other similar logic block referenced around
the 273-304 region so both code paths produce the share-safe artifact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 57bee4f3-e576-4c25-af20-dc2f8b87350c
📒 Files selected for processing (10)
CHANGELOG.mddocs/proof-workflows.mddocs/tutorials/getting-started.mdsrc/infrastructure/benchmark/runner.tssrc/infrastructure/compare.tssrc/infrastructure/review-compare.tssrc/shared/share-safe-artifacts.tstests/unit/benchmark.test.tstests/unit/compare.test.tstests/unit/review-compare.test.ts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed the remaining review follow-ups in 21ec37f.
|
Summary
report.share-safe.jsonartifacts for compare, review-compare, and runner-backed benchmark flows://, andfile://edge casesCloses #189
Testing
Summary by CodeRabbit
New Features
report.share-safe.jsonoutput for compare, review-compare, and benchmark --exec runs: sanitized, placeholder-based paths for safe sharing while keeping full localreport.json.Documentation
Tests