Repository navigation
docs(research): PR change-risk assessment skill and evaluation - #1296
Draft
cipherstash-agent wants to merge 14 commits into
Draft
cipherstash-agent wants to merge 14 commits into
cipherstash-agent wants to merge 14 commits into
Conversation
Research directory for PR change-risk assessment. Adds the portable change-risk skill (references, JSON schema, evidence collector, validator, renderer, tests), the evaluation harness, a 41-PR corpus with ground truth written before any run, CodeScene and PR-Agent research, an inactive advisory CI proposal, and the dev-split and first holdout runs. No production code changes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
…endation Condition A runs and labels for all 31 holdout PRs, filled comparison (tables, defect matrix, examples, cost, stability), PR-Agent not-run note, and post-scoring changes recorded in the methodology. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Re-labels all 376 holdout findings with an isolated adjudicator that does not see the first labels or evaluator names, and reports agreement beside the pre-registered results. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdnRQm74SDEuDk6YTRTECA
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
…publishing - Headline impact aggregates material scenarios only; a louder speculative hypothesis is named beside the headline instead of setting it. The risk model now states one rule (validator revision 1.2, skill 1.2.0). - Cargo dependency evidence is read with tomllib (expanded, inline, target-specific and workspace tables); unparseable manifests are reported as unparsed rather than guessed. - validate_assessment.py gains --expected-base/--expected-head; the inactive example workflow pins both revisions in assess and publish. - The example workflow uses Edit(//abs/path) file rules and no longer denies bare Edit, which blocked writing the assessment; a full dry run is now an activation condition. - render_report.py escapes untrusted text (Markdown, HTML, @-mentions) and shows paths and commands as safe code spans. - New test-change-risk-skill.yml runs the skill's unit tests in CI. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EeBHy7SMfAdAoRkhxwyZ75
This branch has not been deployed
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.
Summary
Before: there was no tool that tells a reviewer how risky a pull request is to release, as opposed to line-by-line review comments.
After:
change-risk-research/holds achange-riskagent skill and the evaluation behind it. The skill is a set of instructions plus small scripts that Claude Code follows when asked to assess a PR. It writes a short report: how much damage the change could do, whether it needs a closer look, and the specific ways it could break. The skill was tested on 41 historical PRs from this repository and compared with CodeRabbit and a rule-based baseline.How: each historical PR was rebuilt as reviewers saw it before merge, in an isolated sandbox with no later history. The skill assessed it, and its findings were scored against bugs this repository fixed later. All findings were then scored a second time, blind.
Nothing here runs anywhere. It adds no CI workflow, changes no product code, and ships nothing to customers. The skill sits in
change-risk-research/.agents/skills/, not in the rootskills/directory that ships in thestashnpm package, so no changeset is needed.Changes
change-risk-research/.agents/skills/change-risk/. ContainsSKILL.md, references, a JSON schema for the report, an evidence collector, a validator, a renderer and unit tests.docs/final-recommendation.mdandeval/comparison.md.research/methodology.md, fixed before scoring. Research on PR-Agent (Qodo) and CodeScene is inresearch/.docs/ci-integration.md, with an inactive example workflow underdocs/examples/. It is deliberately not in.github/workflows.eval/. Holds the corpus, ground truth, every run's assessment and gzipped transcript, and both sets of labels.harness/, the Python scripts that build cases, run them and score them.Headline results (31 holdout PRs)
The recommendation is to use it on demand alongside CodeRabbit, and not to gate merges on it.
Verification
pnpm run code:check: no errors (warnings and infos only, which CI allows).pnpm run test:scripts: 1415 passed, 1 skipped. One earlier run failed once, ingo-module-path.test.mjs; three reruns of that file and two full reruns passed. I could not reproduce the failure.cd change-risk-research/.agents/skills/change-risk/scripts && python3 -m unittest discover -s tests.Review notes
eval/change-risk/results/andeval/adjudication-blind/raw/. They are the audit trail showing that no run saw later fixes. They could be dropped before merge if repository size matters more.docs/final-recommendation.md, theneval/comparison.md.Generated by Claude Code