fix(review): isolate review.profile from consensus prompts#1391
fix(review): isolate review.profile from consensus prompts#1391JSONbored wants to merge 3 commits into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
review.profile is a presentation-only tone knob and must never influence the consensus-defect path the gate consumes. Split buildSystemPrompt with an options.includeProfile flag and compute two prompts in runGittensoryAiReview: advisorySystem (with profile) and consensusSystem (profile-free). Route the advisory/BYOK leg to advisorySystem and the block-mode Workers-AI consensus reviewers to consensusSystem; when a profile diverges the prompts, do not reuse the profile-tainted advisory review as a consensus opinion (run a fresh profile-free leg instead). Bill the neuron estimate against each effective prompt. Add a regression test proving an assertive profile reaches the advisory prompt but neither block-mode consensus prompt.
c428610 to
fe77d61
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1391 +/- ##
=======================================
Coverage 95.38% 95.38%
=======================================
Files 201 201
Lines 21598 21603 +5
Branches 7807 7810 +3
=======================================
+ Hits 20601 20606 +5
Misses 416 416
Partials 581 581
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review — held for maintainer review
⏸️ Held for maintainer review
Nits — 2 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
|
Closing — this guards a path the prompt already prevents. The |
Motivation
.gittensory.ymlreview.profileinto the single system prompt used for both advisory write-ups and block-mode consensus reviewers, allowing a maintainer presentation knob to influence gate-producing consensus outputs.review.profileis intended to be PRESENTATION ONLY and must never affect the consensus-defect path that the gate consumes.Description
options.includeProfileflag tobuildSystemPromptso callers can opt out of appending thereview.profilesuffix.runGittensoryAiReview:advisorySystem(includesreview.profile) andconsensusSystem(explicitly excludes the profile), and route advisory/BYOK calls toadvisorySystemand block-mode Workers-AI consensus calls toconsensusSystem.review.profilechange consensus accounting.assertiveprofile affects the advisory prompt but not the two block-mode consensus prompts.Testing
npx vitest run test/unit/ai-review.test.ts --reporter=verbose, which passed (1 file, 41 tests, all green) including the new regression test.npm run typecheck, which completed successfully with no type errors.git diff --checkto ensure no whitespace/conflict markers; it passed.Codex Task