ledger-signals: add reviewBacklogSize (open, unmerged candidate PR count) - #109
Draft
ruvnet wants to merge 2 commits into
Draft
ledger-signals: add reviewBacklogSize (open, unmerged candidate PR count)#109ruvnet wants to merge 2 commits into
ruvnet wants to merge 2 commits into
Conversation
…unt) zeroMergeStreak (boolean) cannot distinguish "nothing proposed lately" from "N candidates open and unreviewed" -- both read the same. Live check tonight: 5 open dream/* PRs (#105, #103, #101, #100, #98), 0 merged since #24 (2026-08-26), matching 16+ consecutive zeroMergeStreak=true nights in LEDGER.md. Add an optional, caller-supplied openCandidateCount -> reviewBacklogSize (nullable number, default null) to learningSignals(), wired through `ledger signals --open-count N` and `tui --open-count N`, same fail-closed flag parsing as the existing --merged. Purely additive: every other signal is unchanged when the option is omitted (asserted directly in tests). See docs/dream-cycle/2026-09-11-ledger-signals-report.md for the full evidence, evaluation receipt, and competitor analysis. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MCVdVup9eCLe8mdKc2LoSq
Issue #108, PR #109. See docs/dream-cycle/2026-09-11-ledger-signals-report.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MCVdVup9eCLe8mdKc2LoSq
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.
Hypothesis
Given the Dream Machine's self-hosting nightly cycle, when a
reviewBacklogSizefield (nullable, caller-supplied open-candidate-PR count) is added tolearningSignals()'s output, then a night or human readingledger signals/tuioutput gains direct visibility into review-queue depth, subject to: (a) zero change to any existing signal's value when the new option is omitted, (b) no change tolearningSignals()'s purity (still no I/O — caller supplies the count, same asmergedPrNumbers), and (c) full test coverage at both the library and CLI layer.Candidate
zeroMergeStreak(boolean) can't distinguish "nothing proposed lately" from "N candidates open and unreviewed" — both read the same. Live tonight: 5 open, unmergeddream/*PRs (#105, #103, #101, #100, #98), 0 merged since #24 (2026-08-26), matching 16+ consecutivezeroMergeStreak=truenights inLEDGER.md.packages/ledger/src/index.ts:SignalOptions.openCandidateCount?: number→LearningSignals.reviewBacklogSize: number | null(defaultnull, purely additive).packages/cli/src/index.ts:--open-count Nonledger signalsandtui, same fail-closed parsing discipline as the existing--mergedflag (value-less/non-numeric → usage error, notNaN/crash).packages/cli/src/tui.ts:⚠ N candidate PR(s) open, unreviewedfooter line whenreviewBacklogSize > 0.<300 changed lines, one conceptual change. No ADR — this is a parameter/feature addition, not an architectural decision (per STEP 19's own "never for parameter changes" guidance).
Evaluation Receipt
Real evaluator (
npm test= vitest + governance), same corpus, parent then candidate:Live end-to-end against the real ledger:
Every other field matches the
--open-count-less run exactly (live check + dedicated unit test asserting structural equality modulo the new field).Baseline
Parent commit
3edd426f6c9c4b1e80235f7447dc863e749345cc, unmodified, same evaluator/corpus as above.Darwin Lineage
Not run — unrelated surface, and
evaluatorEntrypoints.darwin(unpinnednpx @metaharness/darwin) is already independently flagged as live-but-buggy (2026-09-07 ledger row). Deliberately skipped rather than adding supply-chain exposure for no evidentiary value.Evidence
dream/*PRs at session start, 0 merged since fix(compile): enforce documented hourly cron floor #24.reviewBacklogSizeecho verified live + unit.Reward-Hack Check
No test/threshold/gold-data change; 11 new tests added, 0 existing tests modified; field is informational-only (no gating logic); no ledger-schema change.
Security Review
No new I/O/filesystem/network/credential surface.
--open-countis a bounded, fail-closed non-negative-integer parser, same shape as the existing--mergedflag.Regression Analysis
627/627 vitest (was 616/616) + 81/81 governance (unchanged) + clean typecheck/lint. All 11 new tests are additive; no existing test was touched.
ADR
None — parameter/feature addition, not an architectural decision.
Gist
GIST=LOCAL(noghbinary, no gist-creation MCP tool this session — notFALLBACK, GitHub API access worked throughout). Full report:docs/dream-cycle/2026-09-11-ledger-signals-report.md.Issue
#108
Witness
SESSION_COMMIT=3edd426f6c9c4b1e80235f7447dc863e749345ccREPORT_HASH=3bc41c0504f4d605227271a363a3f8d4124a4cab55b17d76ce342afbff0eb75e(sha256 ofdocs/dream-cycle/2026-09-11-ledger-signals-report.mdas committed)WITNESS=9e293048cfc60d2bdf7e466a08a67af2591477fe95acc8b1bf3c6c40b4a6633bReproduce:
Merge Policy
Human review required. The session never self-merges and never autonomously promotes candidate state.
dream.config.json'sautoMerge: false; the repo'sautomerge.ymlis a guard-only check now (no merge authority), so this PR waits on a human regardless.🤖 Generated with Claude Code
https://claude.ai/code/session_01MCVdVup9eCLe8mdKc2LoSq
Generated by Claude Code