Skip to content

developer-experience: wire real merge state into ledger signals (zeroMergeStreak always-true bug) - #9

Draft
ruvnet wants to merge 2 commits into
mainfrom
dream/2026-08-14-developer-experience
Draft

developer-experience: wire real merge state into ledger signals (zeroMergeStreak always-true bug)#9
ruvnet wants to merge 2 commits into
mainfrom
dream/2026-08-14-developer-experience

Conversation

@ruvnet

@ruvnet ruvnet commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Nightly Dream Cycle, 2026-08-14. DEEP=developer-experience, SCAN=cli,tui. Full report: docs/dream-cycle/2026-08-14-developer-experience-report.md. Issue: #8.

Hypothesis

Given zeroMergeStreak (the field this pipeline's own compiled STEP 1.1 uses to bias candidate selection), when the CLI is given an optional --merged "7,12" flag threading known-merged PR numbers into the existing, already-correct learningSignals(rows, { mergedPrNumbers }) library option, then the signal should correctly report false once the window's PR is in the supplied set, and stay byte-identical to today when --merged is omitted. Frozen before implementation.

Candidate

+48/-2 across 2 files (no new files besides the report). One conceptual change: packages/cli/src/index.ts's ledger signals handler now accepts --merged, parses it into a Set, and passes it through — the @dream-machine/ledger library itself is untouched (it was already correct).

Evaluation Receipt

Real evaluator: npm test (vitest, this repo's bench entrypoint).

Baseline (7bbb851) Candidate
Tests 96 101 (+5, 0 removed/modified)
Result 96 passed 101 passed
Lint clean clean

Baseline

Parent commit 7bbb851d337067d16ede31175896bb5e587a7d22, 96/96 tests passing, clean build, clean lint.

Darwin Lineage

Not run — DARWIN=not-applicable. No evolvable population for a single CLI flag surfacing an already-correct library option.

Evidence

Reproduced live tonight (grade A, first-hand): node packages/cli/dist/bin.js ledger signals against this repo's real docs/dream-cycle/LEDGER.mdzeroMergeStreak: true, even though mcp__github__pull_request_read on PR #7 independently confirms merged: true, merged_by: ruvnet, merged_at: 2026-08-13T22:05:44Z. Post-fix: ledger signals --merged 7zeroMergeStreak: false, matching real GitHub state.

Reward-Hack Check

Self-critique pass (no second agent spawned tonight — disclosed limitation, see report). CLEAR of reward-hacking — only intended files changed, no test/gold/threshold tampering, default (no-flag) behavior byte-identical to before. Found + fixed before finalizing: the first draft's --merged crashed (mergedFlag.split is not a function) on a value-less invocation (parseArgs returns boolean true, not a string, for a flag with nothing after it) — fixed with an explicit type guard and a clear usage error; regression test added. Two things deliberately left out of scope, not silently dropped: (1) renderDashboard/TUI has the identical gap but is documented as a pure, dependency-free function — extending it is a second conceptual change and an open design question; (2) the CLI does not fetch merge state itself (no network/gh call added) — that would stack a second network-facing responsibility onto a tool whose io.exec already carries a flagged unsanitized-shell-exec risk (from PR #7).

Security Review

No new exec/network/file-write surface — --merged is pure string→Set parsing. No credentials touched. No LLM calls (N/A for prompt injection). IO/io.exec unaffected — no existing call site gains new capability.

Regression Analysis

0 pre-existing tests modified or removed. All 96 baseline tests still pass unchanged; 5 new tests added (default-unchanged, flag-flips-signal, whitespace/#-tolerant parsing, unrelated-PR-stays-true, value-less-flag usage error).

ADR

None. This is a CLI-wiring fix (a small flag threading an existing, already-correct library option), not an architectural decision — no new ADR filed tonight.

Gist

No gh gist create/gist tool available this session. Report committed at docs/dream-cycle/2026-08-14-developer-experience-report.md instead. GIST=LOCAL.

Issue

#8

Witness

report_sha256 : f488881084bea3ac273fe8e62710533eb1c225040e763cdc8b0ae26ef975017c
session_commit: 7bbb851d337067d16ede31175896bb5e587a7d22
witness       : e55f641310751223e98c72c55a72388cedfe47dffa64c4f60166d027ded095e9

Verify: sha256sum docs/dream-cycle/2026-08-14-developer-experience-report.md, then printf '%s%s' "<hash>" "7bbb851d337067d16ede31175896bb5e587a7d22" | sha256sum must equal the witness above. Confirmed tonight via dream-machine witness verify (✓ VALID).

Merge Policy

Draft — human review required. This PR does not carry the automerge-safe label. Per this repo's guarded-auto-merge policy (.github/workflows/automerge.yml), that label is a deliberate human decision this session never applies to itself, even though this candidate is small and touches no evaluation/gate/safety infrastructure — the session never merges and never self-labels.


Generated by Claude Code

…roMergeStreak always-true bug)

Nightly Dream Cycle, 2026-08-14. DEEP=developer-experience, SCAN=cli,tui.

`dream-machine ledger signals` never passed mergedPrNumbers into
learningSignals(), so zeroMergeStreak was a worst-case default (true
whenever the window has a real PR) presented as a verified reading.
Reproduced first-hand against this repo's real ledger: the CLI reported
zeroMergeStreak=true even though PR #7 is confirmed merged via the
GitHub API. Adds an optional `--merged "7,12"` flag on `ledger signals`
that threads known-merged PR numbers into the library's existing,
already-correct learningSignals(rows, { mergedPrNumbers }) option.

Full report: docs/dream-cycle/2026-08-14-developer-experience-report.md
ruvnet pushed a commit that referenced this pull request Aug 14, 2026
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ruvnet
ruvnet force-pushed the dream/2026-08-14-developer-experience branch from 43f8278 to 3b07dc0 Compare August 14, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants