Skip to content

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
mainfrom
production-round3-2026-07-10
Open

Clean up stray artifacts, rewrite stale test_rooms.c against real API, wire full suite into make test#1
SuperInstance wants to merge 6 commits into
mainfrom
production-round3-2026-07-10

Conversation

@SuperInstance

Copy link
Copy Markdown
Owner

Summary

  • Removed a stray artifact: a 0-byte file literally named after an entire AI agent prompt ("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.
  • Stopped tracking 6 committed compiled binaries (bin/holodeck, holodeck, obj/main.o, test_conf, test_conf_v2, test_full_conf), fixed .gitignore.
  • Rewrote tests/test_rooms.c, which referenced a RoomGraph type and graph_create_room/graph_destroy_room/graph_connect_rooms functions 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, current room_create/room_connect/room_add_agent/etc. API, giving real room-connectivity logic test coverage it previously had none of.
  • Wired all three real test suites into make test: conformance_simple.c (14 tests) + the rewritten test_rooms.c (35 tests) + test_serial_bridge.c (previously completely unwired, despite genuinely working) = 50 tests total, up from 14 actually running.
  • Added real CI (build + make test) — none existed before.

Verification

  • make test: all three suites pass (14 + 35 + serial-bridge "0 failures"), independently re-run from clean

Found, not fixed (pre-existing, outside this pass's scope — flagging, not hiding)

src/command.c's cmd_tell function passes a char* where comms_tell() expects an Agent* (confirmed via -Wincompatible-pointer-types, confirmed pre-existing via git 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 test suite from a clean build myself.

PurplePincher Automation 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant