Skip to content

Commit 97b1fa9

Browse files
Refactor: Improve documentation structure and test organization
Based on code review findings, this commit addresses documentation structure and testing organization to better align with the experimental nature of auto-discovery and improve usability. ## Documentation Changes (README.md) ### 1. Restructured README Flow - Moved "Quick Start" section to immediately follow "Features" (after line 45) - Shows manual models.json setup first (primary/stable approach) - Moved "Auto-Discovery" to end as "Advanced: Auto-Discovery (Experimental)" - New position: After "Session & User Context Management" (line 453) - Clearly marked as experimental opt-in feature **Rationale:** Auto-discovery is experimental and should not be the first thing users see. Manual configuration is the stable, proven approach. ### 2. Updated Features List - Moved auto-discovery to bottom of list - Changed from: "**Auto-Discovery: Automatically discover...**" - Changed to: "**Advanced: Auto-Discovery (experimental)** - Automatically..." - Updated test count: 166 → 198 tests ### 3. Added Edge Case Documentation - Documented duplicate workflow names behavior - Added warning: "If multiple workflows have the same name, only the last discovered workflow will be available (last-wins behavior)" - Recommendation: "Ensure your workflow names are unique" **Addresses:** Self-review finding about undocumented edge case ## Testing Changes (Makefile) ### 1. Restructured Load Test Targets **Before:** ```makefile test-load → Manual models.json mode test-load-discovery → Auto-discovery mode test-all → Alias for test (redundant) ``` **After:** ```makefile test-load → Runs both subtargets (umbrella) ├─ test-load-manual-config → Manual models.json mode └─ test-load-discovery → Auto-discovery mode ``` **Benefits:** - Single command `make test-load` now tests both modes - Clear naming: "manual-config" vs "discovery" - Removed redundant `test-all` alias ### 2. Updated Help Text - Added `test-load` as umbrella target description - Updated target names to reflect hierarchy - Better alignment for readability ### 3. Removed Remaining Emojis - Changed "✓" to "OK" in test output - Changed "📊" prefix in file path messages - Ensures consistency across codebase ## Impact **No Breaking Changes:** - All existing commands still work - `make test` behavior unchanged - `make test-load-discovery` still works independently - Backward compatible **Improved UX:** - New users see stable approach first - `make test-load` now tests both modes automatically - Clear distinction between stable and experimental features - Better organized help text ## Test Results ``` Test Suites: 11 passed, 11 total Tests: 198 passed, 198 total Coverage: 77.06% overall ``` All tests passing, no regressions introduced.
1 parent be32156 commit 97b1fa9

File tree

2 files changed

+205
-147
lines changed

2 files changed

+205
-147
lines changed

Makefile

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ help:
1414
@echo " make clean - Stop and remove containers, images, and volumes"
1515
@echo ""
1616
@echo "Testing:"
17-
@echo " make test - Run all tests (unit + image build)"
18-
@echo " make test-unit - Run unit tests for server logic only"
19-
@echo " make test-image - Run Docker image build validation tests"
20-
@echo " make test-all - Alias for test"
21-
@echo " make test-load - Run load tests (manual models.json mode)"
22-
@echo " make test-load-discovery - Run load tests (auto-discovery mode)"
17+
@echo " make test - Run all tests (unit + image build)"
18+
@echo " make test-unit - Run unit tests for server logic only"
19+
@echo " make test-image - Run Docker image build validation tests"
20+
@echo " make test-load - Run all load tests (manual config + auto-discovery)"
21+
@echo " make test-load-manual-config - Run load tests (manual models.json mode)"
22+
@echo " make test-load-discovery - Run load tests (auto-discovery mode)"
2323

2424
rebuild: stop build start
2525
@echo "Rebuild complete!"
@@ -68,11 +68,9 @@ verify:
6868
test: test-unit test-image
6969
@echo ""
7070
@echo "======================================"
71-
@echo " All tests passed successfully!"
71+
@echo "OK All tests passed successfully!"
7272
@echo "======================================"
7373

74-
test-all: test
75-
7674
# Test 1: Unit tests for server logic
7775
test-unit:
7876
@echo "======================================"
@@ -96,11 +94,18 @@ test-image:
9694
@echo ""
9795
@bash tests/test-image-build.sh
9896

99-
# Test 3: Load testing with k6 (via docker-compose) - Manual models.json mode
100-
test-load:
97+
# Test 3: Load testing with k6 (via docker-compose) - All modes
98+
test-load: test-load-manual-config test-load-discovery
99+
@echo ""
100+
@echo "======================================"
101+
@echo "All load tests completed!"
102+
@echo "======================================"
103+
104+
# Test 3a: Load testing - Manual models.json configuration
105+
test-load-manual-config:
101106
@echo ""
102107
@echo "======================================"
103-
@echo "Running Load Tests (Manual Mode)"
108+
@echo "Running Load Tests (Manual Config)"
104109
@echo "20 users, 1min, models.json"
105110
@echo "======================================"
106111
@echo ""
@@ -113,13 +118,13 @@ test-load:
113118
@echo "Cleaning up..."
114119
@docker compose -f docker/docker-compose.loadtest.yml down -v
115120
@echo ""
116-
@echo " Load tests completed!"
121+
@echo "OK Load tests (Manual Config) completed!"
117122
@echo ""
118123
@if [ -f tests/load/summary.json ]; then \
119-
echo "📊 Detailed results saved to: tests/load/summary.json"; \
124+
echo "Detailed results saved to: tests/load/summary.json"; \
120125
fi
121126

122-
# Test 4: Load testing with Auto-Discovery enabled
127+
# Test 3b: Load testing - Auto-Discovery mode
123128
test-load-discovery:
124129
@echo ""
125130
@echo "======================================"
@@ -136,8 +141,8 @@ test-load-discovery:
136141
@echo "Cleaning up..."
137142
@docker compose -f docker/docker-compose.loadtest.yml down -v
138143
@echo ""
139-
@echo " Load tests (Auto-Discovery) completed!"
144+
@echo "OK Load tests (Auto-Discovery) completed!"
140145
@echo ""
141146
@if [ -f tests/load/summary.json ]; then \
142-
echo "📊 Detailed results saved to: tests/load/summary.json"; \
147+
echo "Detailed results saved to: tests/load/summary.json"; \
143148
fi

0 commit comments

Comments
 (0)