Skip to content

WIP: merge train verification (153 + fd-hygiene + migration + latency-shield)#155

Merged
ualtinok merged 11 commits into
mainfrom
wip/merge-train-153
Jul 10, 2026
Merged

WIP: merge train verification (153 + fd-hygiene + migration + latency-shield)#155
ualtinok merged 11 commits into
mainfrom
wip/merge-train-153

Conversation

@ualtinok

@ualtinok ualtinok commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

CI-as-gate: local box has a machine-level exec wedge (fresh binaries SIGKILL/hang on spawn — syspolicyd/AMFI, needs reboot). This draft PR exists to run the full test matrix on the merge train while local verification is impossible. Will be closed, never merged as a PR (train lands via fast-forward push to main).


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.


Summary by cubic

Refreshes LSP paths after auto-install without restarting bridges and adds a TypeScript doctor warning. Also bounds idle project artifacts, shields configure from heavy-init saturation, refines PATH detection to avoid unnecessary login-shell probes, and restores Windows LSP spawns; adapts migration tests for background-lane behavior and improves CI stability.

  • New Features

    • @cortexkit/aft-bridge: add BridgePool.reconfigure(projectRoot, overrides) and apply updated lsp_paths_extra to live bridges after npm/GitHub installs; future spawns inherit via pool overrides. RevivableTransportPool now forwards reconfigure so post-install path refresh survives revival.
    • @cortexkit/aft-cli doctor: warns when the TypeScript server is running but the project cannot resolve the typescript package.
  • Refactors and Fixes

    • Executor: cap HeavyInit concurrency to always leave a worker for RouteBind/configure, preventing fresh binds from being delayed.
    • subc: evict idle per-project caches and stop watcher runtimes after 30 minutes; reopen lazily and reattach watchers on first request.
    • Callgraph store: treat legacy DBs as read-only fallbacks and schedule migration on next write-capable configure; active DBs are resolved via generation pointers for atomic swaps.
    • @cortexkit/aft-bridge: export stripHarnessSpecificConfigKeys, OPENCODE_ONLY_KEYS, and PI_ONLY_KEYS; opencode-plugin and pi-plugin strip the other harness’s top-level keys before strict validation; unknown keys still fail.
    • PATH handling: introduce effective_path::new_command, stabilize login-shell PATH probing (incl. fish), and refine impoverishment detection to only core tool dirs; use it for git, formatters, and spawned tools to avoid transient PATH failures.
    • LSP client (Windows): restore std::process::Command import for batch-file spawn path to fix LSP startup on Windows.
    • CI/tests: split effective_path::new_command into unix/non-unix for Windows warnings; relax bind-blocker snapshot test; compare only SQLite data files; adapt adversarial migration tests to background-lane migration; add AFT_TEST_RAW_PATH to keep test PATH raw for missing-binary simulations; PATH-feature test opts out of this seam (AFT_TEST_RAW_PATH=0 or empty disables it).

Written for commit 4025daa. Summary will update on new commits.

Review in cubic

ualtinok and others added 11 commits July 10, 2026 03:59
Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
…failures

Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
The PATH-enrichment change routed unix LSP spawns through
effective_path::new_command and dropped the std::process::Command
import, breaking the cfg(windows) cmd.exe branch.

Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
The revival ownership layer predates the reconfigure() interface
method added by the LSP fresh-install fix; forward it to the active
pool so post-install LSP path refreshes survive a revival. Biome
autofix over the merged train files.

Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
Impoverishment detection now checks only the core tool dirs (homebrew,
/usr/local/bin, cargo, ~/.local/bin). The interactive-gated extras
(bun, pnpm, mise, deno, volta) are appended to every constructed PATH
anyway, so their absence alone must not trigger a login-shell probe —
and on developer machines where they exist on disk, the old combined
list made every rich PATH read as impoverished. Fixes the two CI test
failures on real runner filesystems.

Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
- effective_path::new_command splits into unix/non-unix variants so the
  Windows build has no unused-mut under -D warnings
- bind-blocker snapshot test retries the try-lock briefly instead of
  demanding the first attempt wins the scheduler-lock race
- legacy-preservation assertion compares SQLite data files only: any
  read-only connection open rewrites -wal/-shm sidecars by design, which
  Linux runners surfaced deterministically

Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
… PATH test seam

- crash/retry mid-migration mechanics drive migrate_legacy_with_lease
  synchronously (thread-local failure seams apply on the calling thread);
  the background integration path is covered by the convergence test
- old-binary drift test polls with the runtime drain, matching how
  background migration results install in production
- AFT_TEST_RAW_PATH seam: test-spawned aft processes keep their exact
  constructed PATH (login-shell probe + standard-dir enrichment would
  re-add real tool dirs and break missing-binary simulations)

Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
The AFT_TEST_RAW_PATH isolation seam (added so formatter/checker tests can
construct exact impoverished PATHs) defaults ON for every harness spawn,
which silently disabled the probe+enrichment pipeline inside the one test
that exists to verify it. The seam now treats "0"/empty as unset and the
PATH test opts back in.

Co-authored-by: Alfonso <289616620+alfonso-aft@users.noreply.github.com>
@ualtinok ualtinok merged commit 4025daa into main Jul 10, 2026
10 checks passed
@ualtinok ualtinok deleted the wip/merge-train-153 branch July 10, 2026 10:02
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