Dispatch 377
Week of Nov 16 to Nov 22 ↗

Project Ops Stamps Completion Times

The team spent the day tightening up the project operations backend, focusing on how the system handles task states when things get created or reset. The core issue was that certain operations were not prope…

Commits
3
Systems
9
Read
2min
Product capture

Project-Ops: projects list.

Key points

  1. The team updated the project clone logic to preserve completion timestamps when the reset flag is false.
  2. Aaron fixed the MCP service to stamp completion times for tasks created in a completed state.
  3. The team patched the transactional creation function to ensure completion timestamps are set during bulk operations.
  4. The team reviewed changes and verified that test coverage is sufficient to prevent regressions.

The team spent the day tightening up the project operations backend, focusing on how the system handles task states when things get created or reset. The core issue was that certain operations were not properly recording when a task reached a completed status, which could lead to inconsistent data in the system. Aaron made three targeted commits to the project-ops repository to fix this across different parts of the codebase.

The first change addressed the project clone functionality. When a project was cloned with the reset status flag set to false, the system was supposed to preserve the original completion timestamps. However, the logic for carrying over the completedAt field was not firing correctly. Aaron updated the projects service and its tests to ensure that the clone operation respects this flag and copies the completion time over accurately. This keeps the historical data intact when duplicating existing work, which is important for tracking how long similar projects took to finish.

The second fix focused on the MCP (Model Context Protocol) layer. When a new task was created through the MCP interface and immediately marked as completed, the system was not stamping the completedAt time. This meant that tasks created via this API would have a null completion time, even though they were technically done. Aaron updated the MCP service and its associated tools to handle this case. Now, if a task is created in a completed state, the timestamp is recorded immediately. This ensures that the data model remains consistent regardless of how the task was initiated.

This keeps the historical data intact when duplicating existing work, which is important for tracking how long similar projects took to finish.

The third commit tackled the transactional creation logic. The createInTx function, which handles creating tasks within a database transaction, was also missing the logic to stamp the completion time when the task was created as completed. Aaron added the necessary code to the tasks service and updated the tests to verify the behavior. This change ensures that the completion timestamp is set correctly even when tasks are created in bulk or as part of a larger transactional operation.

These changes might seem small, but they address a subtle inconsistency in how the system tracks task lifecycles. Without them, the system could report incorrect durations or fail to properly account for completed work, especially in scenarios where tasks are created or cloned in bulk. By fixing the completedAt stamping across the clone, MCP, and transactional creation paths, the team has made the data more reliable for reporting and analysis.

The work was straightforward but necessary. It required careful attention to the edge cases where tasks are created in a completed state or cloned with specific flags. Aaron verified the changes with updated tests to ensure that the new behavior holds up under various conditions. The result is a more robust backend that accurately reflects the state of tasks across different operations.

Also today: The team reviewed the changes and ensured that the test coverage was sufficient to catch any regressions in how completion times are handled.

The backend now keeps better track of when work actually ends, which matters for anyone relying on accurate project timelines.

From the recordWhere the work went407 commits across 9 repositories, and 2 receipts on the board
  1. ops-center213
  2. unicorn-stable85
  3. legal-ops31
  4. agent-dispatch22
  5. project-ops19
  6. uc-meeting-ops15
  7. customer-ops10
  8. email-ops10
  9. 1 other repository2
Also in the frame

Real product captures. Click any to enlarge.

project ops
project ops
project ops