Commit Graph

3394 Commits

Author SHA1 Message Date
dave 20e1210818 huskies: merge 830 2026-04-28 19:30:08 +00:00
dave 46b1e84629 huskies: merge 791 2026-04-28 19:18:12 +00:00
dave e4af2d5c08 huskies: merge 803 2026-04-28 19:10:41 +00:00
dave fa54451ba6 huskies: merge 802 2026-04-28 19:05:06 +00:00
dave 5d1e75f7e0 huskies: merge 806 2026-04-28 17:39:29 +00:00
dave efc15c48da huskies: merge 804 2026-04-28 17:34:55 +00:00
dave 691f34348e huskies: merge 805 2026-04-28 17:28:47 +00:00
dave 2f6a221f09 fix(test): stub WebSocket in setupTests so rpcCall fails fast
770's HTTP→read-RPC migration replaced fetch-based agent calls with
rpcCall over WebSocket. setupTests.ts only mocks fetch though, so the
real jsdom WebSocket runs — and jsdom's WebSocket implementation
asynchronously fires its connection-failure error after ~9 seconds
(via internal Timeout._onTimeout). Tests that await component-mount
state (like App.test.tsx > calls getCurrentProject() on mount) hang
on that pending promise and time out at 10s.

This silently broke 1 test on master (App.test.tsx getCurrentProject
on mount) and cascaded into 16 failures in any worktree where the
test file count changed and timing shifted (804, 806).

Fix: replace the global WebSocket constructor with a stub that
immediately fires onerror + onclose on the next microtask. rpcCall
sees the error and rejects synchronously; components catch and continue
rendering with empty state. Tests pass without flake.

Verified locally: vitest run → 349/349 pass.
2026-04-28 17:05:53 +00:00
dave 619bdd9c82 huskies: merge 801 2026-04-28 16:43:04 +00:00
dave 3ff361bfe8 chore: silence git init defaultBranch hints in script/test
Tests that create temp repos call `git init` without specifying a branch.
Git then prints a 12-line "hint: Using 'master' as the name for the
initial branch..." block — every test, every run. The output drowns out
actual failures.

Set init.defaultBranch=master via GIT_CONFIG_COUNT/KEY/VALUE env vars in
script/test. This affects only subprocesses spawned by the test runner;
no change to the user's real git config.

Verified: cargo test --bin huskies emits 0 `hint:` lines after this
change, all 2732 tests still pass.
2026-04-28 16:38:43 +00:00
dave 30dd4b3a0a huskies: merge 796 2026-04-28 16:34:10 +00:00
dave a65cd86c8f huskies: merge 798 2026-04-28 16:25:33 +00:00
dave 1e40215c3e huskies: merge 797 2026-04-28 16:06:50 +00:00
dave d0b7db6765 huskies: merge 785 2026-04-28 15:59:50 +00:00
dave 32a3465fc4 fix: tell the truth about run_tests being blocking
`tool_run_tests` in `server/src/http/mcp/shell_tools/script.rs` is fully
blocking server-side: it spawns the test child, polls every 1s server-side
until exit (or `TEST_TIMEOUT_SECS = 1200s`), and returns the full
{passed, exit_code, output} directly. There is NO async/started-status
return path.

But two places told agents the wrong story:
1. `tools_list/system_tools.rs` description claimed "Returns immediately
   with status: started. Poll get_test_result..." — agents read tool
   descriptions for protocol semantics, so they followed this and burned
   turns polling get_test_result.
2. `agents.toml` had been correctly saying it blocks, but my last commit
   (776aad38) "fixed" it the wrong way based on a misread of the code.

Now both say: run_tests blocks server-side, returns the full result, do
not poll get_test_result. get_test_result remains for external observers
(UI checking on a job another caller started).

Reverts the prompt change in 776aad38 with the correct text.
2026-04-28 15:59:06 +00:00
dave 776aad3877 fix: agent prompts honest about run_tests being async
Pre-f958f57e, run_tests blocked until completion. After that fix it became
a background-job starter, with get_test_result polling. The agent prompts
were never updated, so they still said "run_tests blocks until complete"
— and agents then waste turns polling.

Updated coder-1/2/3, coder-opus, and qa prompts to describe the actual
flow: run_tests is async, get_test_result blocks for up to 20s per call,
test suites typically take 1-5 minutes so expect a few polls.

