[PR #394] [MERGED] Derive task memory feedback_score from persisted task.status #699

Closed
opened 2026-03-13 21:04:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/394
Author: @AJaySi
Created: 3/6/2026
Status: Merged
Merged: 3/8/2026
Merged by: @AJaySi

Base: mainHead: codex/update-feedback_score-derivation-in-set_task_status


📝 Commits (1)

  • acecf2a Fix task outcome feedback scoring to use normalized status

📊 Changes

1 file changed (+11 additions, -3 deletions)

View changed files

📝 backend/api/today_workflow.py (+11 -3)

📄 Description

Motivation

  • Ensure task memory feedback is based on the canonical, persisted task status rather than the incoming request payload to avoid inconsistent memory behavior.
  • Normalize status-to-score mapping so memory outcomes align with backend status normalization rules.

Description

  • In set_task_status (in backend/api/today_workflow.py) derive normalized_status from the persisted task.status returned by update_task_status(...) and not from body.status after the update completes.
  • Implement an explicit mapping where completed -> +1, skipped / dismissed / rejected -> -1, and all other statuses -> 0, and pass the resulting feedback_score into memory.record_task_outcome(...) while preserving completion_notes behavior.
  • Leave the indexing and response payload behavior unchanged.
  • No skills from AGENTS.md were used for this change.

Testing

  • Ran python -m py_compile backend/api/today_workflow.py and it completed successfully.

Codex Task


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/394 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 3/6/2026 **Status:** ✅ Merged **Merged:** 3/8/2026 **Merged by:** [@AJaySi](https://github.com/AJaySi) **Base:** `main` ← **Head:** `codex/update-feedback_score-derivation-in-set_task_status` --- ### 📝 Commits (1) - [`acecf2a`](https://github.com/AJaySi/ALwrity/commit/acecf2a3f4fc804f9443e486d28552c6d70b7721) Fix task outcome feedback scoring to use normalized status ### 📊 Changes **1 file changed** (+11 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `backend/api/today_workflow.py` (+11 -3) </details> ### 📄 Description ### Motivation - Ensure task memory feedback is based on the canonical, persisted task status rather than the incoming request payload to avoid inconsistent memory behavior. - Normalize status-to-score mapping so memory outcomes align with backend status normalization rules. ### Description - In `set_task_status` (in `backend/api/today_workflow.py`) derive `normalized_status` from the persisted `task.status` returned by `update_task_status(...)` and not from `body.status` after the update completes. - Implement an explicit mapping where `completed` -> `+1`, `skipped` / `dismissed` / `rejected` -> `-1`, and all other statuses -> `0`, and pass the resulting `feedback_score` into `memory.record_task_outcome(...)` while preserving `completion_notes` behavior. - Leave the indexing and response payload behavior unchanged. - No skills from `AGENTS.md` were used for this change. ### Testing - Ran `python -m py_compile backend/api/today_workflow.py` and it completed successfully. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69aafa5fa0248328adc036a5f1bc1e37) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-13 21:04:32 +03:00
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
starred/ALwrity#699
No description provided.