Repository navigation
PR conversation context + learning from human feedback (2.4.0) - #56
Merged
Merged
Conversation
- Fetch commit messages, PR comments and emoji reactions (GitHub, GitLab, local commits) and inject them into summary, scope, code_review, doc and audit signatures (declared only when non-empty; untrusted, fenced). - Extract human verdicts on codespy's earlier inline findings (reactions, replies, resolved), suppress rejected findings, show feedback to the reviewers, and retain it as per-scope `feedback` episodes (semantic memory gets observations only; unchanged feedback skipped by hash). - Self-exclusion: hidden codespy markers, comments classified codespy/bot/human at fetch time, findings trusted only when posted by the token's own account (forged markers ignored). - New `codespy learn <pr_url>` (also Action `command: learn`, `make learn` / `make docker-learn`). - New `review.pr_context` settings (feedback toggle + size caps) exposed in codespy.yaml, .env.example, action.yml, example workflow and docs.
Add review.pr_context.trusted_authors (default ["github-actions[bot]"]): accounts besides the token's own that are trusted as codespy when verifying who posted a finding. Fixes `codespy learn` with a personal token ignoring reviews posted from GitHub Actions. Exposed in codespy.yaml, .env.example, action.yml, example workflow and docs.
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
codespy now reads the PR conversation (commit messages, comments and emoji reactions) and learns from how humans react to its own findings.
PR conversation context
👍2 👎1) go to summary, code_review, doc and audit.run_rlmis declared (guards against the 2.3.1 class of bug). Fetching soft-fails per part.Human feedback on codespy's findings
accepted,rejected,discussedorresolved.feedbackepisode is saved per scope. Cerebral retains only the Distiller's observations; the raw feedback and its hash stay in the episodic store. Unchanged feedback is skipped viaEpisodeStore.latest_artifact.codespy learn <pr_url>harvests and retains feedback without posting anything. It is also available as the Action inputcommand: learnand asmake learn/make docker-learn.Self-exclusion and security
<!-- codespy:review ... -->,<!-- codespy:issue ... fp=... -->.codespy,botorhumanonce, at fetch time. Only human text is rendered. Feedback keeps only the identity of a codespy finding, never its description or suggestion. Quotes and markers are stripped from replies, and a final guard drops anything that still looks like codespy output.Config:
review.pr_contextfeedbacktrue(setfalseon open source)max_commits50max_comments100max_comment_chars1000max_block_chars12000These are exposed in
codespy.yaml,.env.example,action.yml(inputs, env and Docker args), the example workflow and the docs.tests/test_pr_context_exposure.pykeeps them in sync.Version bump: 2.4.0. The CHANGELOG has Added and Security sections.
Testing
mainbefore this change; the set is identical with and without this PR.codespy learntwice; the second run should skip because the feedback is unchanged.Notes
command: learnneeds a released 2.4.0 image, and memory that persists between jobs (external Postgres).pr-context-feedback: 'false'there.