{{ message }}
Repository navigation
Conversation
…arness diag's ADR-028 skew check @metaharness/kernel's package.json exports map omitted ./self-evolution (documented in docs/USAGE.md + examples/multi-host/README.md) and ./package.json (used by create-agent-harness's harness diag for its ADR-028 kernel version-skew check). Both threw ERR_PACKAGE_PATH_NOT_EXPORTED for any real npm-installed consumer; for harness diag the consequence was actively wrong output, not just a gap -- a correctly-installed harness at the exact matching kernel version was told verdict: "unparseable" and instructed to reinstall a kernel that was already there and already current. Adds both subpaths to the exports map plus a regression test (packages/kernel-js/__tests__/exports-map.test.ts) that resolves them through Node's real exports-map resolution (not a relative ../src import, which would never exercise exports at all). Non-vacuous baseline/candidate proof via git stash; 0 regressions across kernel-js and all 14 downstream consumers; tsc + full monorepo build clean. Independent adversarial critic: ACCEPT-WITH-CAVEATS (full detail in PR body and docs/dream-cycle/2026-10-14-gist.md). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbD5QrLYYZF7KSdahrh5i6
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbD5QrLYYZF7KSdahrh5i6
This was referenced Oct 15, 2026
This branch has not been deployed
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 a real (not-monorepo, not-dev-fallback) installation of
@metaharness/kernelvia npm, when@metaharness/kernel/self-evolutionis imported per the published docs, or whencreate-agent-harness'sharness diagresolves@metaharness/kernel/package.jsonto read the installed kernel's version, then both resolutions should succeed exactly as documented, subject to: (a) no other exported subpath's resolution target/shape changes; (b)harness diag's version-skew verdict for a correctly-matched kernel changes from'unparseable'(with a false "not installed locally" actionable) to'match'; (c) zero regressions across kernel-js and its 14 direct TS consumers.Candidate
packages/kernel-js/package.json— added"./self-evolution"and"./package.json"to theexportsmap (6 lines). New test:packages/kernel-js/__tests__/exports-map.test.ts(resolves both subpaths through Node's real self-referencing-package resolution, not a relative../srcimport that would bypassexportsentirely).Evaluation Receipt
git stashthe package.json change): new test suite fails to even load —Error: Missing "./self-evolution" specifier in "@metaharness/kernel" package— exact predicted error, confirmed live.tsc --noEmitclean; full monoreponpm run buildclean (JS-only; wasm-pack unavailable in this sandbox — recorded degradation, irrelevant to this candidate).diag.ts's dev-fallback can't mask it: builtcreate-agent-harness's dist into a scratch directory outside the repo, with a real@metaharness/kernelsymlink and a manifest whosekernel_versionexactly matches. Pre-fix:{"verdict":"unparseable","actionable":"Run: npm install @metaharness/kernel@0.1.3 (kernel not installed locally)"}— wrong, the kernel WAS installed at the right version. Post-fix:{"localKernelVersion":"0.1.3","verdict":"match"}— correct.Baseline Comparison
Full downstream sweep (all 14 packages importing
@metaharness/kernel):create-agent-harness623/625 (2 pre-existing skips),agntcy82/84 (2 pre-existing skips),arc-agi-391/91,arc-agi-3-chatgpt69/69,host-claude-code35/35,host-codex23/23,host-copilot13/13,host-github-actions34/34,host-hermes20/20,host-openclaw29/29,host-opencode17/17,host-pi-dev10/10,host-prime-agent21/21,host-rvm42/42,sdk18/18 — 0 regressions anywhere. Root__tests__/pack-contents.test.ts6/6 (tarball-content invariants unaffected).Darwin Lineage
DARWIN=not_applicable— apackage.jsonmetadata fix is not an ADR-071 mutation surface.Flywheel Evidence
FLYWHEEL=not_applicable— static packaging fix, not a promotion-gate candidate. Full MEASUREMENT/DECISION/REJECTION record:docs/dream-cycle/2026-10-14-evidence.md.Reward Hack Check
Clear. Diff is purely additive (2 new
exportsentries + 1 new test file); no existing test, threshold, or gold data touched; zero live model spend (candidate required no LLM calls).Security Review
No new attack surface.
./package.json's content (name/version/scripts/deps) is already public in every published npm tarball —require.resolve-ability exposes nothing new../self-evolutionexposesSelfEvolvingRouter, whose behavior is unchanged by this diff (see independent critic note below on its pre-existing, unrelated correctness gap).Regression Analysis
See Baseline Comparison above — 0 regressions across every real consumer,
tscclean, full build clean.Independent Adversarial Critic
Fresh subagent, cold-read, own reproduction (not taken on faith): verified the diff matches the claim exactly (dist file paths real, shape consistent with sibling subpaths); independently reproduced resolution via raw Node (not just vitest) for both subpaths; introspected the actually-installed
@ruvector/emergent-time@0.1.0directly; readdocs/RELEASE.md/scripts/preflight.mjs.Verdict: ACCEPT-WITH-CAVEATS
scripts/preflight.mjs's actual gate (only requires an### Added/Changed — Iter Npattern exist somewhere in the file — already true) and against the last several merged dream-cycle PRs (including dream(host-adapters): #385 close SessionLog.append()/fork() TOCTOU race (evaluated) #386, the same bug-class fix), none of which touchedCHANGELOG.md. Matches established convention for this PR category — not a gap, not fixed.self-evolution.ts'sLearnedWeightsApidoesn't match the real installed@ruvector/emergent-timeAPI (confirmed: real class has a private constructor, noupdate/weight/weights()) and itsensureLoaded()has a latent, currently-dormant TOCTOU race under concurrentrecordOutcome()calls. Both pre-existing and unrelated to this diff; exporting the module formally makes a real external consumer slightly more likely to actually reach them (previously the broken import path masked the module entirely). Disclosed as a follow-up candidate, not fixed tonight — fixingself-evolution.ts's internal correctness is out of scope for "repair the exports map."ADR
None filed — this is a packaging/exports-map bug fix, not an architectural decision (no new ADR warranted per the repo's own "never for parameter changes... minor fixes" rule).
Research Gist
docs/dream-cycle/2026-10-14-gist.md(this session's gist-publish tool was denied by the auto-mode permission classifier as a "Public Data-Sharing Upload" — not an auth failure; committed file used instead, per the convention adopted 2026-09-09). Includes: sourced 2026 findings on Node exports-map tooling (publint,are-the-types-wrong), a competitor comparison on multi-host codegen + durable session logging (LangGraph/CrewAI/AutoGen/Claude Agent SDK/DSPy-GEPA), and 4 disclosed-not-fixed follow-on candidates (CI exports-map linting, SDK validation asymmetry, kernel native-backend shape check + memory-rvf race, and the standing PR review backlog).Issue
#401
Witness
Merge Policy
Human review required. Do not self-merge. Do not autonomously promote Flywheel state.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TbD5QrLYYZF7KSdahrh5i6
Generated by Claude Code