You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
governor-state.js's saveReputationHistory/loadReputationHistory store (a {decided, unfavorable} counter pair per repo) exists with a real schema and tested store methods, but nothing calls either anywhere in the real pipeline -- attempt-runner.js's own header names this exact gap: "Reputation/self-plagiarism state also has real persistence primitives (governor-state.js) but isn't auto-loaded here yet." Because of this, chokepoint.ts's selfReputationThrottle stage is always skipped (GovernorChokepointInput.reputationHistory is never supplied, and the stage is gated on input.reputationHistory !== undefined) -- meaning the self-reputation cadence throttle, one of the Governor's own documented defense layers, is silently inactive in every real deployment today.
A prerequisite for this issue just shipped in the same session: recordOwnSubmission's write side is now wired into attempt-cli.js (a real submission fingerprint + PR number is recorded on every real "submitted" outcome), so a real submission history now exists to derive reputationHistory from going forward.
Dependencies
None to start -- independently shippable. Builds on the now-real recordOwnSubmission/listRecentOwnSubmissions write path.
Requirements
Determine where the decided/unfavorable classification happens: a submission's live terminal outcome (merged vs. closed-without-merge) isn't known at submission time. loop-cli.js's own header references a real "PR-disposition poll (pr-disposition-poller.js, on a submitted outcome)" -- check whether that poller already resolves a terminal outcome and, if so, call governor-state.js's saveReputationHistory there: increment decided always, increment unfavorable only when the PR closed without merge (reuse rejection-state-machine.js's own isRejectedPr classification for consistency with the existing own-rejection-history trigger, Check a miner's own prior-rejection history on a repo (rejectionSignaled's second documented trigger) #5655).
Out of scope: changing selfReputationThrottle's own calculator logic (reputation-throttle.ts) or its default thresholds.
Deliverables / Acceptance Criteria
A real terminal-outcome classification updates governor-state.js's reputation-history store (decided always increments on a resolved outcome, unfavorable increments only on closed-without-merge)
buildAttemptGovernorContext receives and forwards a real reputationHistory instead of always leaving the field undefined
A repo with a real unfavorable-outcome streak measurably throttles cadence in a real chokepoint evaluation (regression test)
Test Coverage Requirements
This PR must ship with full test coverage for every changed line and branch -- the repo's Codecov patch gate requires 99%+ coverage and the house standard is to aim for 100%, including both sides of every conditional/nullish-coalescing branch introduced.
Expected Outcome
The self-reputation cadence throttle -- fully built and tested since Wave 3 -- finally receives real data instead of always skipping, closing a genuine safety gap before Wave 5 puts this on a paid, higher-stakes footing.
Links & Resources
packages/gittensory-miner/lib/attempt-runner.js's own header comment (the documented gap)
Context
governor-state.js'ssaveReputationHistory/loadReputationHistorystore (a{decided, unfavorable}counter pair per repo) exists with a real schema and tested store methods, but nothing calls either anywhere in the real pipeline --attempt-runner.js's own header names this exact gap: "Reputation/self-plagiarism state also has real persistence primitives (governor-state.js) but isn't auto-loaded here yet." Because of this,chokepoint.ts'sselfReputationThrottlestage is always skipped (GovernorChokepointInput.reputationHistoryis never supplied, and the stage is gated oninput.reputationHistory !== undefined) -- meaning the self-reputation cadence throttle, one of the Governor's own documented defense layers, is silently inactive in every real deployment today.A prerequisite for this issue just shipped in the same session:
recordOwnSubmission's write side is now wired intoattempt-cli.js(a real submission fingerprint + PR number is recorded on every real "submitted" outcome), so a real submission history now exists to derivereputationHistoryfrom going forward.Dependencies
None to start -- independently shippable. Builds on the now-real
recordOwnSubmission/listRecentOwnSubmissionswrite path.Requirements
loop-cli.js's own header references a real "PR-disposition poll (pr-disposition-poller.js, on a submitted outcome)" -- check whether that poller already resolves a terminal outcome and, if so, callgovernor-state.js'ssaveReputationHistorythere: incrementdecidedalways, incrementunfavorableonly when the PR closed without merge (reuserejection-state-machine.js's ownisRejectedPrclassification for consistency with the existing own-rejection-history trigger, Check a miner's own prior-rejection history on a repo (rejectionSignaled's second documented trigger) #5655).attempt-input-builder.js'sbuildAttemptGovernorContext(or its caller) to read the realreputationHistoryviagovernor-state.js'sloadReputationHistoryand pass it intoGovernorChokepointInput, the same optional-parameter-with-honest-fallback patternconvergenceInputalready uses (Track real per-issue attempt-history on the portfolio queue, feed the Governor's convergenceInput #5654).selfReputationThrottle's own calculator logic (reputation-throttle.ts) or its default thresholds.Deliverables / Acceptance Criteria
governor-state.js's reputation-history store (decidedalways increments on a resolved outcome,unfavorableincrements only on closed-without-merge)buildAttemptGovernorContextreceives and forwards a realreputationHistoryinstead of always leaving the fieldundefinedTest Coverage Requirements
This PR must ship with full test coverage for every changed line and branch -- the repo's Codecov patch gate requires 99%+ coverage and the house standard is to aim for 100%, including both sides of every conditional/nullish-coalescing branch introduced.
Expected Outcome
The self-reputation cadence throttle -- fully built and tested since Wave 3 -- finally receives real data instead of always skipping, closing a genuine safety gap before Wave 5 puts this on a paid, higher-stakes footing.
Links & Resources
packages/gittensory-miner/lib/attempt-runner.js's own header comment (the documented gap)packages/gittensory-engine/src/governor/reputation-throttle.tspackages/gittensory-miner/lib/governor-state.js'ssaveReputationHistory/loadReputationHistorypackages/gittensory-miner/lib/pr-disposition-poller.js