Repository navigation
[2901 by Claude Opus 5.5] Project creator attribution onto goals, plans, automations and to-dos - #2934
Conversation
…at touch goals, planner, automations, to-dos and auth). I'll report once it finishes. So far: - Type check passes for `core` and `api`. - Lint is clean on every file I touched. - `gen:openapi:check` and `check:client-contract` both pass. None of these four responses has a documented OpenAPI schema, so there was nothing to regenerate. - The new `creatorProjection.test.ts` passes all 13 tests. - The existing tests for automations, goal projection, demo mode and the planner pass (73 tests). There are no preview images because this change only touches the API; showing the creator in the UI is the next task.
|
/ultrafix |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThis PR adds cached creator attribution to goals, plans, automations, and to-dos. The approach is focused, but one incorrect-attribution path needs correction before merge. ✅ Batched profile lookup — List projections resolve creators together, with tests asserting one profile query for representative pages. ✅ Graceful cache fallback — Cache reads and writes handle storage failures; goals preserve attribution through their stored owner login. The supplied current-head checks show 20 passed and no failures or pending checks. This review used static analysis only; no commands were run. Merge blockersEvery finding below was introduced by this PR and must be resolved before merging. F1: 🔴 To-do updates can attribute another owner's records to the caller
SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Consistent planner mutation responsesPlanner list and detail responses now include ScoreThe implementation has useful batching and focused coverage, and current checks pass. A localized correction is required to prevent false creator attribution in two update paths. Score: 6/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
✅ Applied the requested follow-up changes in commit b4e98fb
Summary of ChangesI fixed F1: when someone tries to update another user's to-do or category, the API now returns 404 instead of sending back that record with the caller named as its creator. Cause: both Fix: both re-reads now also filter on the caller's user ID. A record belonging to someone else comes back as null, and the route's existing check turns that into a 404. Updating your own records works as before. Other callers: the only other code that uses these two functions is in the CLI, and it goes through the HTTP API, so there was nothing else to change. Regression test: I added a test to Verification: with the fix, all 14 tests in ESLint skipped both changed files ("no matching configuration" when run from the repo root), so they weren't actually linted. I didn't run the type check or the wider test suite. No previews, since this change only affects the API. 🤖 Implementation Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
…do or category, the API now returns 404 instead of sending back that record with the caller named as its creator.
I fixed F1: when someone tries to update another user's to-do or category, the API now returns 404 instead of sending back that record with the caller named as its creator.
**Cause:** both `updateCategory` and `updateTodo` in `packages/core/src/services/repoTodosService.ts` only changed rows owned by the caller. But they then re-read the record by ID alone, so they returned the other user's record. The route then labelled it with the caller as creator.
**Fix:** both re-reads now also filter on the caller's user ID. A record belonging to someone else comes back as null, and the route's existing check turns that into a 404. Updating your own records works as before.
**Other callers:** the only other code that uses these two functions is in the CLI, and it goes through the HTTP API, so there was nothing else to change.
**Regression test:** I added a test to `packages/api/test/creatorProjection.test.ts`. A user whose profile is cached tries to update another owner's to-do and category: both requests get 404 and no creator. Then the owner updates both, and the responses show the new values with the owner as creator.
**Verification:** with the fix, all 14 tests in `creatorProjection.test.ts` pass after rebuilding `@propr/core`. With the old service code, the new test fails and the other 13 still pass.
ESLint skipped both changed files ("no matching configuration" when run from the repo root), so they weren't actually linted. I didn't run the type check or the wider test suite.
No previews, since this change only affects the API.
PR: #2934
Comment by: @propr-ultrafix (ID: 0)
Model: Claude Opus 5.5
|
⏳ Ultrafix is waiting for CI before the next These blocking checks on
Checks matching this repository's non-blocking checks never gate Ultrafix. The loop continues automatically once the blocking checks pass; if they have not settled within 2 hours, Ultrafix stops. |
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationReady to merge within the API attribution scope. The implementation consistently resolves creators from stored ownership and reuses the existing profile cache. ✅ Batched attribution — List handlers load creator profiles together, with tests checking one profile query for representative pages. ✅ Owner isolation — To-do and category updates now scope both the update and subsequent read to the caller, preventing foreign records from being returned. ✅ Graceful cache fallback — Cache reads and writes tolerate database errors; missing profiles produce null attribution, while goals retain their stored-login fallback. This review used static tracing of the supplied code; no commands or tests were run. The authoritative checks report 20 passed, none failed, and none pending. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Test mixed-owner demo attributionAdd a demo-mode test with two numeric owner IDs and distinct cached profiles. Existing demo tests verify cross-owner visibility and ordering, but their nonnumeric IDs do not exercise successful creator resolution. This would strengthen coverage that attribution follows each record’s owner; the implementation already does so. S3: 🟢 Align planner mutation responsesConsider including ScoreThe change is focused, preserves ownership boundaries, and includes meaningful attribution and query-count coverage. All current required checks are passing, and no merge blocker was verified. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #2901
Branch:
2901/claude-opus-5-5-project-creator-attributi-20261009-1406-dlvCommits: ✅ Changes committed (2b9472a)
AI Processing Completed
Execution Details:
Summary:
The wider test run is still going in the background (55 test files that touch goals, planner, automations, to-dos and auth). I'll report once it finishes. So far:
coreandapi.gen:openapi:checkandcheck:client-contractboth pass. None of these four responses has a documented OpenAPI schema, so there was nothing to regenerate.creatorProjection.test.tspasses all 13 tests.There are no preview images because this change only touches the API; showing the creator in the UI is the next task.
Detailed Logs:
ec080467-0ca1-4b31-b1c8-0ef93b78b9a4Log files stored at:
/tmp/claude-logs/issue-2901-2026-10-09T14-16-10-419Z-conversation.json/tmp/claude-logs/issue-2901-2026-10-09T14-16-10-419Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #2901.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!