Skip to content

feat(evolution): add evolutionary campaigns, Pareto archive, and bundle export - #56

Merged
thxCode merged 42 commits into
mainfrom
spec/evolutionary-campaigns-pareto-archive-and-bundle-export
Nov 24, 2026
Merged

thxCode merged 42 commits into
mainfrom
spec/evolutionary-campaigns-pareto-archive-and-bundle-export

Conversation

@thxCode

@thxCode thxCode commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind feature
/area core
/area controller
/area taskpack-runner
/area memory
/area decisions
/area github-app
/area cli
/area docs
/area site

Summary

Adds bounded, verified evolutionary campaigns, a Pareto / MAP-Elites archive, plateau-driven bounded team synthesis, and deterministic evolution-bundle.v1 exports across Loopwright (governed by specs/2026-11-23-evolutionary-campaigns-pareto-archive-and-bundle-export.md):

  • @loopwright/evolution (12th workspace package, zero new third-party runtime dependencies):
    • Isolated fenced campaign.sqlite store (node:sqlite STRICT tables, DELETE/FULL, O_NOFOLLOW, single-writer queue, lease fencing, and <= 1000ms clock-drift guard) leaving @loopwright/state (format_version = 1) and controller checkpoints (D <= 256) untouched.
    • Multi-island MAP-Elites archive, NSGA-II Pareto + hypervolume ranking, stepping-stone parent crossover, UCB1 model bandit routing, bounded <= 16 KiB CAS scratchpad synthesis, and two-stage specialist-then-portfolio orchestration (1..64 specialist buckets plus held-out portfolio synthesis).
    • Event-driven plateau / RunEval pathology supervisor running strictly read-only (tools: ["read"], scope.protected: ["**"], isolated LocalRunStore, zero held_out_workloads exposure) emitting team-patch.v1 validated fail-closed against the Archetype Capability Envelope (TEAM_ENVELOPE_VIOLATION) and D <= 256 with automatic trialGenerations rollback.
    • Deterministic evolution-bundle.v1 exporter and verifier (dir and oci-layout) with fail-closed HMAC receipt verification, CAS O_NOFOLLOW / nlink === 1 / SHA-256 verification, SecretScrubber gating, hardware compatibility metadata, and dispatch-manifest.json (1..64 rules + fallback: "baseline").
  • Verifiers, Hardware Runner, Decisions, Memory, Taskpack, and CLI:
    • evolve-block-guard.v1 deterministic mutable-region verifier enforcing EVOLVE-BLOCK-START/END syntax, allowedBlockIds, maxBlockBytes, and outside-byte SHA-256 invariance across local and delegated step flows.
    • @loopwright/hardware-runner Stage A static ELF/PTX/SASS forbidden-symbol and register/spill audits (STAGE_A_STATIC_AUDIT_FAILED before any Stage B lease), bounded bucketMetrics + sanitized hardwareDiagnostics parsing with bucketScope (aggregate / all_buckets / { bucketId }), and post-crash accelerator health probes with fail-closed worker quarantine (WORKER_DEVICE_QUARANTINED).
    • @loopwright/decisions System-One advisory inner-loop filters (advise_mutation_novelty, route_evolution_strategy, advise_cascade_escalation), all stamped advisoryOnly: true and verificationCertified: false.
    • Backward-compatible hardwareScope memory isolation and 6th hardware-evidence verification gate in @loopwright/memory, projected across @loopwright/taskpack and @loopwright/github-app.
    • Lazy-loaded loopwright evolve check|run|resume|status|inspect|export CLI subcommands with per-provider credential isolation, zero top-level static @loopwright/evolution imports, updated documentation and site, and a three-zone network-boundary Blueprint SVG (docs/assets/diagrams/hardware-relay-flow.svg).

Related Issues

NONE

