Skip to content

dream(generator-genome): #248 close zero-test-coverage gap in genome-scorers.ts (evaluated) - #249

Draft
ruvnet wants to merge 2 commits into
mainfrom
dream/2026-08-30-generator-genome
Draft

dream(generator-genome): #248 close zero-test-coverage gap in genome-scorers.ts (evaluated)#249
ruvnet wants to merge 2 commits into
mainfrom
dream/2026-08-30-generator-genome

Conversation

@ruvnet

@ruvnet ruvnet commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Hypothesis

Given genome-scorers.ts's 5 pure, deterministic, exported functions (classifyRepoType, resolveAgentTopology, scoreMcpRisk, scoreTestConfidence, scorePublishReadiness), which feed genome.ts's user-visible ready/needs-work/blocked verdict and process exit code, when a dedicated vitest suite is added covering boundary/representative behavior, then the surface gains characterized regression coverage (0→33 tests) with zero production diff, subject to: byte-identical genome-scorers.ts, 0 regressions in the existing 458-test suite, and every new test provably non-vacuous via seeded mutation.

Candidate

One new file: packages/create-agent-harness/__tests__/genome-scorers.test.ts (33 tests). Zero changes to any production source file.

Evaluation Receipt

  • Baseline: genome-scorers.ts — 0 dedicated tests. Full package suite: 458 passed, 2 skipped (40 files).
  • Candidate: + new test file. Full package suite: 491 passed, 2 skipped (41 files). 0 regressions.
  • tsc --noEmit: clean, 0 errors.
  • Mutation testing: 5 independent single-line mutants (one per scorer function) applied, each caught 1–2 tests failing, then reverted — git diff confirmed byte-clean after every revert.
  • evaluated: accepted

Baseline Comparison

458 → 491 tests, 0 production diff, 0 regressions, 0 skipped-test change.

Darwin Lineage

Not run — deterministic discrete-branch scorer, no continuous parameter space to explore.

Flywheel Evidence

No flywheel gate/promotion receipt applies (test-only, non-LLM-call candidate). This PR + the linked issue + the gist constitute the evidence record.

Reward Hack Check

Checked by both the candidate author and an independent critic subagent (separate context): no test weakening, no gold/corpus modification, no hardcoded outputs, no .skip/.only, no metric substitution, no hidden preprocessing. Clear.

Security Review

Not security-sensitive (test-only, no new runtime code path). One security-adjacent observation carried forward for a future night (not fixed here, to keep this patch single-file and zero-production-diff): hasCi/hasMcp in analyze-repo.ts are loose regex text-matches over README/manifest prose rather than structural checks.

Regression Analysis

0 regressions (458→491, additive only). Two tests are deliberately named documented gap and assert the current, known-buggy values of scoreTestConfidence/scorePublishReadiness — these are intentional characterization of today's behavior, cross-referenced to the two already-open draft fix PRs below, not something this PR is trying to hide.

ADR

None — this is test coverage, not an architectural decision (no ADR created per the "never for parameter changes, benchmark additions, documentation" rule).

Research Gist

docs/dream-cycle/2026-08-30-gist.md (this branch). Full sourced 2026 research, competitor comparison (OpenSSF Scorecard, AgentLint, agnix, LangGraph/AutoGen/CrewAI/OpenAI Agents SDK/Claude Agent SDK, MCP-Scan), and scan findings for router/turn-credit. A public gist was not created — gh CLI is unavailable in this session's environment.

Issue

#248

Witness

session_commit : 6f8c60216f47eac391a076fe27fd804470a07e10
report_sha256  : 818fd8d9f04c451e438a4400bf765376a99b3815e55d64377860cdae7fed0c28
witness        : 6857ca954d6106c92d963dd4f509c823bac2800ccdf7f6708abb6d6f8269ebbc

Operationally more urgent than this PR

0 of ~13 Dream Cycle PRs since 2026-08-14 have merged, including two disclosed RCE-class security fixes still unpatched on main: #212 (host-adapters codegen shell/YAML injection, open 40+ days) and #224 (host-rvm shell RCE, open ~2 weeks). See issue #248's "Ledger Check" section for the full verified backlog state. Please triage that backlog before or alongside reviewing this PR — this PR itself is intentionally low-risk (single file, zero production diff) and can wait.

Merge Policy

Human review required. Do not self-merge. Do not autonomously promote Flywheel state.


Generated by Claude Code

claude added 2 commits August 30, 2026 08:17
…scorers.ts (evaluated)

genome-scorers.ts's 5 pure, deterministic, exported functions feed
genome.ts's user-visible ready/needs-work/blocked verdict and process
exit code, but had zero test coverage anywhere in the package. Adds a
33-test characterization suite with zero production code changes.

Baseline: 458 passed, 2 skipped (40 files). Candidate: 491 passed, 2
skipped (41 files) -- 0 regressions. Each new test proven non-vacuous
via seeded single-line mutation (5 mutants, one per function, all
caught, source restored byte-clean). Independent critic subagent
re-verified with its own 6th mutant and returned ACCEPT-WITH-CAVEATS.

Research independently surfaced that scoreMcpRisk's local_permissive
branch is currently unreachable via the real CLI path (recommendPlan()
always assigns a hardcoded SAFE policy) -- now documented explicitly
in the new suite rather than left as a silent gap.

Deliberately does not fix the two known bugs in this file that already
have unreviewed draft PRs open (#200 scorePublishReadiness language
credit, #229 scoreTestConfidence file verification) -- this suite
instead documents their current buggy behavior with tests named
"documented gap", so those PRs land cleanly without a 3rd competing
fix deepening the review backlog.

See docs/dream-cycle/2026-08-30-gist.md for full research, competitor
comparison, and evaluation receipt. Human review required. Does not
self-merge or autonomously promote Flywheel state.

Co-Authored-By: Claude <noreply@anthropic.com>
main's LEDGER.md was stuck at 2 rows (08-13, 08-14) while 11 more real
Dream Cycle nights ran and pushed branches/PRs -- STEP 25 silently
failed 08-15..08-26 and its own backfill (#240) is unmerged, so main
never got the correction. Adds a summary backfill row for 08-15..08-29
(0/11 merged, 2 disclosed unpatched security fixes) plus tonight's own
2026-08-30 row (issue #248, PR #249).

Co-Authored-By: Claude <noreply@anthropic.com>
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