Skip to content

fix(test): shape mock config to prevent 500 in slot create test - #6526

Closed
bolichen97 wants to merge 1 commit into
mainfrom
fix/test-slot-create-mock-config
Closed

fix(test): shape mock config to prevent 500 in slot create test#6526
bolichen97 wants to merge 1 commit into
mainfrom
fix/test-slot-create-mock-config

Conversation

@bolichen97

@bolichen97 bolichen97 commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Closing as duplicate of #6533 which applies the same fix with full local verification.

…arest_folder_project

The bare MagicMock() config caused a 500 error because:
- mock_cfg.default_agent was a truthy MagicMock, triggering the
  resolve_agent_bindings path
- mock_cfg.agents was a non-iterable MagicMock, causing StopIteration
- MagicMock attributes on the slot were not JSON-serializable when
  suspend_slots_push() exited and broadcast slot data

Fix: set mock_cfg.agents = {} (falsy, skips resolve path) and
mock_cfg.default_agent = "" (falsy, skips agent assignment).
@github-actions

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 210fa9966da55bc2411396bfac73641e95ed0aa8 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 210fa99

Verdict parsed from the review's SHA-scoped output markers for commit 210fa9966da55bc2411396bfac73641e95ed0aa8.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 210fa9966da55bc2411396bfac73641e95ed0aa8: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 210fa9966da55bc2411396bfac73641e95ed0aa8 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 210fa99

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 210fa9966da55bc2411396bfac73641e95ed0aa8: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 210fa9966da55bc2411396bfac73641e95ed0aa8 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Two-line mock shaping matches the handler's real falsy-config semantics; verified against the cfg.default_agent / resolve_agent_bindings paths in chat_handlers.py.

Suggestions

  • The bare MagicMock() config remains a trap: any future config attribute the handler reads is a truthy Mock and re-breaks this test the same way. Building the mock from a real default KiroCrewConfig (overriding only dashboard.default_project) would fix the class, not the instance.

[DESIGN-REVIEWED] 210fa99

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Aug 28, 2026
@bolichen97 bolichen97 closed this Aug 28, 2026
@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Aug 28, 2026
@bolichen97
bolichen97 deleted the fix/test-slot-create-mock-config branch September 6, 2026 03:57
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.

2 participants