Repository navigation
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
|
it looks like the three failed checks came from a race condition, could you please rerun the failed jobs? |
|
Thank you for the detailed investigation and for being transparent about the implementation. This changes request sending, reconnect, replay, cancellation, and shutdown ownership, so we are reviewing the correctness and safety boundaries carefully. We will come back with a maintainer decision, including how to handle the failed jobs, once that review is complete. Our review queue is currently full, so this may take a little time. Thank you for your patience and for offering to revise the change. |
|
as far as the usability is concerned I have not experienced any problems/crashes since implementing this locally over the last 5 days |
Signed-off-by: Pxx500 <pbartulik@gmail.com>
Signed-off-by: Pxx500 <pbartulik@gmail.com>
4cf2acf to
b9da6dc
Compare
|
Thanks for the rebase yesterday — the substance holds up under a hostile read, and that is the part that matters most for a recovery path. Replay safety is sound: Four things before it can merge, the first two blocking:
cbm_daemon_frontend_session_config_t session = {
.bootstrap = { .role = CBM_DAEMON_PROCESS_MCP_CLIENT,
.endpoint = fixture.maintenance.endpoint,
.identity = &fixture.identity,
.executable_path = "unused",
.connect_timeout_ms = 30000, .startup_timeout_ms = 30000 },
.session_root = fixture.maintenance.parent,
.tool_profile = CBM_MCP_TOOL_PROFILE_ALL,
};(with
Keep the sign-offs on the rebased commits and this merges on green. |
Signed-off-by: Pxx500 <pbartulik@gmail.com>
|
looks like another race condition in the Windows cold-start test, one of six concurrent clients failed to create its CLI coordination endpoint, could you please rerun the failed job? |
|
@DeusData (ping for visibility) |
|
all green 👍 @DeusData |
|
Thank you for your patience — twelve days after "all green" is longer than this deserved, and the delay is ours. Here is where it stands, concretely. All four review items are addressed, and I have checked each against the code rather than the description:
All three commits are signed off; the two One thing I missed on 5 September, and it is on me, not you. What happens next. You labelled this PR as AI-generated in its first line and then stood behind every claim in it, including five days of running it yourself. That is precisely how we would like such contributions to be made. |
|
An update, and one small thing that is new since the review — caused by a rule that landed on I brought your branch up to date with
The cheapest honest fix: the same buffer is already freed at the bottom of the loop (line 635). Put the release behind one tiny helper and call it from both places — static void frontend_response_reset(char **response, size_t *response_length) {
free(*response);
*response = NULL;
*response_length = 0;
}— which replaces two raw sites with one (13 − 2 + 1 = 12, exactly the recorded count), and also removes the three-line reset you currently spell out before the retry. Please do not raise the number in Once that is pushed, lint goes green and the full matrix runs on your branch for the first time against current Thank you for bearing with a moving target. |
Signed-off-by: Pxx500 <pbartulik@gmail.com>
|
@DeusData this PR has been in the works for longer than anticipated and I'm forgetting about it, can we finally get it merged (or if you have any more small reviews just fix them yourself and merge)? |
|
Thank you, @Pxx500, and thank you for sticking with this through a moving target. The helper is exactly what the ratchet needed: both release sites now go through What's left is on our side, as promised: let the full matrix finish on this head, build and run the daemon suites on the merge result locally, and then the maintainer's merge decision. It's a recovery path in the daemon, so it gets a deliberate yes rather than an automatic one. The clean-EOF test's 16-second handoff stays our follow-up, with credit to you. You don't need to do anything more unless that verification turns something up, and if it does we'll say so here right away. |
|
Thank you for your patience, @Pxx500. Nothing is needed from you. Since our last note, main has moved a long way: it now conflicts with your branch in src/main.c, and one change on main (the startup requests now wait within the startup budget instead of the 1 s probe budget) also applies to the context and UI settings your recovery path replays. We will merge main into your branch ourselves, carry that one adjustment over to the recovery replay, run the daemon suites on the result locally as promised, and then take it to the merge decision. We will post here as soon as that is done. |
|
Thank you for your patience with the daemon-recovery change. We still owe the main integration and startup-budget adjustment described on October 20, followed by verification. Nothing is needed from you for that handoff. Sorry for the delay—I’ll follow up soon. |
src/main.c conflicted in two hunks of the stdio server startup. Both keep the recovery structure of this branch and carry the startup budget from main (eb29429) into it: - set_context: the inline main_session_context() + set_context() of this branch stays (the recovery replay needs mcp_session_root and mcp_allowed_root), with its endpoint free on the failure path; the timeout bootstrap_config.startup_timeout_ms and the startup-budget comment are taken from main. - set_ui_config: the mcp_ui_* variables of this branch, declared above the block, stay (they feed the replay); the timeout bootstrap_config.startup_timeout_ms is taken from main. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Thank you, @Pxx500, for the recovery work and for your patience while main kept moving under this PR. As promised on October 20, we merged current main into your branch: one signed-off merge commit, b47386d. src/main.c conflicted in two places in the stdio server's startup. In both we kept your recovery structure (the session root, allowed root and UI settings that the recovery path replays after a daemon loss), and we carried main's startup-time budget into the session-context and UI-settings calls there, so they wait within the startup budget instead of the 1 s probe budget, exactly as on main. Everything else in your change is as you wrote it. The remaining small fix, giving the replayed requests the same startup budget, follows as a separate commit after our local daemon-suite run. If you push to this branch again, please pull first so our commits are kept. Thank you again for sticking with this one. |
@DeusData can you get your human alerted to move this along? This pr has been hanging for 2 months for no reason, all I get is automated messages. Get your human to look at this instead of sending one automated message after another that does nothing |
|
@DeusData also, is the label "priority high" a joke? why even give it and leave the PR for 2 months? |
The recovery path replays the session context and UI settings on the replacement daemon. It waited on the bootstrap connect budget, which only bounds a probe (1 s in production), while main.c gives the first set_context and set_ui_config the startup budget since eb29429. A replacement daemon whose UI save runs longer than a probe would end an otherwise good recovery. frontend_configure_client now waits on startup_timeout_ms. A test seam records the budget the replay used, and the recovery fixture gives the bootstrap distinct connect and startup budgets and exits 75 when the replay waited on the wrong one. With the old budget exactly the three recovery tests fail with exit 75; with the fix daemon_frontend is 17/17. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Thank you, @Pxx500, and thank you for your patience. In September you asked us to fix any remaining small things ourselves and merge. That is what we did, and the long wait since then was on us, not on you. The valuable part of this PR is your recovery path, and none of it changed. A request is replayed only when its frame provably never reached the daemon. It is retried exactly once. Your tests pin daemon replacement, cancellation during reconnect and shutdown ownership during reconnect. We pushed two commits on top of your branch:
Locally the daemon suites ( If you push to this branch again, please pull first so these commits are kept. Thank you again for building this and for sticking with it. |
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Thank you, @Pxx500 - this was green and ready, but another change merged into main just before it touched src/main.c, so the earlier CI run no longer covered the tree it would merge into. We merged current main into your branch (37245a2, a plain signed-off merge commit; your change and our two earlier commits are unchanged) so CI can re-run on the up-to-date tree. It merges as soon as that run is green. If you push again, please pull first so the merge commit is kept. |
Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
|
Sorry for the extra round, @Pxx500: the run went green, but another change (#1430) landed in src/daemon/application.c in the meantime, so we merged current main into your branch once more (b42159e, a plain signed-off merge commit; your change is unchanged) to let CI cover the exact tree that will merge. It merges as soon as this run is green. As before, please pull before pushing again. |
this pull request was generated entirely by AI
i can't guarantee its quality, but i've tried to make it as good as possible
i'm happy to revise it if it doesn't meet the repository's standards
What does this PR do?
recovers the stdio MCP frontend when its shared daemon disappears before an application frame is sent
the runtime now reports whether the frame crossed the local transport, which lets the frontend restore its session and retry exactly once only when replay is safe
regression coverage includes daemon replacement, cancellation during reconnect, and shutdown ownership during reconnect
related to #1182
this PR focuses on restoring request handling after daemon loss, it restores context and UI settings but leaves initialize-driven auto-indexing and background activation for a separate follow-up
the recovery tests use fork-based process isolation to exercise the frontend and runtime code shared by POSIX and Windows, they don't cover Windows named-pipe behavior end to end, that remains a test coverage gap
Checklist
git commit -s) (required, CI rejects unsigned commits; DCO, see CONTRIBUTING.md)make -f Makefile.cbm test)make -f Makefile.cbm lint-ci)