Skip to content

Preserve environment values across the GEAK handoff and return path #1429

Description

@iraj465

The GEAK handoff writer can corrupt a current-best environment value before GEAK parses it. It joins assignments with spaces without quoting each complete assignment.

For example, extra_envs={"CUSTOM_CONFIG_PATH": "/models/shared config.json"} is forwarded as CUSTOM_CONFIG_PATH=/models/shared config.json. The actual GEAK parser rejects the second word as an environment entry without =. Apostrophes can produce an unmatched quotation, and backslashes can be removed during shell tokenization.

The structured baseline_env_spec.config.extra_envs still contains the original value. The defect is in the redundant shell-string serialization of accepted_env, so GEAK can also report a conflict between two fields that were meant to describe the same environment.

A regression invoking the real Hyperloom handoff writer reproduces four failures on main f02fd43659ebf13b563bbe4c079041d1417847fb: spaces, JSON text, apostrophes, and backslashes. Empty and plain values are controls. Serialize the complete assignment tokens with shlex.join so shell parsing recovers their original values.

GEAK also independently canonicalizes some JSON environment strings during parsing. That consumer defect needs its own correction; this issue concerns Hyperloom's serialization. Neither environment defect has been attributed to a saved production run, so historical funnel impact is unquantified.

The return path has a separate, now-reproduced consumer defect. In Kimi CI session 20260824T090746Z-dcb5bfc6, task eb34e60877cd49f382ba207bf9ea779e, prose in GEAK's accepted_config.env became RUN_EVAL=true; and EXTRA_ENV=). in the actual warmup YAML, with no retained evaluation output. GEAK has published validated env_map since commit 5f71eccc, while retaining raw env for provenance. Hyperloom's consumer still ignored that map.

PR #1428 now uses the structured map when present, including empty maps, and retains legacy parsing only when the map is absent. The materiality gate, KernelPhase and dispatched GridVariant share that normalization. Invalid map types fail explicitly; existing environment-key filtering remains.

Native CPU replay through the actual producer, consumer, GridVariant and YAML writer yields true;, true;, and true for historical/current, current/current and current/corrected combinations. A retained local Magpie evaluation predicate enables evaluation only in the last case. Exact historical CI-generated script bytes were not recovered, so this is not claimed as a full historical executable reconstruction. Replay SHA256: 630332b19407431afcfcd8f8649886c6d17ad03e4c6742cf081c6b4326b8d6bc.

Current PR head ecf07f0b7bd8ffb2ae65bcafea1927e0275d1d8f passes 20,681 local full-suite tests, 43 skips, 8 expected failures and 15 subtests, plus Ruff, format and REUSE. The return-map correction has 80 focused passing tests and an independent review. This establishes configuration recovery; it does not establish a new GPU gain or dashboard contribution.

Activity

  1. changed the title [-]GEAK handoff environment strings lose spaces, quotes, and backslashes[/-] [+]Preserve environment values across the GEAK handoff and return path[/+] on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions