Create proposal system: storage, API, and admin interface

Done Task High
Created: Dec 28, 2025
Updated: 1 day ago
PR: View

Description

Recent Comments

T
tinker-orchestrator 3 days ago

Orchestrator note: Epic #132 is now in todo status, but this ticket #133 is blocking all other subtasks (#134-#138). This ticket has been in pending_approval since 2025-12-29 01:23:31 UTC with PR #67. Cannot assign worker to Researcher epic work until this is approved.

T
tinker-reviewer 3 days ago

## Code Review: PASS - Merge Conflicts Resolved ### ✅ Previous Issue Fixed The worker resolved the merge conflicts in `db/schema.rb`. The schema now cleanly includes both: - `proposals` table with proper indexes - `solid_queue_*` tables (from main branch) - Foreign keys for both No conflict markers remain. ### ✅ All Acceptance Criteria Met 1. **Proposals table exists with all fields** ✓ - title, proposal_type, reasoning, confidence, priority, status - JSON metadata for evidence_links - Optional ticket_id, agent_id foreign keys - Proper indexes on queryable fields 2. **Metadata stored as JSON with evidence_links** ✓ - `metadata["evidence_links"]` accessor method - `add_evidence_link` method for adding links - Supports type (ticket/memory/code_file), id, path, description 3. **API endpoints work** ✓ - POST /api/v1/proposals - Create - GET /api/v1/proposals - List with filters - GET /api/v1/proposals/:id - Show - POST /api/v1/proposals/:id/approve - Approve - POST /api/v1/proposals/:id/reject - Reject - POST /api/v1/proposals/approve_batch - Bulk approve 4. **Avo admin interface** ✓ - Resource with filters (status, type, priority) - Show page with metadata display - Approve/Reject actions - Batch approve action 5. **Searchable and filterable** ✓ - Scopes: pending, approved, rejected, executed - Scopes: by_priority, by_confidence, by_type, by_agent - Status predicate methods (pending?, approved?, etc.) ### Code Quality **Model (`app/models/proposal.rb`):** - Comprehensive validations with inclusion constraints - Clear status workflow (pending → approved/rejected → executed) - Rejection feedback stored in AgentMemory for learning - Evidence link helpers **Controller (`app/controllers/api/v1/proposals_controller.rb`):** - Proper filtering, sorting, pagination - Error handling with meaningful messages - Batch approve functionality **Avo Resources:** - Clean admin interface with filters - Actions for approve/reject/batch ### Test Results - **Proposal model tests: 27 examples, 0 failures** ✓ ### Note on Other Test Failures Some tests in the broader suite fail due to a pre-existing issue: the tickets factory still references `acceptance_criteria` column that was removed in PR #74. This is **not caused by this PR** and affects the entire codebase. ### Recommendation: PASS The merge conflicts have been resolved, the proposal system is well-implemented with comprehensive tests, and all acceptance criteria are met. The pre-existing factory issue is a separate concern.

T
tinker-reviewer 3 days ago

## Code Review: FAIL - Unresolved Merge Conflicts ### ❌ BLOCKING ISSUE: Merge Conflicts in schema.rb The PR branch contains **unresolved git merge conflicts** in `db/schema.rb`: ```ruby <<<<<<< Updated upstream ActiveRecord::Schema[8.1].define(version: 2025_12_28_061622) do ======= ActiveRecord::Schema[8.1].define(version: 2025_12_28_065447) do >>>>>>> Stashed changes ``` Additional conflict markers found at: - Lines 13-17: Schema version conflict - Lines 126-276: Solid queue tables vs proposals table conflict - Lines 317-327: Foreign key conflicts ### Impact - The application **will not start** with this schema.rb - Rails will fail to load with `SyntaxError` - Tests cannot run (pending migrations + syntax errors) - **PR cannot be merged in current state** ### What Needs To Happen 1. Worker must resolve merge conflicts in `db/schema.rb` 2. Rebase branch on latest `main` 3. Run `bin/rails db:migrate` to ensure migrations apply cleanly 4. Run tests to verify everything works ### Code Quality (if conflicts were resolved) The actual implementation (model, controller, serializer, Avo resources) appears well-structured, but this is moot until conflicts are resolved. ### Recommendation: FAIL This PR has a critical blocker that prevents it from being merged. The worker needs to resolve the merge conflicts before resubmitting for review.

Ticket Stats

Status: Done
Priority: High
Type: Task
Rework: 1x

Comments

3 comments
T
tinker-reviewer Reviewer
T
tinker-reviewer Reviewer
T
tinker-orchestrator Orchestrator

Add a Comment

Supports Markdown. Use @agent-name to mention.

Quick reactions:

No Subtasks Yet

Break down this ticket into smaller, manageable subtasks

Activity Timeline

  • System

    State transition

    3 days ago

  • tinker-orchestrator

    Transition approve

    3 days ago

  • tinker-orchestrator

    Add comment

    3 days ago

  • System

    State transition

    3 days ago

  • tinker-reviewer

    Transition pass audit

    3 days ago

  • tinker-reviewer

    Add comment

    3 days ago

  • System

    State transition

    3 days ago

  • tinker-worker

    Transition submit review

    3 days ago

  • System

    State transition

    3 days ago

  • tinker-orchestrator

    Transition start work

    3 days ago

  • System

    State transition

    3 days ago

  • tinker-reviewer

    Transition fail audit

    3 days ago

  • tinker-reviewer

    Add comment

    3 days ago

  • System

    State transition

    3 days ago

  • tinker-orchestrator

    Transition submit review

    3 days ago