fix(command): cmd_gossip signature mismatch (gap-hunt round 2) - #4
Merged
Conversation
Base off next-level-2026-07-10 (cmd_tell/T09 fixed -> 15/40). - Up to date: fixed a real defect — README ended with <img src=callsign1.jpg> but no image file is tracked anywhere in the repo (verified via git ls-tree). Removed the broken reference. - Inter-connective: holodeck-go and holodeck-zig were named in the comparison table but never linked; added repo links (both verified to exist). - Educational tone: already strong (byte-level explanations, honest 15/40 count); left intact.
The gossip command was registered with the two-arg handler signature expected by command_execute, but cmd_gossip was declared/defined with three args (Agent*, Room*, const char*). Calling it through the handler pointer is undefined behavior and could crash or read garbage for the message argument. - Reduce cmd_gossip to the standard (Agent*, const char*) signature. - Look up the sender's room at dispatch time. - Add test coverage for the gossip command. - Update README/help text to match the current local-echo behavior.
SuperInstance
added a commit
that referenced
this pull request
Aug 21, 2026
* start: round 3 production-hardening scaffold * chore: remove stray agent-prompt file accidentally committed as filename A prior agent session misinterpreted its own task instructions as a filename, creating a literal 0-byte file whose name was the entire prompt. Remove this stray artifact from tracking. * chore: stop tracking compiled binaries; ignore build artifacts Remove committed ELF binaries (holodeck, bin/holodeck, obj/main.o, test_conf, test_conf_v2, test_full_conf) from tracking and update .gitignore to cover executables, object files, and build directories. * test: rewrite test_rooms.c against the real current room API The old test_rooms.c was written against an abandoned graph-container design (RoomGraph, graph_create_room, graph_connect, room_init, room_add_exit, room_look) that does not exist in src/room.h, so it never compiled. Rewrite it to exercise the real current API (room_create/destroy, room_connect/disconnect/find_exit, room_add_agent/remove_agent, room_add_note/get_notes, room_is_booted/set_booted), covering: - room lifecycle: create sets id/name/description; fresh room has no exits/notes/agents and is not booted; destroy is NULL-safe - exits: connect+find, one-way semantics, multiple exits, disconnect removes one exit while preserving others, NULL-arg safety - agents: add/remove adjust agent_count, re-add, remove-absent safety - notes: LIFO head ordering, author/text content, chain, NULL-safety - boot state: set/clear booted flag, NULL-safety 35/35 pass. Uses the repo's existing TEST()/PASS() lightweight macros. * build: wire all three real test suites into 'make test' Previously 'make test' only compiled and ran conformance_simple.c. Add build rules for the two other real test files and run all three: - test_conf <- tests/conformance_simple.c (14 tests) - test_rooms <- tests/test_rooms.c (35 tests) - test_serial <- tests/test_serial_bridge.c (serial_bridge_test) Each test is a separate file target with correct source deps so it rebuilds only when its inputs change. 'make test' builds all three then runs them; clean removes all test binaries. Combined: 49 named assertions + serial bridge internal suite, all passing. * ci: add GitHub Actions workflow running build + make test No CI existed. Add .github/workflows/ci.yml that builds the holodeck binary and runs 'make test' (all three suites) on every push and pull request. * start: next-level production hardening * Fix cmd_tell: look up target Agent* by name before calling comms_tell * Add end-to-end cmd_tell tests and wire into make test * Mark T09/cmd_tell as fixed in README and CONFORMANCE * Ignore test_command binary * fix(command): cmd_gossip signature mismatch (gap-hunt round 2) (#4) * docs(readme): link holodeck siblings; remove broken image ref Base off next-level-2026-07-10 (cmd_tell/T09 fixed -> 15/40). - Up to date: fixed a real defect — README ended with <img src=callsign1.jpg> but no image file is tracked anywhere in the repo (verified via git ls-tree). Removed the broken reference. - Inter-connective: holodeck-go and holodeck-zig were named in the comparison table but never linked; added repo links (both verified to exist). - Educational tone: already strong (byte-level explanations, honest 15/40 count); left intact. * fix(command): align cmd_gossip signature with command handler type The gossip command was registered with the two-arg handler signature expected by command_execute, but cmd_gossip was declared/defined with three args (Agent*, Room*, const char*). Calling it through the handler pointer is undefined behavior and could crash or read garbage for the message argument. - Reduce cmd_gossip to the standard (Agent*, const char*) signature. - Look up the sender's room at dispatch time. - Add test coverage for the gossip command. - Update README/help text to match the current local-echo behavior. --------- Co-authored-by: opencode <opencode@users.noreply.github.com> Co-authored-by: PurplePincher Automation <automation@purplepincher.org> * docs(readme): link holodeck siblings; remove broken image ref (#3) Base off next-level-2026-07-10 (cmd_tell/T09 fixed -> 15/40). - Up to date: fixed a real defect — README ended with <img src=callsign1.jpg> but no image file is tracked anywhere in the repo (verified via git ls-tree). Removed the broken reference. - Inter-connective: holodeck-go and holodeck-zig were named in the comparison table but never linked; added repo links (both verified to exist). - Educational tone: already strong (byte-level explanations, honest 15/40 count); left intact. Co-authored-by: opencode <opencode@users.noreply.github.com> --------- Co-authored-by: PurplePincher Automation <automation@purplepincher.org> Co-authored-by: opencode <opencode@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gap-hunt pass (kimi), independently re-verified by me (rebuilt + reran
make test, confirmed 5/5 command tests pass including 2 new gossip tests, confirmed no leftover compiler warning).Bug:
cmd_gossipwas declared ascmd_gossip(Agent*, Room*, const char*), which doesn't match the command-handler function-pointer type every other command uses ((Agent*, const char*)) and thatcommand_register/command_executeexpect. Real risk of UB/miscompilation the moment gossip is dispatched through the generic handler table.Fix: matched the signature to the real handler type, looked up the room via
agent_get_room()internally (matchingcomms_gossip's real signature) instead of taking it as a parameter nothing actually supplied correctly.Doc fix in the same pass: README/help both claimed gossip "broadcast to the entire world" — the real implementation only echoes locally to the sender. Corrected to describe actual behavior rather than deleting the feature or leaving the false claim.
Tests: added
test_gossip_echoes_to_senderandtest_gossip_requires_message, wired intomake test. 35/35 + 0-failures + 5/5 = all green.CI run: 29165412314 (success, per kimi's report — worth double-checking on this PR too).