TDD: Session export JSON missing required fields name and conversation_history #10347

Open
opened 2026-04-18 08:57:19 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Issue Type: Type/Testing
  • Priority: Priority/Critical
  • MoSCoW: MoSCoW/Must Have
  • Branch: tdd/m130-session-export-json-fields
  • Commit Message: test(session): add tdd_expected_fail test for missing export JSON fields

Description

TDD issue-capture for bug #10331.

This issue's sole deliverable is a failing test (tagged @tdd_expected_fail) that proves the as_export_dict() method in Session is missing the name and conversation_history fields required by the spec.

Bug being captured: Session.as_export_dict() in src/cleveragents/domain/models/core/session.py does not include a name field, and uses messages instead of conversation_history for the conversation history list.

Test approach:

  • Write a Behave scenario that calls as_export_dict() on a session and asserts:
    1. The returned dict contains a name key.
    2. The returned dict contains a conversation_history key (not messages).
  • Tag the scenario with @tdd_issue @tdd_issue_10331 @tdd_expected_fail.
  • The test passes CI (inverted) until the bug fix removes @tdd_expected_fail.

Acceptance Criteria

  • A Behave scenario tagged @tdd_issue @tdd_issue_10331 @tdd_expected_fail exists.
  • The scenario asserts "name" in export_dict.
  • The scenario asserts "conversation_history" in export_dict.
  • The scenario asserts "messages" not in export_dict (or that conversation_history is the canonical key).
  • Test passes CI with @tdd_expected_fail before the fix.

Subtasks

  • Create Behave scenario tagged @tdd_issue @tdd_issue_10331 @tdd_expected_fail.
  • Step definition creates a Session object, calls as_export_dict(), and asserts name and conversation_history keys are present.
  • Verify test passes CI with @tdd_expected_fail tag.
  • Open PR on tdd/m130-session-export-json-fields branch.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Metadata - **Issue Type:** Type/Testing - **Priority:** Priority/Critical - **MoSCoW:** MoSCoW/Must Have - **Branch:** tdd/m130-session-export-json-fields - **Commit Message:** test(session): add tdd_expected_fail test for missing export JSON fields ## Description TDD issue-capture for bug #10331. This issue's sole deliverable is a failing test (tagged `@tdd_expected_fail`) that proves the `as_export_dict()` method in `Session` is missing the `name` and `conversation_history` fields required by the spec. **Bug being captured:** `Session.as_export_dict()` in `src/cleveragents/domain/models/core/session.py` does not include a `name` field, and uses `messages` instead of `conversation_history` for the conversation history list. **Test approach:** - Write a Behave scenario that calls `as_export_dict()` on a session and asserts: 1. The returned dict contains a `name` key. 2. The returned dict contains a `conversation_history` key (not `messages`). - Tag the scenario with `@tdd_issue @tdd_issue_10331 @tdd_expected_fail`. - The test passes CI (inverted) until the bug fix removes `@tdd_expected_fail`. ## Acceptance Criteria - [ ] A Behave scenario tagged `@tdd_issue @tdd_issue_10331 @tdd_expected_fail` exists. - [ ] The scenario asserts `"name" in export_dict`. - [ ] The scenario asserts `"conversation_history" in export_dict`. - [ ] The scenario asserts `"messages" not in export_dict` (or that `conversation_history` is the canonical key). - [ ] Test passes CI with `@tdd_expected_fail` before the fix. ## Subtasks - [ ] Create Behave scenario tagged `@tdd_issue @tdd_issue_10331 @tdd_expected_fail`. - [ ] Step definition creates a `Session` object, calls `as_export_dict()`, and asserts `name` and `conversation_history` keys are present. - [ ] Verify test passes CI with `@tdd_expected_fail` tag. - [ ] Open PR on `tdd/m130-session-export-json-fields` branch. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor
Author
Owner

[GROOMED] Quality Analysis - Priority/Critical TDD Issue

Validity Assessment

This is a valid and actionable TDD issue. It properly captures bug #10331 with clear acceptance criteria and well-defined subtasks.

Label Verification

All required labels are present:

  • State: State/Unverified ✓
  • Type: Type/Testing ✓
  • Priority: Priority/Critical ✓ (⚠️ CRITICAL PRIORITY FLAGGED)
  • MoSCoW: MoSCoW/Must have ✓

⚠️ Issues Found

  1. Missing Milestone Assignment (CRITICAL)

    • This Priority/Critical issue is not assigned to any milestone
    • Recommendation: Assign to appropriate milestone (likely v3.2.0 or v3.5.0 based on session export scope)
    • This should be assigned by the project owner/AUTO-OWNR
  2. No Assignee (RECOMMENDED)

    • Issue is unassigned. Consider assigning to the developer who will implement the test

📋 Triage Recommendation

Status: Ready for State/Verified transition

  • Issue is well-structured with clear acceptance criteria
  • All required labels present
  • Recommend: Move to State/Verified once milestone is assigned

🚨 Critical Priority Notice

This is a Priority/Critical issue. Per CONTRIBUTING.md rules, Priority/Critical issues with no State/In Progress should be flagged for immediate attention. This issue requires:

  1. Milestone assignment (blocking)
  2. Developer assignment
  3. Immediate implementation planning

Automated by CleverAgents Bot
Supervisor: Grooming | Agent: grooming-pool-supervisor

## [GROOMED] Quality Analysis - Priority/Critical TDD Issue ### ✅ Validity Assessment This is a **valid and actionable** TDD issue. It properly captures bug #10331 with clear acceptance criteria and well-defined subtasks. ### ✅ Label Verification All required labels are present: - **State**: State/Unverified ✓ - **Type**: Type/Testing ✓ - **Priority**: Priority/Critical ✓ (⚠️ **CRITICAL PRIORITY FLAGGED**) - **MoSCoW**: MoSCoW/Must have ✓ ### ⚠️ Issues Found 1. **Missing Milestone Assignment** (CRITICAL) - This Priority/Critical issue is not assigned to any milestone - Recommendation: Assign to appropriate milestone (likely v3.2.0 or v3.5.0 based on session export scope) - This should be assigned by the project owner/AUTO-OWNR 2. **No Assignee** (RECOMMENDED) - Issue is unassigned. Consider assigning to the developer who will implement the test ### 📋 Triage Recommendation **Status**: Ready for State/Verified transition - Issue is well-structured with clear acceptance criteria - All required labels present - Recommend: Move to State/Verified once milestone is assigned ### 🚨 Critical Priority Notice This is a **Priority/Critical** issue. Per CONTRIBUTING.md rules, Priority/Critical issues with no State/In Progress should be flagged for immediate attention. This issue requires: 1. Milestone assignment (blocking) 2. Developer assignment 3. Immediate implementation planning --- **Automated by CleverAgents Bot** Supervisor: Grooming | Agent: grooming-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#10347
No description provided.