Verification

  • npm run build passed cleanly
  • npm run typecheck passed cleanly
  • npm run lint passed cleanly
  • npm run lint:docs passed cleanly (27 docs pages, 37 linked sources, 0 errors)
  • npm run site built and verified with zero broken links (HUGO_BIN=/opt/homebrew/bin/hugo, 16 HTML pages, 13 Markdown exports)
  • Focused tests passed across all 12 workspace packages (core, decisions, memory, controller, taskpack-runner, taskpack, github-app, hardware-runner, cli, and --concurrency 1 on state, agent-pi, evolution), plus closure --verify-failures --json (18 closedLocal, 5 unprovisionedExternal, 14/14 failure matrix) and .auto-sync/taskpack.yaml digest sync --check
  • OS sandbox diagnostics verified: live non-Docker linux-landlock + seccomp-bpf and on-demand physical GPU smoke (packages/evolution/test/live-gpu-smoke.test.ts — physical provenance, health probes, Stage A static audit, 2-generation campaign, and HMAC oci-layout export/verify with allowSyntheticProbe: false) verified on live CUDA and ROCm hosts; CI/local fixture runs skip live SSH smoke unless opt-in host env vars are set
  • Verified .github/workflows/ maintains least-privilege permissions and remains protected against untrusted taskpack/sandbox writes (.github/workflows/ untouched)
  • Signed-off-by: Full Name <email> Developer Certificate of Origin (DCO) included on all commits

Does this PR introduce a user-facing change?

Added evolutionary optimization campaigns (`kind: EvolutionCampaign`), `evolve-block-guard.v1` mutable-region verification, Stage A static symbol/spill audits, Stage B bucketed metrics and Roofline diagnostics, post-crash accelerator quarantine, System-One inner-loop novelty/strategy/cascade filters, hardware-scoped memory isolation, deterministic `evolution-bundle.v1` (`dir` and `oci-layout`) exports, and the `loopwright evolve` CLI (`check`, `run`, `resume`, `status`, `inspect`, `export`). Existing TaskContract, Taskpack, StateStore (`format_version = 1`), and hardware receipt schemas remain backward compatible with no migration required.

…ooling

- Add @loopwright/evolution package using built-in node:sqlite with zero third-party deps.
- Register packages/evolution across workspace build, test, pack, and self-upgrade tooling.
- Update 12-package test fixtures, OpenCodeReview rules, and synced self-upgrade digests.
- Add evolution scaffold tests verifying node:sqlite STRICT support and state schema parity.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…ade nodes

- Allow advise_mutation_novelty, route_evolution_strategy, and advise_cascade_escalation intents.
- Implement deterministic comment-stripped Jaccard novelty filter with System-One soft-band triage.
- Add Roofline-backed evolution strategy router and smoke-to-full cascade escalation filter.
- Stamp advisoryOnly and verificationCertified false on all outputs with unit tests.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…fier gate

- Add optional HardwareMemoryScope with null-prototype schema preserving v1 storeDigest parity.
- Enforce 6th hardware-evidence gate rejecting unproven hardwareScope facts and invariants.
- Admit hardwareScope failure_observation entries cleanly and scope conflict overlap checks.
- Filter selectActiveMemory, finalizer, and compaction by target accelerator and driverConstraint.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…and hardwareDiagnostics

- Extend HardwareTargetSpec with optional Stage A static audit bounds preserving legacy digests.
- Add bucketScope threshold enforcement across bucketMetrics in evaluateAcceptance.
- Validate bounded bucketMetrics and closed-enum hardwareDiagnostics on Evidence.spec.
- Export STAGE_A_STATIC_AUDIT_FAILED, TEAM_ENVELOPE_VIOLATION, and EXPORT_UNVERIFIED_FORBIDDEN diagnostics.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…gine, sampler, and scratchpad

- Add null-prototype parsers for EvolutionCampaign, team-patch.v1, and dispatch-manifest.json.
- Implement single-writer fenced campaign.sqlite store with 1000ms clock-drift and symlink guards.
- Add deterministic NSGA-II ranking, exact hypervolume, Island Elitism, and UCB1 model bandit.
- Add SecretScrubber-clean 16 KiB CAS scratchpad synthesizer with unit tests.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…te receipt forwarding

