Commit Graph

785 Commits

Author SHA1 Message Date
dave 70aaffc2ab huskies: merge 777 2026-04-28 00:33:14 +00:00
dave d1a2393b32 huskies: merge 760 2026-04-28 00:22:29 +00:00
dave 63ce7b9ec3 huskies: merge 759 2026-04-28 00:07:04 +00:00
dave 9b24c2e281 huskies: merge 743 2026-04-27 23:48:53 +00:00
dave bf1393fa60 huskies: merge 741 2026-04-27 23:44:32 +00:00
dave 7ee542dd1e huskies: merge 757 2026-04-27 23:36:56 +00:00
dave dffa05d703 huskies: merge 689 2026-04-27 23:30:55 +00:00
dave 571a057f52 huskies: merge 688_refactor_decompose_server_src_crdt_snapshot_rs_1182_lines 2026-04-27 22:42:48 +00:00
dave 225c4f2b46 huskies: merge 758 2026-04-27 22:21:00 +00:00
dave 03738f35f5 huskies: merge 687_refactor_decompose_server_src_crdt_sync_server_rs_1186_lines 2026-04-27 22:16:08 +00:00
dave 574df48ff3 huskies: merge 686_refactor_decompose_server_src_io_watcher_rs_1202_lines
Manual merge resolution: feature branch deleted watcher.rs and split
into watcher/{mod,events,sweep,tests}.rs, while master modified the
old watcher.rs (738's FS-shadow stripping). The auto-resolver kept
both, producing an ambiguous-module compile error.

Resolution: drop watcher.rs (feature's delete wins). The new
watcher/mod.rs absorbs the FS-shadow code semantically — gates pass
(cargo check, clippy --all-targets -D warnings, fmt --check, 29/29
io::watcher tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 21:55:04 +00:00
dave be7b7025d5 huskies: merge 742_refactor_read_rpc_frame_multiplexer_on_crdt_sync_websocket 2026-04-27 21:27:10 +00:00
dave 88f9e5dd54 huskies: merge 731_refactor_migrate_existing_stories_from_slug_based_ids_to_numeric_only 2026-04-27 20:42:21 +00:00
dave 1388658ae8 huskies: merge 730_story_use_numeric_only_story_ids_across_mcp_worktrees_git_branches_and_log_paths 2026-04-27 20:22:47 +00:00
dave 63d5a500de huskies: merge 670_refactor_hoist_chat_history_persistence_into_a_shared_module_replaces_658 2026-04-27 20:09:44 +00:00
dave 615e1c7f73 huskies: merge 738_refactor_delete_fs_shadow_code_from_lifecycle_rs_and_the_work_directory_watcher 2026-04-27 19:56:53 +00:00
dave 63a30a9319 huskies: merge 736_story_drain_and_prepend_buffered_status_events_on_the_user_s_next_agent_message 2026-04-27 19:37:39 +00:00
dave aa7b26a24a huskies: merge 728_story_cryptographic_peer_handshake_with_trusted_keys_gating 2026-04-27 19:22:55 +00:00
dave ded8c6fd66 huskies: merge 685_refactor_decompose_server_src_config_rs_1223_lines 2026-04-27 19:16:25 +00:00
dave 26f9f3f7fc huskies: merge 729_story_store_story_name_as_a_crdt_field_separate_from_the_story_id 2026-04-27 19:09:56 +00:00
dave 4aadf4aa47 huskies: merge 684_refactor_decompose_server_src_http_agents_rs_1249_lines 2026-04-27 18:49:53 +00:00
dave 4b64bc614f huskies: merge 726_story_notify_chat_transports_when_oauth_account_swaps_or_all_accounts_are_exhausted 2026-04-27 18:44:47 +00:00
dave 80661fa622 huskies: merge 727_story_ed25519_node_identity_keypair_generation_persistence_and_identity_endpoint 2026-04-27 18:37:58 +00:00
dave b008235d0d huskies: merge 683_refactor_decompose_server_src_agents_pool_start_mod_rs_1329_lines 2026-04-27 18:26:31 +00:00
dave 646dc490b8 huskies: merge 720_refactor_add_mesh_status_mcp_tool_read_only_peer_mesh_diagnostics 2026-04-27 18:18:51 +00:00
dave c6bc6f07f7 huskies: merge 725_story_auto_swap_oauth_account_on_rate_limit 2026-04-27 18:12:57 +00:00
dave 272a592a4d huskies: merge 735_story_attach_statuseventbuffer_to_each_agent_session_scoped_per_project_reset_on_restart 2026-04-27 18:06:11 +00:00
dave d654f55981 huskies: merge 682_refactor_decompose_server_src_agents_merge_squash_rs_1346_lines 2026-04-27 17:58:04 +00:00
dave 101f616346 huskies: merge 719_refactor_stale_merge_job_lock_recovery_on_new_merge_attempts 2026-04-27 17:46:49 +00:00
dave 1ecb4dad55 huskies: merge 724_story_per_account_oauth_credential_storage_with_login_pool 2026-04-27 17:40:53 +00:00
dave ed8646f0d9 huskies: merge 681_refactor_decompose_server_src_agents_pool_pipeline_advance_mod_rs_1509_lines 2026-04-27 17:35:17 +00:00
dave 875096b3ec huskies: merge 718_refactor_stale_agent_claims_time_out_claim_ttl_with_displacement 2026-04-27 17:26:51 +00:00
dave fce7e16811 huskies: merge 716_story_statuseventbuffer_bounded_per_instance_buffer_over_services_status_broadcaster 2026-04-27 17:03:12 +00:00
dave 4a0f57478c huskies: merge 671_refactor_migrate_pipeline_state_consumers_from_string_comparisons_to_typed_pipelinestage_enum 2026-04-27 16:39:39 +00:00
dave 39a9766d7d huskies: merge 677_refactor_reject_promotion_to_current_coder_of_work_items_with_junk_only_acceptance_criteria 2026-04-27 16:30:35 +00:00
dave 6a582d73b6 huskies: merge 675_bug_mergemaster_silently_exits_when_feature_branch_has_zero_commits_ahead_of_master 2026-04-27 14:43:54 +00:00
dave ea872fa01c huskies: merge 676_bug_apply_and_persist_silently_drops_ops_when_persist_channel_send_fails 2026-04-27 14:38:11 +00:00
dave cbb0a50729 huskies: merge 649_story_migrate_whatsapp_transport_to_status_broadcaster 2026-04-27 14:19:19 +00:00
dave 6c8043d866 huskies: merge 648_story_migrate_discord_transport_to_status_broadcaster 2026-04-27 14:01:32 +00:00
dave 9040d18f50 huskies: merge 664_story_crdt_lamport_clock_inner_seq_must_resume_from_max_own_author_seq_1_instead_of_resetting_to_1_on_restart_phase_c 2026-04-27 12:30:44 +00:00
dave 25603bb8cb huskies: merge 669_story_migrate_slack_transport_to_status_broadcaster 2026-04-27 11:57:06 +00:00
dave 5da29c3d91 huskies: merge 668_bug_pipeline_advances_coder_work_to_merge_when_gates_passed_false 2026-04-27 11:39:11 +00:00
dave 65d2fb210c huskies: merge 655_bug_matrix_bot_spawns_its_own_timerstore_instead_of_using_shared_appcontext_timer_store 2026-04-27 11:32:51 +00:00
dave ac85cfce5d huskies: merge 652_story_pass_resume_session_id_on_agent_respawn_so_new_sessions_inherit_prior_reasoning 2026-04-27 11:27:50 +00:00
dave 144f07f412 huskies: merge 644_story_chat_transport_consumers_slack_discord_whatsapp_matrix_for_the_unified_status_broadcaster 2026-04-27 11:22:52 +00:00
dave 75533225e4 fix: commit minor fmt residue blocking mergemaster cherry-picks
Master had 8 uncommitted single-line whitespace changes (blank-line trimming
in test mod headers, etc.) left over from a previous mergemaster cargo-fmt
run that didn't get committed. Each subsequent merge attempt hit:

  cherry-pick failed: 'Your local changes to the following files would be
  overwritten by merge. Please commit your changes or stash them.'

So merges had been silently un-mergeable for the last several rounds —
mergemaster correctly reported the issue but had no way to fix master's
own state from inside the merge_workspace.

Files affected (all whitespace-only):
- chat/transport/matrix/bot/messages/{handle_message,on_room_message}.rs
- chat/transport/slack/commands/{llm,mod}.rs
- http/mcp/agent_tools/worktree.rs
- http/workflow/story_ops/{create,criterion,update}.rs

cargo clippy --all-targets -- -D warnings: clean
cargo fmt --all --check: clean
2636 tests pass.
2026-04-27 11:17:31 +00:00
dave 7408cc5b4b fix(crdt_snapshot): per-thread SNAPSHOT_STATE in cfg(test) instead of shared static (bug 669)
Replaces the test-time GLOBAL_STATE_LOCK approach (which was just disguised
single-threading) with proper test isolation: each test thread gets its own
SnapshotState via a thread_local!.

Pattern matches crdt_state::CRDT_STATE_TL — production keeps the global
OnceLock; tests get a per-thread OnceLock that's accessed through a
snapshot_state() helper. The unsafe `&*ptr` cast to 'static is safe because
the thread_local lives as long as the spawning test thread.

The race: latest_snapshot_available_after_compaction captured at_seq from a
freshly-generated snapshot, then asserted it equalled SNAPSHOT_STATE's
latest.at_seq. With shared SNAPSHOT_STATE, another test thread's
apply_compaction could overwrite latest_snapshot between capture and read.
Per-thread state eliminates the race at its source.

ALL_OPS / VECTOR_CLOCK stay shared — the tests don't assert on absolute
counts, only on (this-thread's at_seq) == (this-thread's latest.at_seq).

5 consecutive default-parallel `cargo test --bin huskies` runs all green
at 2636/2636.
2026-04-27 02:49:53 +00:00
dave fc71c22305 Revert "fix(crdt_snapshot): serialise tests that share global SNAPSHOT_STATE / ALL_OPS / VECTOR_CLOCK (bug 669)"
This reverts commit 8e608feec1.
2026-04-27 02:45:01 +00:00
dave 8e608feec1 fix(crdt_snapshot): serialise tests that share global SNAPSHOT_STATE / ALL_OPS / VECTOR_CLOCK (bug 669)
The crdt_snapshot tests share three global statics:
- SNAPSHOT_STATE (latest_snapshot, pending_acks, pending_at_seq) — coordination state
- crdt_state::ALL_OPS / VECTOR_CLOCK — op journal + vector clock

Only the per-thread CRDT is thread-local (init_for_test); these other globals
are shared across test threads. Under default cargo test parallelism, two tests
running concurrently interleave their op writes and snapshot generation, so
assertions like assert_eq!(at_seq, 4) fail with at_seq=5 (the other thread's
ops snuck in).

Add a module-level GLOBAL_STATE_LOCK that all 17 affected tests grab at the
top. unwrap_or_else(|e| e.into_inner()) handles the case where a prior test
panicked while holding the lock (poisoned).

Fixes bug 669 — these two tests were the silent killer behind every agent's
script/test failure (see also bug 668, which advanced agents to merge despite
gates_passed=false; that compounded this by sending failing-tests worktrees
to mergemaster).

All 2636 tests now pass under default parallel execution (no --test-threads=1
needed).

Closes #669.
2026-04-27 02:43:49 +00:00
dave 404fd396f5 refactor: split chat/transport/whatsapp/commands.rs (837) into mod + llm
The 837-line commands.rs is split:

- llm.rs: handle_llm_message (LLM turn for non-command messages, ~195 lines)
- mod.rs: handle_incoming_message + tests (~660 lines)

Tests stay co-located with handle_incoming_message in mod.rs. All 2636 tests pass; clippy clean.
2026-04-27 02:37:22 +00:00