Skip to content

GHOST v1.8.0

Latest

Choose a tag to compare

@github-actions github-actions released this 28 Nov 16:07
· 3 commits to main since this release
ad24ca0

[1.8.0] - 2026-11-28

Added

  • ZCode reset hardening (2026-11-28) — the new fixture tests exposed and
    fixed FOUR latent bugs in reset_zcode.ps1 (plus one shared across the four
    thin-manifest resetters): the QuickEdit guard now opens CONIN$ (the INPUT
    buffer QuickEdit lives on) with the correct GENERIC_READ|GENERIC_WRITE
    access and an ExactSpelling SafeFileHandle import, verify-then-claim
    ([console] QuickEdit disabled for this console (verified).), and a
    -DryRun plan leaves both the mode and the output untouched — the old
    CONOUT$ guard could never have cleared anything (wrong buffer AND access
    0xC0400000, both probed); the Both/All orchestrator launched children with
    the undefined $v14Script (every Both/All run died at the first child) —
    now a self-contained $orchestratorScript dispatch; an explicit
    -SkipQoder reaches the Primary child and the dry-run plan; the "IDs were
    generated" NOTE only prints when no child failed (a [FAILED] line
    otherwise); steps [7/27] (Qoder argv.json) and [24/27] (~/.qoder caches)
    were ungated — clone resets and Primary -SkipQoder rotated the shared
    Qoder crash-reporter id and wiped ~/.qoder caches; the success banner is
    finally v1.5; and Invoke-StoreDelete across zcode/qoder/qoderwork/minimax
    could never have fired through the v1.5 shape (a "" label element fails
    Mandatory [string[]] binding on PS 5.1 AND pwsh, and PS 5.1 then drops
    empty native args so argparse demanded the label) — the core's
    store-delete label is now optional (nargs="?", omitted = derived from
    --root-path, the documented contract). New tests:
    reset_zcode_console (live CONIN$ fixture) + reset_zcode_orchestrator
    (real child dispatch over inert stubs) + reset_store_delete (17 total).
  • AutoClaw2 chat lineage + all-to-all mesh sync (2026-11-28) — the chat
    import layer grew an identity: imports are now tracked per ORIGIN
    (ChatLineage back-traces each imported session to its source
    profile/session through the sidecar, with cycle + unknown-origin
    refusals), the active-account pointer (device\active-product-account.json)
    drives account selection, and every chat writer holds a cross-process
    lock (Local\GhostAutoClaw2ChatMesh-<sha> / flock on POSIX). New core
    verbs + tools: ac2-chat-reconcile (account-scoped, digest-planned,
    reversible cleanup of duplicated import history — dry-run returns a
    plan_id, apply re-verifies plan + closed target + backup inside
    BEGIN IMMEDIATE) and ac2-chat-mesh (convergence across Primary +
    c1..c5: per-lineage winners/forks by prefix-extension, append-only
    replay that never seeds a target work queue, sidecar-before-commit
    provenance, one retained verified backup per account, busy profiles
    QUEUED never stopped); tools/watch_autoclaw2_chat_sync.ps1 (resident
    watcher on a runtime signature + -RunOnce preview/apply + autostart,
    AutoClaw2 [26] preview / [27] apply, gids 137/138),
    tools/launch_autoclaw2_primary_sync.ps1 (Sync & Open Primary Desktop
    handoff — waits for Primary to quit, one gated pass, relaunches the
    stock exe non-elevated), tools/inspect_autoclaw2_chat_runtime.ps1
    (fail-closed busy-profile probe by --user-data-dir, never exe color)
    and tools/autoclaw2_primary_lnk.ps1 (shared stock-lnk drift library).
    The clone launcher now matches windows by exe path (splash-swap-safe
    taskbar kick), sets ZWORK_RELAUNCH_NAME/ZWORK_RELAUNCH_COMMAND and
    repairs a stock lnk Windows retargeted during cold start;
    patch_autoclaw2_identity.ps1 is engine v3 (fifth window-relaunch
    anchor); the shortcuts installer's -RepairPrimaryAumid is rebuilt on
    the lnk library (AUMID or per-color-exe drift, hash-verified backups)
    with -RefreshTaskbar. Spec docs extended
    (AUTOCLAW2_SYNC_SPEC.md lineage/reconciliation/mesh sections).
  • CS-7: OpenCode config-sync goes LIVE (2026-11-22) — the Phase-0 probe
    (controlled live test on clone c1 running its own v2.3.2 service with the
    config directory watcher armed) LIVE-VERIFIED that a running desktop
    clone re-reads its config on change: an external edit fired
    config.updated in the clone's service log within ~2s, for BOTH write
    styles (in-place AND the atomic temp+Replace swap). So
    sync_opencode_config.ps1 now syncs RUNNING clones by default (with a
    live-reload verify-after that polls the clone's own service log for the
    fresh event and reports VERIFIED / NOT observed — absence is a WARN,
    never a failure: the v1 npm CLI binary is startup-only);
    -SkipRunning restores the old skip as an opt-out. Two hardening fixes
    rode along: the merge write is now ATOMIC (temp + File.Replace), and
    the merge containers were fixed to the app's REAL shape (mcp.servers.*
    nested + direct mcp.* entries — the old flat walk let the Primary's
    whole servers block silently drop clone-only servers inside it;
    regression-tested). Audit entries gain running/liveReload. Probe
    history + the service-sharing discovery recorded in
    docs/OPENCODE_CONFIG_SYNC_PLAN.md §Phase-0 and TASK_BACKLOG (new CS-10
    spike).
  • CS-10: the OpenCode v2.3.2 service-sharing isolation break — fixed
    per-launch (2026-11-23)
    — v2.3.2 keeps a machine-global background
    service registry ($XDG_STATE_HOME ?? ~/.local/state\opencode\service.json)
    and the desktop app JOINS a live compatible service at startup BEFORE the
    patched clone-home branch can set XDG_STATE_HOME; since the service
    process owns the data home, a joining clone's sessions landed in the
    Primary's opencode.db (db-verified). launch_opencode_clone.ps1 now
    sets the four XDG_* levers at PROCESS-ENV level around Start-Process
    (saved/restored) — the clone always spawns its OWN clone-local service
    (live-verified: the Primary db byte-untouched with the Primary daemon
    up) — plus a read-only machine-registry guard (WARN when the recorded
    pid is alive; GHOST never writes/deletes the registry). The registry
    tail is now CLOSED (2026-11-28, deep-mined + patched): the app never
    writes service.json — the spawned CLI child self-registers using the
    XDG_STATE_HOME its env carried at process start, and the app's UNIQUE
    win32 desktop-init deleter (delete process.env.XDG_STATE_HOME, ONE
    site in the whole asar) always strips that lever, so the child
    registered machine-default (last-writer-wins — the next Primary launch
    would join the clone's daemon). Patch engine v5 guards the deleter with
    the patch's own global (globalThis.__opencodeCloneHome||): the child
    now registers at <cloneHome>\state\opencode\service.json, the machine
    registry is only ever written by the Primary's own service, and the
    Primary keeps stock behavior (anchor drift aborts; anchor-absent
    pre-2.3.2 builds skip loudly; 2.4.2 anchors re-verified — the vy
    deleter is still exactly one site, and a full-engine dry-run on the
    live 2.4.2 asar — candidate to %TEMP%, no swap — passed the complete
    pipeline: totals 1/1/1, node --check clean, rebuild + verify OK).
    The swap then ran live (2026-11-28, OpenCode closed) and exposed a
    real driver bug: the post-swap probe passed a JSON array through the
    PS 5.1 native-argument boundary, which STRIPS embedded double quotes
    — JSON.parse threw AFTER the fully successful swap and the run's
    marker was lost (the machine was repaired: the marker written with
    verified metadata, the backup pairing verified pristine). Driver v5.1
    embeds the need list as a single-quoted JS literal (the shape that
    survives the boundary) and re-pairs a markerless-but-patched asar with
    a scanned pristine backup instead of backing up the patched bytes.
    LIVE ACCEPTANCE PASSED on c1: c1\state\opencode\service.json
    appeared (the spawned child registered CLONE-LOCALLY), the machine
    registry stayed byte-untouched through every step, and a second c1
    launch REUSED the clone's own service. One manual ingredient — the
    per-clone port — became the new CS-11 spike: v2.4.2 FIXED the
    service port at the compiled default 28894 and refuses to start on
    collision
    (the 2.3.2-era "ephemeral port" verdict is superseded);
    opencode service set port <port> persists per-clone to
    <configHome>\opencode\service.json, so the launcher seeding a frozen
    per-clone port map is the remaining fix.
  • CS-11: the per-clone service-port seeding (2026-11-28) — the fix
    for the 2.4.2 fixed-port collision. A shared helper
    (src/windows/ghost_opencode_service_port.ps1) carries the frozen
    map c1..c5 → 28901..28905 (mutual distinctness only — the port
    default is version-computed, not a literal) and
    Initialize-GhostOpenCodeServicePort seeds
    <cloneHome>\config\opencode\service.json: a valid existing port is
    SKIPPED loudly (a hand-tuned port is never overwritten), otherwise the
    file is MERGED (every existing key preserved — notably the pre-shared
    service password — and port set), written atomically via the shared
    Write-JsonNoBom (no BOM), verify-after re-read, warn-never-block.
    Wired into BOTH launchers: the desktop launcher's new [2d/5]
    pre-launch step and the light worker's run path (its default run
    auto-starts the same serve --service child); -Status surfaces the
    seeded port. Functional fixtures (fresh/skip/merge/invalid-JSON) +
    launcher/light pins. Live c2 acceptance: the fresh seed wrote
    28902, the child started with ZERO collision errors and registered
    clone-locally on 28902 (machine registry byte-untouched) — two seeded
    instances now coexist live.
  • TA-2 (partial): the status tools run on the shared classifier
    (2026-11-28)
    — of the 8 real per-suite classifier sites, the two
    non-destructive STATUS tools are flipped onto
    tools/suite_status_lib.ps1: status_zcode_instances.ps1 (running-
    ness from the lib; its detail probes — roaming/clone home/deviceMid —
    and the commit pressure stay) and diagnose_suite_pressure.ps1 (the
    [1] table lib-backed with the snapshot injected, which ADDS the
    subtree-marker walk and the LightWorker column it lacked). The taskbar
    watchers (need a window→instance lib API) and the four reset
    kill-target resolvers (kill-safety deltas) stay, recorded with
    reasons. Factual drifts reconciled with evidence: the per-color
    AutoClaw2 exe copies DO exist (the reset's stale comment fixed), and
    the AutoClaw2 profile lockfile is live-verified (exists exactly
    while the app runs, gone after stop) — the lib's autoclaw2 row gained
    the lockfile probe, so a HELD lock now claims a stock-exe clone and
    the blanket "UNCLASSIFIABLE" note is gone for that suite.
  • Repo-hygiene wave (2026-11-28) — four recorded follow-ups closed in
    one pass: the merge-helper trio (ConvertTo-DeepHashtable /
    Test-DeepEqual / Write-JsonNoBom) moved into the shared
    tools/json_merge_lib.ps1 (the three pure merge cores dot-source it;
    the dedup also FIXED A REAL BUG — cline_mcp_merge.ps1's drifted copy
    compared $B[$i] instead of $eb[$i] in the array branch, diverging
    for non-IList enumerables; the shared lib is the ATOMIC writer shape);
    the two redundant literal 1-136 dispatch-header pins deleted (the
    generic repo-integrity pin derives the ceiling and is strictly
    stronger); the 24h ID_Backups purge floor (the #73 zcode policy shape)
    ported to reset_cursor.ps1 + reset_devin.ps1 — a same-day re-run
    can no longer erase the only undo copies of an earlier chained run
    (trae/zcode/qoder already carried it); and the one stale doc spot
    (docs/architecture.md patch row → engine v5). Pins: the purge-floor
    contract across all five floored resetters + a no-inline-copies guard
    on the three merge cores.