- Register deterministic evolve-block-guard.v1 across handlers, registry, verifier protocol, and Merkle proof paths.
- Enforce EVOLVE-BLOCK marker structure, allowedBlockIds, maxBlockBytes, and outside-byte SHA-256 invariance.
- Forward Stage A static audit fields, bucketScope, bucketMetrics, and hardwareDiagnostics in benchmark-gate and reconcile.
- Keep phaseSchedule untouched and verify 340 controller tests pass including new TDD coverage.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…rser, and GPU quarantine

- Audit sealed Stage A ELF/PTX/SASS outputs for forbidden symbols and register/spill ceilings.
- Parse bounded Stage B bucketMetrics and sanitized hardwareDiagnostics enforcing bucketScope thresholds.
- Add NVIDIA/ROCm/NPU post-crash health probes verified against live RTX 4090 and RX 7800 XT hosts.
- Transition workers into fail-closed WORKER_DEVICE_QUARANTINED (exit 3) before next lease poll.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…ir and oci-layout

- Implement exportEvolutionBundle and verifyEvolutionBundle with atomic staging and byte-identical digests.
- Enforce O_NOFOLLOW, nlink === 1, SHA-256, byteLength, and SecretScrubber CAS integrity checks.
- Require passing physical hardware_execution HMAC receipts and portfolio verification before export.
- Emit manifest.json, dispatch-manifest.json with baseline fallback, receipts, and OCI layout index.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…schema, and hardwareScope projection

- Validate and compile evolve-block-guard.v1 checks, Stage A audit bounds, and bucketScope rules.
- Preserve byte-identical TaskContract and TaskLock digests on legacy v2 taskpacks omitting new fields.
- Project optional hardwareScope from matched hardware target.matrix cells into active memory selection.
- Preserve hardwareScope across taskpack local finalization and github-app separate-PR memory proposals.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…io synthesis, and campaign orchestrator

- Implement event-driven plateau and RunEval supervisor with read-only tools and archetype envelopes.
- Implement multi-island campaign orchestrator with stepping-stone crossover, decisions filters, and resume.
- Re-export full @loopwright/evolution API surface from index.ts preserving scaffold exports.
- Bind per-run child lockHashes in bundle.ts and verify 30 evolution tests including loopback e2e.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…sure registration

- Add loopwright evolve check|run|resume|status|inspect|export grammar and lazy imports
- Wire Pi-backed CLI CandidateEvaluator preserving zero static evolution imports
- Register @loopwright/evolution in closure OWNER_PACKAGES keeping 18/5 ledger intact
- Add evolve-block-guard.v1 compilation support and parity tests in taskpack-runner

Signed-off-by: thxCode <thxcode0824@gmail.com>
- Document EvolutionCampaign, evolve-block-guard.v1, Stage A/B audits, and hardwareScope
- Update CLI, architecture, internals, memory, evidence, and decision-routing guides
- Sync docs/README.md, README.md, AGENTS.md, and loopwright-overview skill
- Add EvolutionCampaign metadata.name validation to check-docs.mjs and rules tests

Signed-off-by: thxCode <thxcode0824@gmail.com>
…okups

- Attach hardwareScope on memory facts only when hardware_execution evidence passed
- Simplify redundant Xid regex check in hardware-runner provenance parser
- Add optional environment lookup to controller loadTrustedConfiguration
- Remove global process.env mutation in taskpack executeTurnkeyCycle

Signed-off-by: thxCode <thxcode0824@gmail.com>
- Re-validate persisted team-patch.v1, preserve thinking/onRework, and fix D precheck
- Enforce fail-closed HMAC verification and forward driverConstraint on bundle export
- Wire isolated read-only LocalRunStore supervisor and pre-gate novelty screening
- Fix disjoint repo checkout, role resourceIds, 1..64 specialists, and resume cleanup
- Add on-demand live GPU SSH 2-generation physical-probe smoke test

