Skip to content

SessionStart warm-path residue after #662-#667: 30 spawns left, 9 of them rm -f, and the jq-less path misses the #668 start-context cache (Part of #660) #679

Closed

Description

@fdaviddpt

Part of #660.

Measured

tests/test_session_start_windows_benchmark_669.py's harness (tests/spawn_counting.py, counts execs) on main at 1c8301c, macOS, after #675, #676, #677 and #678 landed today:

tree jq present cold / warm jq absent cold / warm
main this morning (v0.31.0 + #668 cache) 76 / 39 93 / 76
main now 49 / 30 34 / 32

The 30 warm spawns on the jq-present path, by command (all foreground -- the harness runs the hook to exit; detached work never reaches the log):

jq-less only (the fresh Git for Windows default):

Cost

Reasoned, not measured on Windows: 30 execs at blakeh8's own 50-200 ms per spawn under Git Bash is 1.5-6 s; the floor after the items above is ~10-12 spawns on both paths, ~0.5-2.4 s. The jq-less cache miss alone is 8 spawns that the jq path already does not pay.

Fix shape

One lane, hot path only, in this order of payoff: (1) make the start-context cache and the tools cache work on the jq-less path (positive control: jq masked off PATH, second start shows no cat identity.md and no python3 -V; negative: with the cache file deleted they run once); (2) $(<file) for every cat on the path; (3) one rm -f at exit for the temp files, or gate on -e; (4) trap -p strip via parameter expansion; (5) the sleep 1 watcher gated on a finite budget. Pin the result with the existing benchmark budgets (JQ_PRESENT_WARM_SPAWN_BUDGET and the jq-absent twin in tests/test_session_start_windows_benchmark_669.py), lowered to the new number.

[AI-generated]

Activity

  1. added
    priority:medium
    filed-by-loop
    lane-capture
    on Sep 12, 2026
  2. self-assigned this
    on Sep 12, 2026
  3. added 2 commits that reference this issue on Sep 19, 2026
  4. added 2 commits that reference this issue on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

filed-by-looplane-capturepriority:medium

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions