Skip to content

chore: reconcile upstream through fdc7754a - #359

Merged
bompus merged 6 commits into
fork/consolidatedfrom
reconcile/upstream-2304
Oct 2, 2026
Merged

bompus merged 6 commits into
fork/consolidatedfrom
reconcile/upstream-2304

Conversation

@bompus

@bompus bompus commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Reconcile upstream through fdc7754a (colbymchenry#2280–colbymchenry#2284). This is the first of three batches toward 9d4e805b. It lands as a merge commit so upstream stays an ancestor.

What comes in from upstream:

Where the fork keeps its own behavior:

  • Stale answers. The fork still warns and answers, naming every file it couldn't verify. Upstream refuses instead and lists only the first 20 unchecked files. The fork already sent this answer as text only.
  • Host notifications. isHostNotification already covered task notifications. Only upstream's isAgentMessage is added.

Where the fork changes to match upstream:

  • Idle release. Upstream's timer replaces the fork's interval sweep. The setting is now CODEGRAPH_PROJECT_IDLE_TIMEOUT_MS (README and site doc updated). The fork's duplicate test and CHANGELOG entry are removed.

Fix to upstream's idle release: upstream's timer kept whichever deadline was armed first. Suppose an older project's catch-up was still running when a newer project armed the timer. When that catch-up finished, the older project waited for the newer deadline, up to almost twice the timeout, and held its writer lock that long. Every trim now re-arms the timer. A new fake-timer test (mcp-idle-release-order.test.ts) fails without the fix: nothing has been released at 3.6 s. With the fix it passes.

Changes for the fork:

  • mcp-server-discover.test.ts no longer passes the WASM runtime flags, since the fork has no WASM parser.
  • Upstream's new windowsHide guard test flagged five spawn sites that only exist in the fork. They now set windowsHide. fork() passes its options on to spawn(), but ForkOptions doesn't declare the key, so it is spread in.
  • CHANGELOG: the union merge had pasted in about 60 upstream entries the fork had already reworded. The section is rebuilt from the fork's text plus upstream's Windows, prompt-hook and idle-release entries. The discover and structuredContent entries are folded into the fork's existing ones.

Validation: tsc clean. Targeted tests pass, 94/94, across frontload-hook, mcp-server-discover, child-process-windows-hide, mcp-stale-refusal, mcp-status-freshness, mcp-projectpath-lifecycle and readme-sync. The full suite passes: 7,087 tests across 562 files, with 34 existing skips and no failures. Kernel sources are unchanged, so the golden dumps are not affected. An independent review passed on round 3. Round 1 found the idle-timer bug; round 2 asked for a deterministic test in place of the timing-based one.

README rows checked: the upstream merge point (now fdc7754a), the "About this fork" tables (no row covers these features), and the measured-results rows (unaffected).

Follow-up, not in this PR: upstream's windowsHide guard test accepts a spread that later sets the key to false, as in { windowsHide: true, ...{ windowsHide: false } }. No source file does this today.

colbymchenry and others added 6 commits October 2, 2026 04:09
…enry#2094) (colbymchenry#2280)

* fix(windows): hide the git calls that flash console windows (colbymchenry#2094)

The two git calls added for exclude-standard scope parity (colbymchenry#1728),
`git config --get core.excludesFile` and
`git ls-files -o -i --exclude-standard --directory`, ran without
windowsHide. Inside the detached, console-less MCP daemon each one got a
fresh visible console, so a window flashed several times on daemon start
and again on every auto-sync. With Windows Terminal as the default
terminal each flash is a full Windows Terminal window. `git config
user.name` in the viewer's trails API had the same gap.

Add windowsHide: true to all three, and replace the per-file regex guards
with an AST guard over every child_process spawn in src/: options passed
through a variable or a function parameter are traced back to the object
literal that defines them, through every call site.

Supersedes colbymchenry#2095 (same fix, rebased on current main). Closes colbymchenry#2094,
closes colbymchenry#2096.

(cherry picked from commit dd2db41)

* docs(changelog): credit the Windows console-window fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit cf93d497fd1b38fd9214945eeb55b6b0be9e2007)

---------

Co-authored-by: Suharaz <minesuhara@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
colbymchenry#2184) (colbymchenry#2281)

* fix(prompt-hook): skip Claude Code <agent-message> subagent hand-backs

Claude Code delivers a subagent's report to the parent session as a
UserPromptSubmit prompt wrapped in <agent-message from="…">…</agent-message>.
The prompt hook treated it as user input and ran a full codegraph_explore
on the whole report, which is slow on a multi-KB prose query (past the
30 s hook timeout in the report) and injects context unrelated to the
user's question.

Add isAgentMessage next to isTaskNotification (colbymchenry#1832) with the same rule:
only a prompt that is entirely the envelope is skipped, so a user question
that mentions the tag still goes through the gate.

Fixes colbymchenry#2184

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 240022d)

* docs(changelog): credit the prompt-hook hand-back fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: danusha2345 <ewidusoc498@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…enry#2084) (colbymchenry#2282)

* fix(mcp): answer server/discover locally in the stdio proxy (colbymchenry#2084)

Clients that probe `server/discover` before the legacy `initialize`
(Antigravity 2.5) wait for its answer. The proxy forwarded it to the shared
daemon, so no reply was written until the daemon connected: a client that
closed stdin first got nothing, and with the daemon unavailable the reply
came ~6s later as -32603 "daemon unavailable". Answer it in the proxy with
-32601 Method not found, which is what sends such a client on to
`initialize`. The direct and daemon sessions already answer unknown methods
with -32601; the new test pins that too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 77db6c6)

* docs(changelog): credit the server/discover fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: danusha2345 <ewidusoc498@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…mchenry#2087) (colbymchenry#2283)

* fix(mcp): release an idle explicit project and its writer lock (colbymchenry#2087)

A daemon that answered a `projectPath` query for another indexed project
opened it in-process and, with no owner there, took its writer lock. The
project cache only evicted over its LRU bound or on shutdown, so the lock
stayed held for the daemon's whole life: the project's own daemon could not
become its writer and `codegraph index` there was refused.

Release a cached explicit project once it has gone unused for 10 minutes
(CODEGRAPH_PROJECT_IDLE_TIMEOUT_MS; 0 never releases), through the same
trim path as LRU eviction, so an active call or a running catch-up still
defers it. The next call reopens the project and catches it up (colbymchenry#1835).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 092d49d)

* docs(changelog): credit the idle project release

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: danusha2345 <ewidusoc498@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…#2088) (colbymchenry#2284)

* fix(mcp): return status and stale refusals as text only (colbymchenry#2088)

Claude Code shows the model a tool result's structuredContent in place
of its content text, under every protocol version. codegraph_status and
explore's stale-index refusal both set structuredContent.freshness, so
the model saw a JSON object instead of the refusal, its retry guidance
or the status report. The text already carries every field, and nothing
in the codebase reads structuredContent, so both results drop it.

The tests now assert that the field is absent and that the text keeps
the refusal line and the stale file list.

(cherry picked from commit 18d65f8)

* fix(mcp): list every unverified file in the stale refusal (colbymchenry#2088)

(cherry picked from commit f1b0ec7)

* fix(mcp): keep the stale refusal's unchecked-file list bounded

The text-only refusal now names the first 20 files it could not verify and
counts the rest, as it did before; an impact answer over a hub symbol can
leave thousands unchecked, and every one of them would land in the agent's
context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit c4513a66c9ae6bb10ede80d102d4122ed7f0508d)

* docs(changelog): one entry for the text-only results fix

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Aaron Queen <bompus@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Brings in upstream colbymchenry#2280-colbymchenry#2284: hidden git calls on Windows, the prompt
hook skipping subagent hand-backs, the local server/discover answer, the
idle release of a projectPath project, and text-only status results.

The fork keeps its own versions where it already had one:
- Stale answers still warn and answer, naming every file the freshness
  check could not verify, instead of refusing.
- isHostNotification already covered task notifications; only
  isAgentMessage is added.

Upstream's idle release replaces the fork's interval sweep, so the
setting is now CODEGRAPH_PROJECT_IDLE_TIMEOUT_MS. The new windowsHide
guard test found five fork-only spawn sites, which now set it.

Upstream's idle timer kept whichever deadline was armed first. An
older project whose catch-up finished after a newer project armed the
timer then waited for the newer deadline. Every trim now re-arms it.
@bompus
bompus merged commit ec9aee7 into fork/consolidated Oct 2, 2026
3 checks passed
@bompus
bompus deleted the reconcile/upstream-2304 branch October 2, 2026 13:47
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.

2 participants