Clean up stray artifacts, rewrite stale test_rooms.c against real API, wire full suite into make test - #1
Open
SuperInstance wants to merge 6 commits into
Open
Clean up stray artifacts, rewrite stale test_rooms.c against real API, wire full suite into make test#1SuperInstance wants to merge 6 commits into
SuperInstance wants to merge 6 commits into
Conversation
added 6 commits
July 10, 2026 13:23
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.
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.
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.
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.
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.
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.
Summary
"Add comprehensive inline documentation to all .c and .h files...") was committed to git — clearly a prior agent session misinterpreting its own instructions as a filename.bin/holodeck,holodeck,obj/main.o,test_conf,test_conf_v2,test_full_conf), fixed.gitignore.tests/test_rooms.c, which referenced aRoomGraphtype andgraph_create_room/graph_destroy_room/graph_connect_roomsfunctions that don't exist anywhere in the current codebase — it was testing an abandoned earlier API design and didn't even compile. Rewrote against the real, currentroom_create/room_connect/room_add_agent/etc. API, giving real room-connectivity logic test coverage it previously had none of.make test:conformance_simple.c(14 tests) + the rewrittentest_rooms.c(35 tests) +test_serial_bridge.c(previously completely unwired, despite genuinely working) = 50 tests total, up from 14 actually running.make test) — none existed before.Verification
make test: all three suites pass (14 + 35 + serial-bridge "0 failures"), independently re-run from cleanFound, not fixed (pre-existing, outside this pass's scope — flagging, not hiding)
src/command.c'scmd_tellfunction passes achar*wherecomms_tell()expects anAgent*(confirmed via-Wincompatible-pointer-types, confirmed pre-existing viagit log, not introduced by this pass). Worth a follow-up pass.🤖 Generated with a multi-agent hardening pass (opencode/GLM), independently verified before opening this PR — including re-running the full
make testsuite from a clean build myself.