Signed-off-by: thxCode <thxcode0824@gmail.com>
…ology SVG

- Reuse shared @loopwright/evolution helpers and preserve extraResources on roles
- Wire read-only LocalRunStore Pi supervisor, novelty gate, and fail-closed HMAC export
- Inherit active provider token in executeTurnkeyCycle when runtimeEnv omits it
- Add three-zone network-boundary hardware-relay-flow.svg diagram and Relay docs
- Document EvolutionCampaign bounds table, host env vars, and disjoint --state path

Signed-off-by: thxCode <thxcode0824@gmail.com>
…pervisor checks

- Synthesize dispatch-manifest rules from specialist winners in portfolio mode.
- Resolve cross-provider team-patch role models from declared taskpack models.
- Enforce supervisor cycle status, active provider env, and secret scrubbing.
- Rename hardened test files and remove internal review identifiers.

Signed-off-by: thxCode <thxcode0824@gmail.com>
…ad IDs

- Bind per-provider credentials in CLI evolution evaluator for cross-provider roles.
- Validate heldOutWorkloadId and portfolioHeldOutWorkloadId as strict identifiers.
- Apply single-target heldOutWorkloadId overrides at runtime and bundle export.
- Forward CLI --format on evolve auto-export and sync workspace lockfile.

Signed-off-by: thxCode <thxcode0824@gmail.com>
- Advance evolutionary campaigns specification status from Built to Shipped.

Signed-off-by: thxCode <thxcode0824@gmail.com>
@gpustack-code-review

gpustack-code-review Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

🔍 OpenCodeReview found 1 issue(s) in this PR.

  • ✅ Successfully posted inline: 0 comment(s)
  • 📋 Routed to summary by policy: 1 comment(s)

performance · low

📄 packages/hardware-runner/src/evaluator.ts (L3764-L3768)

⚠️ GitHub could not post this as an inline comment: Routed to summary (severity low · category performance)

magicHeader.readUInt32BE(4) is now evaluated twice per check (and the original code had the same duplication for the BE arm). Since this is on a hot-ish audit path, hoist it once: const nfatArch = magicLen >= 8 ? magicHeader.readUInt32BE(4) : 0; then use nfatArch >= 1 && nfatArch <= 20. Also note that a Java class file's bytes 4-7 are (minor_version << 16) | major_version; with minor_version 0 (Java 7+) the value equals major_version (>= 51), and even legacy files with minor_version > 0 give values >= 45 — so the 1..20 bound alone is safe only because the full 32-bit BE read is used. Please double-check the comment's claim about which 16 bits hold major_version (it's the high 16 bits, so the BE u32 read is minor<<16|major, i.e. >= 45 << 16 ... actually (major<<16)|minor for BE) so future readers don't mis-derive the bound.

Reviewed d08f7bb..13372b8 only; earlier commits in this PR were reviewed in a previous run.

Comment thread packages/cli/src/evolve.ts Resolved
Comment thread packages/cli/src/evolve.ts Resolved
Comment thread packages/cli/src/evolve.ts Resolved
Comment thread packages/cli/src/main.ts Resolved
Comment thread packages/cli/src/main.ts Resolved
Comment thread packages/decisions/src/nodes.ts Resolved
Comment on lines +1655 to +1657
const parsed = await parseAndVerifyReceiptBytes(rawBytes, {
individualId: ind.individualId,
expectedTargetCellId: campaign.manifest.spec.targetCellId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · medium
parseAndVerifyReceiptBytes performs the full expectRecord + HMAC check before checking options.expectedLockHash, but the outer loadAndVerifyReceipt never passes expectedLockHash (the campaign's lockHash is never cross-checked against receipt lockHash anywhere in the export flow, despite the per-receipt lockHash field being mandatory and validated). Add expectedLockHash: campaign.lockHash in loadAndVerifyReceipt so bundle exports pin receipts to the campaign baseline lock — without it, a receipt from a different lock epoch could be exported.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed (false positive): campaign.lockHash hashes the campaign manifest, whereas each individual's signed BenchmarkVerdictReceipt.lockHash is the per-run TaskLock hash of that individual's child controller run (distinct for every child run). Passing expectedLockHash: campaign.lockHash would reject every real multi-generation controller receipt. Receipts are instead bound via HMAC verification, expectedTargetCellId, ind.individualId, hardwareProvenance, and Stage A output artifact digests. Leaving this thread open for reviewer confirmation.

Comment thread packages/evolution/src/bundle.ts Resolved
Comment on lines +288 to +291
const numeric = Number(rawToken);
if (!Number.isFinite(numeric) || Object.is(numeric, -0)) {
schemaInvalid('JSON number must be finite and non-negative-zero', path);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
parseNullProtoJson (and sanitizeUntrustedValue) hard-reject -0, but -0 is a legal JSON number literal (JSON.stringify(Math.round(-0.4)) aside, external producers such as hardware-runner receipts can emit -0), and JSON.parse round-trips it. Any receipt or manifest authored upstream with -0 in a metrics/edges field will fail parsing here even though the value is semantically zero. Consider normalizing -0 to 0 at the parse boundary instead of failing closed, reserving rejection for NaN/Infinity.

Suggestion:

Suggested change
const numeric = Number(rawToken);
if (!Number.isFinite(numeric) || Object.is(numeric, -0)) {
schemaInvalid('JSON number must be finite and non-negative-zero', path);
}
const numeric = Number(rawToken);
if (!Number.isFinite(numeric)) {
schemaInvalid('JSON number must be finite', path);
}
return Object.is(numeric, -0) ? 0 : numeric;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed (intentional invariant): rejecting -0 fail-closed matches Loopwright's cross-package canonical JSON invariant (@loopwright/core, @loopwright/decisions, @loopwright/memory, @loopwright/hardware-runner) and existing negative-zero unit tests so canonical SHA-256 digests never drift across serializers. Leaving this thread open for reviewer confirmation.

Comment on lines +6482 to +6488
const effectiveEnv: Record<string, string | undefined> = Object.create(null) as Record<string, string | undefined>;
const baseEnv = options.runtimeEnv ?? process.env;
for (const [key, value] of Object.entries(baseEnv)) {
if (value !== undefined) {
effectiveEnv[key] = value;
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
Precedence silently flipped: previously runtimeEnv values only filled gaps where process.env[key] === undefined (process.env won), and LOOPWRIGHT_MAX_TURNS was read from options.runtimeEnv ?? process.env. Now baseEnv = options.runtimeEnv ?? process.env makes runtimeEnv authoritative for every key, so when a caller supplies both (e.g. a host that sets LOOPWRIGHT_MAX_TURNS or a provider token in the real environment and also passes a curated runtimeEnv), the value consumed by the cycle changes. If this inversion is intentional (stronger isolation), please note it explicitly; otherwise restore the old gap-filling semantics.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed (intentional isolation): making caller-supplied options.runtimeEnv authoritative over ambient process.env (while keeping the explicit read-only fallback for LOOPWRIGHT_ACTIVE_PROVIDER_TOKEN_ENV) eliminates concurrent process.env mutation races and prevents ambient host secrets from leaking into isolated cycles. Added a comment documenting this intentional precedence in 782d21d. Leaving this thread open for reviewer confirmation.

Comment thread packages/evolution/src/campaign.ts Resolved
Comment thread packages/memory/src/finalizer.ts Resolved
Comment thread packages/memory/src/finalizer.ts Resolved
Comment on lines +37 to +43
if (
entryScope.operatorFamily !== undefined
&& targetScope.operatorFamily !== undefined
&& entryScope.operatorFamily !== targetScope.operatorFamily
) {
return false;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · high
Field-strictness is asymmetric: driverConstraint mismatches when the entry has it and the target does not, but operatorFamily/boundPipeline only mismatch when both sides define them. An entry scoped to operatorFamily: 'cuda' therefore matches a target whose operator family is undefined/unknown, admitting a hardware-specific fact onto unverified hardware and weakening the hardware-evidence guarantee this PR introduces. Align the semantics (either all fields strict, or document why driver-only is strict). Note this also diverges from hardwareScopeOverlaps/hardwareScopesOverlap in finalizer.ts/verifier.ts, which treat an undefined side as universally compatible.

Suggestion:

Suggested change
if (
entryScope.operatorFamily !== undefined
&& targetScope.operatorFamily !== undefined
&& entryScope.operatorFamily !== targetScope.operatorFamily
) {
return false;
}
if (entryScope.operatorFamily !== undefined && entryScope.operatorFamily !== targetScope.operatorFamily) {
return false;
}
if (entryScope.boundPipeline !== undefined && entryScope.boundPipeline !== targetScope.boundPipeline) {
return false;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not changed (intentional design): driverConstraint fails closed when omitted on the target to prevent unverified driver transfers, whereas operatorFamily and boundPipeline are optional narrowers so an accelerator-level query ({ accelerator: 'sm_100a' }) can still retrieve sm_100a entries across operator families while excluding explicit mismatches (verified in packages/memory/test/hardware-scope.test.ts). Added a doc comment above hardwareScopeMatches in b260f75 clarifying this intentional asymmetry. Leaving this thread open for reviewer confirmation.

…and closure registration

Signed-off-by: thxCode <thxcode0824@gmail.com>
…ners

- Raise spawnSync timeout from 5s to 15s for --help subprocess checks.

Signed-off-by: thxCode <thxcode0824@gmail.com>
Comment thread packages/cli/src/evolve.ts Resolved
Comment thread packages/cli/src/evolve.ts Resolved
Comment thread packages/cli/src/main.ts Resolved
Comment thread packages/decisions/src/nodes.ts Resolved
Comment thread packages/decisions/src/nodes.ts Resolved
Comment thread packages/decisions/src/nodes.ts Resolved
Comment thread packages/evolution/src/bundle.ts Resolved
Comment thread packages/evolution/src/store.ts Resolved
Comment thread packages/evolution/src/campaign.ts Resolved
Comment thread packages/evolution/src/campaign.ts Resolved
Comment thread packages/hardware-runner/src/worker.ts Resolved
Comment thread packages/memory/src/finalizer.ts Resolved
Comment thread packages/memory/src/selector.ts Resolved
…and closure registration

Signed-off-by: thxCode <thxcode0824@gmail.com>
…mark-gate receipt forwarding

Signed-off-by: thxCode <thxcode0824@gmail.com>
…nd cascade nodes

Signed-off-by: thxCode <thxcode0824@gmail.com>
…r for dir and oci-layout

Signed-off-by: thxCode <thxcode0824@gmail.com>
…portfolio synthesis, and campaign orchestrator

Signed-off-by: thxCode <thxcode0824@gmail.com>
…line parser, and GPU quarantine

Signed-off-by: thxCode <thxcode0824@gmail.com>
…on verifier gate

Signed-off-by: thxCode <thxcode0824@gmail.com>
… audit schema, and hardwareScope projection

Signed-off-by: thxCode <thxcode0824@gmail.com>
@thxCode

thxCode commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Round 2 review feedback addressed across 8 signed fixup! commits (591402c..f34c2c4):

Fixed (14 of 17 inline threads + 1 failed-to-post high bug + 7 summary items + 1 CI flake)

  • Controller (559e827):
    • Scaled maxPacketBytes and packetAllocationLimit for multi-file evolve-block-guard.v1 packets (bounded by ArtifactStore's 96 MiB single-artifact cap) and wired handler in refusal-record.ts (addresses the failed-to-post high finding at verifier-protocol.ts:204-207).
    • Tightened EVOLVE_MARKER_CANDIDATE_COMMENT_RE so prose comments mentioning EVOLVE-BLOCK-START pass cleanly while malformed marker directives still fail closed (verifier-protocol.ts:1184).
  • Evolution (9d172a5, 18f9fd2):
    • Replaced synthetic evidenceDigest in createControllerChildRunEvaluator with the real verdict-receipt / canonical-evidence SHA-256 (campaign.ts:1889).
    • Made runWithConcurrencyLimit stop pulling new slots and drain in-flight workers cleanly on first error (campaign.ts:2009), and moved execFileAsync below imports.
    • Replaced blocking execFileSync('git', ...) calls with async promisify(execFile) in createLocalRunStoreSupervisorRunner (team-supervisor.ts:1489).
    • Dropped full Stage A blob Buffer retention in exportEvolutionBundle so blobs are re-read one at a time from CAS during staging writes (bundle.ts:1911).
    • Raised CI poll/stage timeouts in campaign-hardening.test.ts and campaign-e2e.test.ts to eliminate the unit (ubuntu-24.04, 2/3) contention flake.
  • Decisions (8893432):
    • Masked backtick template literals in normalizeEvolveBlockSource (nodes.ts:414).
    • Replaced .slice() with UTF-8 byte- and code-point-safe truncateUtf8CodePointSafe(..., 16_384, ...) so multi-byte/emoji slices never overflow DECISION_MAX_STATE_BYTES or split surrogate pairs (nodes.ts:628-629).
    • Aligned routeEvolutionStrategy and evaluateCascadeEscalation fallbackReason with evaluateMutationNovelty (nodes.ts:895, 1044).
  • Hardware Runner (4ccb251):
    • Enforced the combined forbiddenSymbolPatterns limit at submit time in parseBenchmarkRequest (relay-server.ts:682).
    • Added fail-closed rejection for 32-bit and universal Mach-O binaries in auditSealedStageAOutputs (evaluator.ts:3757).
    • Threaded allocatedDeviceIndices from evaluateBenchmarkJob through to post-crash healthProbeRunner (worker.ts:1609).
  • CLI (591402c):
    • Deep-scrubbed evolve status, inspect, export, and run/resume JSON payloads via scrubJsonPayload (main.ts:1920).
    • Added secret checks before staging parent JSON and scratchpad files (evolve.ts:97, 112), preserved credential resolution errors via { cause } (evolve.ts:377), validated evolve-block-guard.v1 files element types (evolve.ts:743), included code + path in supervisor failure diagnostics (evolve.ts:1329), surfaced skipped --out exports in the summary (main.ts:2111), and derived --help actions from EVOLVE_ACTIONS (arguments.ts, main.ts:2165).
  • Memory & Taskpack (5f407a7, f34c2c4):
    • Surfaced hardware_evidence_required_skipped:<N> in MemoryFinalizerOutcome.reason when non-hardware facts are suppressed (finalizer.ts:459).
    • Validated and defensively copied evolve-block-guard.v1 files, allowedBlockIds, and maxBlockBytes in compileDeclarativeTaskpack (taskpack.ts:2577).

Intentionally Left Open (3 of 17 inline threads)

  • packages/cli/src/evolve.ts:165: role.resourceIds === undefined means all trustedContext.resources (packages/controller/src/config.ts:28), which already includes appended evo-* resources; setting role.resourceIds ?? [] would drop pre-existing shared resources.
  • packages/evolution/src/store.ts:684: EVOLUTION_CLOCK_DRIFT (1000 ms step guard) is an intentional fail-closed monotonic clock fencing invariant; reopening via resume re-anchors on acquireLease.
  • packages/memory/src/selector.ts:42: driver-agnostic entries are intentionally eligible for driver-constrained targets on the same accelerator (packages/memory/test/hardware-scope.test.ts:680-740).

Verification

  • npm run build, npm run typecheck, npm run lint, npm run lint:docs, npm run site: passed cleanly.
  • Targeted & full package test suites (controller, decisions, memory, hardware-runner, taskpack, evolution --concurrency 1, cli): all passed.

Comment thread packages/cli/src/evolve.ts Resolved
Comment thread packages/cli/src/main.ts Resolved
…and closure registration

Signed-off-by: thxCode <thxcode0824@gmail.com>
…line parser, and GPU quarantine

Signed-off-by: thxCode <thxcode0824@gmail.com>
@thxCode

thxCode commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Round 3 review feedback addressed across 2 signed fixup! commits (baf4f93, d08f7bb):

Fixed (all 3 inline threads + 1 summary item + 1 CI timeout flake)

  • CLI (baf4f93):
    • Pre-read and secret-checked all staged parent JSON files and scratchpad markdown bytes before creating/writing .loopwright-evo/ files so SECRET_LEAK_DETECTED never leaves partial writes on disk (packages/cli/src/evolve.ts:90).
    • Failed closed when an explicit evolve-block-guard.v1 check omits parameters.files (packages/cli/src/evolve.ts:759).
    • Changed scrubJsonPayload to fail closed with "[REDACTED:DEPTH]" past depth 32 instead of returning an unscrubbed subtree (packages/cli/src/main.ts:1851).
    • Raised worker lease/stage/request and subprocess timeouts in packages/cli/test/evolve-cli.test.ts to eliminate the unit (ubuntu-24.04, 1/3) CI contention flake.
  • Hardware Runner (d08f7bb):
    • Removed the dead 0xcafebabe LE branch and distinguished universal Mach-O fat binaries (0xCAFEBABE BE with nfat_arch in 1..20 and non-.class name) from Java .class bytecode (packages/hardware-runner/src/evaluator.ts:3757), with unit tests for both cases.

Verification

  • npm run build, npm run typecheck, npm run lint: passed cleanly.
  • hardware-runner and cli (98/98) full test suites: passed cleanly.

Comment thread packages/cli/src/evolve.ts Resolved
…and closure registration

Signed-off-by: thxCode <thxcode0824@gmail.com>
…line parser, and GPU quarantine

Signed-off-by: thxCode <thxcode0824@gmail.com>
@thxCode

thxCode commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Round 4 review feedback addressed across 2 signed fixup! commits (65199b5, 13372b8):

Fixed (both inline threads + CI timeout hardening)

  • CLI (65199b5):
    • Re-verified sha256Digest(bytes) against pf.digest when reading staged parent context files in writeCompiledEvolutionDir, failing closed with ARTIFACT_INVALID on digest mismatch (packages/cli/src/evolve.ts:95).
    • Aligned benchmark-gate.v1 request timeoutMs with taskpack defaults (30_000ms), scoped the SIGINT trigger in packages/cli/test/evolve-cli.test.ts specifically to bucket: bs16-isl8k, and added full evolve inspect failure diagnostics.
  • Hardware Runner (13372b8):
    • Dropped the filename extension carve-out from universal Mach-O detection so 0xbebafeca (0xCAFEBABE BE) disambiguation against Java .class files relies purely on the content-based readUInt32BE(4) 1..20 bound (packages/hardware-runner/src/evaluator.ts:3760), with a spoofed .class regression test.

Verification

  • npm run build, npm run typecheck, npm run lint: passed cleanly.
  • stage-audit-and-quarantine.test.js and evolve-cli.test.js: 12/12 passed cleanly.

@thxCode
thxCode merged commit 28d29da into main Nov 24, 2026
15 checks passed
@thxCode
thxCode deleted the spec/evolutionary-campaigns-pareto-archive-and-bundle-export branch November 24, 2026 08:46
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.

1 participant