Companion bug filed for bumping TEST_POLL_BLOCK_SECS so one poll covers
most test runs (root-cause fix; this commit is the prompt half).
2026-04-28 15:55:15 +00:00
dave 309d330734 huskies: merge 794 2026-04-28 15:53:33 +00:00
dave bb779a0b0f chore: regenerate STACK.md source map from module doc-comments
Walked server/src/, frontend/src/, and crates/, extracting each module's
//! doc-comment to build a directory-level source map. One row per
directory + one row per top-level file.

Replaces the hand-written stopgap from 5d6757dd with content auto-derived
from the codebase, so it stays useful as decomposes happen — the
descriptions come from mod.rs, not from my recollection of where things
live.

Still a stopgap until 819 (auto-generated source-map-gen) lands and gets
wired into the agent spawn path, but the content is closer to what 819
will produce.
2026-04-28 15:50:29 +00:00
dave bf17fc14af huskies: merge 795 2026-04-28 15:45:10 +00:00
dave 5d6757dd65 chore: restore source map in STACK.md (stopgap for 818 regression)
818 stripped the source map because it had stale paths. Empirically that
made coder agents far slower — they spent most of each session re-discovering
the codebase via Read/Grep before reaching any Edit, and ran out of turn
budget without committing.

Restoring a fresh source map keyed off current master. Uses directories
where possible so it stays useful through future decomposes, plus a
"Canonical examples" section pointing at the patterns to copy when adding
new CRDT collections, RPC handlers, services, chat commands, etc.

This is a stopgap until 819 (auto-generated source-map-gen) lands.
2026-04-28 15:43:44 +00:00
dave f63464852b huskies: merge 770 2026-04-28 15:38:34 +00:00
dave 1946709681 huskies: merge 788 2026-04-28 15:28:31 +00:00
dave f62012ee9c huskies: merge 793 2026-04-28 15:21:51 +00:00
dave c1a50eab8e huskies: merge 790 2026-04-28 15:16:01 +00:00
dave 7cd9706c0f huskies: merge 813 2026-04-28 14:22:19 +00:00
dave 3772c0d03c huskies: merge 784 2026-04-28 14:07:42 +00:00
dave cf470f5048 huskies: merge 776 2026-04-28 14:01:18 +00:00
dave 8f23d13ac8 huskies: merge 779 2026-04-28 13:48:40 +00:00
dave aed29b952c huskies: merge 769 2026-04-28 13:42:47 +00:00
dave 36ca8d5e3b huskies: merge 827 2026-04-28 13:01:48 +00:00
Timmy 1bd01eb9d4 Ignoring node identity 2026-04-28 13:27:25 +01:00
Timmy 6265fa534e Updated a pile of deps 2026-04-28 13:27:07 +01:00
dave b7db6d6aae huskies: merge 775 2026-04-28 12:25:59 +00:00
dave e9ed58502a huskies: merge 771 2026-04-28 12:08:44 +00:00
dave e879d6f602 huskies: merge 818 2026-04-28 12:03:01 +00:00
dave 6c2bdde695 huskies: merge 783 2026-04-28 11:17:40 +00:00
dave d70719e23c huskies: merge 781 2026-04-28 11:12:24 +00:00
dave 05d057a40a huskies: merge 782 2026-04-28 11:02:02 +00:00
dave 01169332b3 huskies: merge 774 2026-04-28 10:51:59 +00:00
dave 7faacb6664 huskies: merge 773 2026-04-28 10:24:04 +00:00
dave 83f7e41932 huskies: merge 780 2026-04-28 10:19:38 +00:00
dave 0c2789b2c1 huskies: merge 768 2026-04-28 10:12:27 +00:00
dave fb5a21cfbb huskies: merge 778 2026-04-28 10:01:10 +00:00
dave d2d5ef8afa huskies: merge 764 2026-04-28 09:54:47 +00:00
dave 3d986a733b huskies: merge 763 2026-04-28 09:42:59 +00:00
dave 8a51dbd2ed huskies: merge 765 2026-04-28 09:33:23 +00:00
dave 38e828979c huskies: merge 766 2026-04-28 08:59:13 +00:00
dave 0d14fffe1c huskies: merge 762 2026-04-28 01:31:16 +00:00
dave de5b585157 huskies: merge 761 2026-04-28 01:11:07 +00:00
dave 70aaffc2ab huskies: merge 777 2026-04-28 00:33:14 +00:00