compiler-parity: validateConfig() accepts blank slot deep/scan entries (issue #104) - #105
Draft
ruvnet wants to merge 3 commits into
Draft
compiler-parity: validateConfig() accepts blank slot deep/scan entries (issue #104)#105ruvnet wants to merge 3 commits into
ruvnet wants to merge 3 commits into
Conversation
validateConfig() checked slot.deep truthiness and slot.scan array length, but never checked that individual scan entries (or deep) are non-blank after trimming. A config with scan: ['', 'tests'] or deep: ' ' passed validation cleanly and compile() then silently emitted a corrupted line (SCAN=,tests / DEEP= ). Same defect class as the cron-minute-field (#24), adrConvention-shape (#28/#29) and bonusModuli-value (#78/#79) compiler-parity fixes, scoped to the one remaining gap in the same validator. npm test: 98->101 (+3), 0 regressions. Self-hosted dream.config.json compile output byte-identical before/after. Dream Cycle 2026-09-10. DEEP=compiler-parity. Issue #104. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QXtKpy19GfqPGwpPG9iAk6
References issue #104 and PR #105 (both now known after PR creation). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QXtKpy19GfqPGwpPG9iAk6
The branch was accidentally built on a stale local main ref (7933c35) that had diverged ~50 commits from the real origin/main (3edd426), including several compiler-parity fixes this session's earlier evidence review had wrongly recorded as still open (#29, #79, among others). Caught via mergeable_state=dirty on PR #105 right after opening it. Merges the real origin/main in, resolves the LEDGER.md and index.test.ts conflicts (both additive, no semantic conflict), and corrects the ledger row + report to reflect the true baseline and accurate test counts (616+81=697 -> 619+81=700, +3, 0 regressions, re-measured against a clean git-worktree rebuild of the real origin/main tip, not the stale ref). The underlying finding (blank slots[].deep/scan[] entries pass validateConfig) remained valid and non-duplicate against the real merged history. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QXtKpy19GfqPGwpPG9iAk6
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.
Nightly Dream Cycle, 2026-09-10. DEEP=compiler-parity, SCAN=config-schema,golden-snapshots. Full report:
docs/dream-cycle/2026-09-10-compiler-parity-report.md. Issue: #104.Correction (mid-session, see commit
e389f02): this branch was originally opened against a stale localmainref (7933c35) that had diverged ~50 commits from the realorigin/main(3edd426) — including PRs #24, #29, #79, #55, #11, #21, #33, #46, which this session's earlier evidence review had wrongly recorded as still open. Caught viamergeable_state: dirtyimmediately after opening this PR. The branch is now merged onto the realorigin/main; every claim below is re-verified against the true history and the correcteddocs/dream-cycle/2026-09-10-compiler-parity-report.md. The underlying finding was unaffected — it remained true and non-duplicate against the real merged history.Hypothesis
Given a
dream.configwhoseslots[i].scanarray contains an empty-string or whitespace-only entry, or whoseslots[i].deepis whitespace-only, extendingvalidateConfig()to reject blank surface names in both fields should makevalidateConfigreportok: falsefor such configs, withcompile()never reachable with a blankSCAN=/DEEP=line for any config that passes validation — subject to 0 regressions and no change to any currently-valid config's result. Frozen before implementation; not modified after.Candidate
packages/compile/src/config.ts—validateConfig()'s per-slot loop:!s.deep→!s.deep || !s.deep.trim(); add a per-entrys.scan.forEachcheck rejecting blank/whitespacescan[j].packages/compile/src/index.test.ts— 3 new tests. One conceptual change, 8 lines of logic + 19 lines of tests.This exact defect class was already found and fixed three times in this repo's compiler-parity rotation, all three now confirmed merged into
main: cron minute field (PR #24),adrConventionshape (issue #28/PR #29),bonusModulivalues (issue #78/PR #79). Verified this candidate does not duplicate any of them by readingconfig.tsat the truemaintip (3edd426) — it already has theadrConvention/bonusModulichecks, but still lacks theslots[].deep/scan[]blank-string check this PR adds.Reproduced live against real
main @ 3edd426before writing the fix:Evaluation Receipt
Real evaluator:
npm test(vitest run && npm run test:governance).main @ 3edd426, clean worktree rebuild)Live: post-fix
validateConfigreturnsok:falsewith a specific per-slot error for both the blank-scan and whitespace-deep case. Self-hosteddream.config.jsoncompile output confirmed byte-identical against a clean baselinegit worktreerebuild of3edd426(it was already well-formed — no behavior change for the real config).Baseline
True parent commit
3edd426f6c9c4b1e80235f7447dc863e749345cc(main, verified viagit fetch origin main+ a cleangit worktreerebuild, not a stale local ref). 697/697 tests green (616 vitest + 81 governance), clean build (8 packages), clean lint.Darwin Lineage
Not run —
DARWIN=not-applicable. Single deterministic blank-string-check parameterization on an existing validation loop, no evolvable population — same judgment as every prior single-function compiler-parity fix in this ledger (#11, #29, #79).Evidence
OBSERVATION (grade A, live pre-fix reproduction against real
main@3edd426) → OBSERVATION (grade A, readconfig.tsat truemaintip — confirmsadrConvention/bonusModulichecks already merged,slots[].deep/scan[]gap still open) → MEASUREMENT (grade A, 697→700 tests, 0 regressions, re-measured via clean worktree) → MEASUREMENT (grade A, self-hosted config byte-identical against true baseline) → INFERENCE (independent critic, fresh subagent, confirmed bug real by stashing the fix and re-testing — run before the stale-base correction, conclusions unaffected since the diff itself didn't change) → DECISION (scope todeep/scanonly, not the critic-flagged residual gap inlabels/ledgerPath/competitors/etc.) → REJECTION (did not resubmitadrConvention#29 orbonusModuli#79, confirmed already merged, not just "open" as first believed).Reward-Hack Check
Independent critic (fresh subagent, no shared authoring context, given only
git diff+ full repo read access): CLEAR.config.tsand re-testing against the pre-fix version..only/.skip, no snapshot/gold-data edits, no threshold changes, no undocumented cache.metaharnessfixture and self-hosteddream.config.jsonboth still validate cleanly post-fix.DreamConfigstring fields (labels,competitors,ledgerPath,branchPrefix,evaluatorEntrypoints.*,controlPlaneProbes,extraDisciplines) remain unvalidated for blank/whitespace entries — correctly out of scope for this narrow candidate; recorded as a legitimate next-night direction.Security Review
Pure string-validation tightening inside an existing validator — no new I/O, no LLM/prompt-injection surface, no MCP/tool-authority change, no credential exposure, no filesystem/network-scope change. Strictly narrows what previously validated
ok:true; cannot newly accept anything previously rejected.Regression Analysis
0 pre-existing tests modified or removed. All 697 baseline tests pass unchanged; 3 new vitest tests added.
npm run lintclean.npm run buildclean (8 packages, no wasm/NAPI degradation to record tonight).ADR
None — bug fix to existing config-validation behavior (a validator missing one of its intended checks), not a new architectural decision. Same precedent as PR #24/#29/#79.
Gist
No
ghCLI or gist-creation MCP tool available this session (consistent with every prior night).GIST=LOCAL. Full report committed atdocs/dream-cycle/2026-09-10-compiler-parity-report.md.Issue
#104 (body being corrected to match — see issue comment)
Witness
Verify:
sha256sumthe committed report's content up to (not including) its own## Witnesssection, thenprintf '%s%s' "<that hash>" "3edd426f6c9c4b1e80235f7447dc863e749345cc" | sha256summust equal the witness above (cross-checked live vianode packages/cli/dist/bin.js witness stamp).Merge Policy
Draft — human review required. This PR does not carry the
automerge-safelabel. The session never merges and never self-promotes.🤖 Generated with Claude Code
https://claude.ai/code/session_01QXtKpy19GfqPGwpPG9iAk6
Generated by Claude Code