Skip to content

[2467 by Claude Opus 5] Show user corrective messages in the goal execution timeline (readable log and raw terminal view) - #2469

Merged
integry merged 6 commits into
mainfrom
2467/claude-opus-5-show-user-corrective-mess-20260923-0819-buv
Sep 23, 2026
Merged

integry merged 6 commits into
mainfrom
2467/claude-opus-5-show-user-corrective-mess-20260923-0819-buv

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #2467

Branch: 2467/claude-opus-5-show-user-corrective-mess-20260923-0819-buv
Commits: ✅ Changes committed (6bf4cb9)


AI Processing Completed

Execution Details:

Summary:
Implementation complete. Summary of what I built for issue #2467:

Backend

  • packages/api/services/goalAttachmentService.ts — extracted GOAL_ATTACHMENT_SECTION_HEADING (previously inline in appendGoalAttachments) and added stripGoalAttachmentSection(), which removes the appended block of absolute /tmp/git-processor/goal-attachments/... paths and returns a bounded attachmentCount.
  • packages/api/services/goalProjection.ts — added GoalInputProjection and loadGoalInputs(), which selects only kind = 'input' rows (newest 200, re-ordered oldest-first), strips the attachment block, truncates message bodies at 4,000 chars with a truncated flag, and normalizes state / createdAt / deliveredAt. SQLite's CURRENT_TIMESTAMP format is converted to UTC ISO so the UI's chronological merge isn't thrown off by timezone-less strings. serializeGoal takes { includeInputs?: boolean } (default true) and includes inputs; redactVisualPreviewValue still runs over the whole projection.
  • packages/api/routes/goalRoutes.ts — only the list handler passes includeInputs: false; every single-goal handler keeps the default, so a correction shows up in the same response that accepted it.

Frontend

  • New propr-ui/src/components/Goals/goalTimeline.ts — mergeGoalTimeline() interleaves inputs with provider events by deliveredAt ?? createdAt, leaves provider order intact (events with missing/unparsable timestamps keep their position), and always puts pending messages last.
  • LiveEvent gained the additive 'user_input' type plus optional inputState / attachmentCount / truncated; getCategoryDisplay, extractEventSummary, getEventIconType and EventIcon handle it. ThinkingLog renders a dedicated amber YOU row with the message verbatim, and ExecutionEventLog renders the same in the terminal styling; both show a Queued badge for pending, a Not delivered badge for undeliverable, and an attachment count. GoalsPage feeds the merged timeline to both views.

Tests — goalTimeline.test.ts (8 cases: ordering, deliveredAt precedence, pending-at-end, unparsable timestamps), 5 new goalProjection.test.ts cases (kind filtering, attachment-path stripping, 200/4,000 bounds, includeInputs: false omission, timestamp normalization), and a GoalsPage.test.tsx case asserting chronological placement plus the Queued badge in both views. Both acceptance-criteria commands pass, as does the full UI suite (157 files / 1227 tests), the related API goal suites, and lint for both workspaces.

I captured preview evidence of both views from the running app via Playwright using a throwaway spec (removed after capture, so no e2e file is added to the branch).

Detailed Logs:

  • Conversation: 187 messages
  • Session: 53529522-6837-483c-a1fc-e4a5d427235c

Log files stored at:

  • conversation: /tmp/claude-logs/issue-2467-2026-09-23T08-32-05-049Z-conversation.json
  • output: /tmp/claude-logs/issue-2467-2026-09-23T08-32-05-049Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: Implementation complete. Summary of what I built for issue #2467:

**Backend**
- `packages/api/services/goalAttachmentService.ts` — extracted `GOAL_ATTACHMENT_SECTION_HEADING` (previously inline in `a...


This PR was created automatically by ProPR after processing issue #2467.


💡 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!


Visual preview

Human readable goal output with operator messages

Human readable goal output with operator messages

Goal detail timeline at 1440px: delivered corrections are interleaved with agent output under a distinct YOU gutter label and amber accent, showing an attachment count instead of stored file paths, while the still-undelivered message waits at the end with a Queued badge.

Original unavailable: managed storage is unavailable or the upload has expired.

Raw terminal goal output with operator messages

Raw terminal goal output with operator messages

The same merged timeline after switching to Raw terminal: user messages keep the YOU label, message icon and amber accent among the provider events, and the queued message still renders last with its badge.

Original unavailable: managed storage is unavailable or the upload has expired.

Backend
- `packages/api/services/goalAttachmentService.ts` — extracted `GOAL_ATTACHMENT_SECTION_HEADING` (previously inline in `appendGoalAttachments`) and added `stripGoalAttachmentSection()`, which removes the appended block of absolute `/tmp/git-processor/goal-attachments/...` paths and returns a bounded `attachmentCount`.
- `packages/api/services/goalProjection.ts` — added `GoalInputProjection` and `loadGoalInputs()`, which selects only `kind = 'input'` rows (newest 200, re-ordered oldest-first), strips the attachment block, truncates message bodies at 4,000 chars with a `truncated` flag, and normalizes `state` / `createdAt` / `deliveredAt`. SQLite's `CURRENT_TIMESTAMP` format is converted to UTC ISO so the UI's chronological merge isn't thrown off by timezone-less strings. `serializeGoal` takes `{ includeInputs?: boolean }` (default `true`) and includes `inputs`; `redactVisualPreviewValue` still runs over the whole projection.
- `packages/api/routes/goalRoutes.ts` — only the `list` handler passes `includeInputs: false`; every single-goal handler keeps the default, so a correction shows up in the same response that accepted it.

Frontend
- New `propr-ui/src/components/Goals/goalTimeline.ts` — `mergeGoalTimeline()` interleaves inputs with provider events by `deliveredAt ?? createdAt`, leaves provider order intact (events with missing/unparsable timestamps keep their position), and always puts pending messages last.
- `LiveEvent` gained the additive `'user_input'` type plus optional `inputState` / `attachmentCount` / `truncated`; `getCategoryDisplay`, `extractEventSummary`, `getEventIconType` and `EventIcon` handle it. `ThinkingLog` renders a dedicated amber `YOU` row with the message verbatim, and `ExecutionEventLog` renders the same in the terminal styling; both show a *Queued* badge for pending, a *Not delivered* badge for undeliverable, and an attachment count. `GoalsPage` feeds the merged timeline to both views.

Tests — `goalTimeline.test.ts` (8 cases: ordering, deliveredAt precedence, pending-at-end, unparsable timestamps), 5 new `goalProjection.test.ts` cases (kind filtering, attachment-path stripping, 200/4,000 bounds, `includeInputs: false` omission, timestamp normalization), and a `GoalsPage.test.tsx` case asserting chronological placement plus the Queued badge in both views. Both acceptance-criteria commands pass, as does the full UI suite (157 files / 1227 tests), the related API goal suites, and lint for both workspaces.

I captured preview evidence of both views from the running app via Playwright using a throwaway spec (removed after capture, so no e2e file is added to the branch).
@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

/ultrafix
Triggered automatically by Planner execution settings.

@propr-dev propr-dev Bot added the ultrafix label Sep 23, 2026
@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

🔄 Ultrafix loop started (goal: 8/10, max cycles: 10)

First action: /review

💡 Tip: Remove the ultrafix label from this PR to stop further ultrafix cycles.

@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned darwin-arm64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned darwin-arm64 package
  • Result: failure
  • Commit: 6bf4cb98d180 (6bf4cb98d180228818155fec3f6c5fd76dc1b74d)
  • Details: View CI failure

Failure evidence

.github:54
Process completed with exit code 2.

.github:662
Argument of type 'Element' is not assignable to parameter of type 'HTMLElement'.

@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 5cd43ed

Summary of Changes

Fixed. The CI job's Typecheck and test unsigned desktop runtime step runs npm run desktop:typecheck, which includes npm run typecheck -w propr-ui, and that failed with a single error:

src/pages/GoalsPage.test.tsx(662,19): error TS2345: Argument of type 'Element' is not assignable to parameter of type 'HTMLElement'.

Cause: Element.closest() is generic with a default of Element. On lines 659–660 the call is inlined directly as a within(...) argument, so contextual typing infers HTMLElement; on line 661 the result is stored in a const first, so it stayed Element, which within() rejects.

Fix — propr-ui/src/pages/GoalsPage.test.tsx:661, pass the type argument explicitly:

const pending = screen.getByText('Also update the changelog').closest<HTMLElement>('[data-testid="goal-user-message"]')!;

Verification (all run in the worktree):

  • npx tsc --noEmit in propr-ui — exit 0, no errors.
  • npx vitest run src/pages/GoalsPage.test.tsx src/components/Goals/goalTimeline.test.ts — 2 files, 40 tests passed.
  • npx eslint src/pages/GoalsPage.test.tsx — clean.

The desktop half of desktop:typecheck runs before the UI half and had already passed in CI, so it was unaffected.

No preview files were generated: this is a type-annotation change in a test file with no user-visible rendering difference.


🤖 Implementation Details

  • Model: Claude Opus 5 (high)
  • Requested By: @propr-dev[bot]
  • Time: 3m 4s
  • Tokens: 685,327 (679,371 in / 5,956 out)
  • Cost: $0.66

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 5791679305✓

@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned linux-x64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned linux-x64 package
  • Result: failure
  • Commit: 6bf4cb98d180 (6bf4cb98d180228818155fec3f6c5fd76dc1b74d)
  • Details: View CI failure

Failure evidence

.github:13
No files were found with the provided path: desktop-acceptance-artifacts. No artifacts will be uploaded.

.github:54
Process completed with exit code 2.

.github:662
Argument of type 'Element' is not assignable to parameter of type 'HTMLElement'.

@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned linux-arm64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned linux-arm64 package
  • Result: failure
  • Commit: 6bf4cb98d180 (6bf4cb98d180228818155fec3f6c5fd76dc1b74d)
  • Details: View CI failure

Failure evidence

.github:54
Process completed with exit code 2.

.github:662
Argument of type 'Element' is not assignable to parameter of type 'HTMLElement'.

@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned darwin-x64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned darwin-x64 package
  • Result: failure
  • Commit: 6bf4cb98d180 (6bf4cb98d180228818155fec3f6c5fd76dc1b74d)
  • Details: View CI failure

Failure evidence

.github:54
Process completed with exit code 2.

.github:662
Argument of type 'Element' is not assignable to parameter of type 'HTMLElement'.

…ntime` step runs `npm run desktop:typecheck`, which includes `npm run typecheck -w propr-ui`, and that failed with a single error:

Fixed. The CI job's `Typecheck and test unsigned desktop runtime` step runs `npm run desktop:typecheck`, which includes `npm run typecheck -w propr-ui`, and that failed with a single error:

```
src/pages/GoalsPage.test.tsx(662,19): error TS2345: Argument of type 'Element' is not assignable to parameter of type 'HTMLElement'.
```

**Cause:** `Element.closest()` is generic with a default of `Element`. On lines 659–660 the call is inlined directly as a `within(...)` argument, so contextual typing infers `HTMLElement`; on line 661 the result is stored in a `const` first, so it stayed `Element`, which `within()` rejects.

**Fix** — `propr-ui/src/pages/GoalsPage.test.tsx:661`, pass the type argument explicitly:

```ts
const pending = screen.getByText('Also update the changelog').closest<HTMLElement>('[data-testid="goal-user-message"]')!;
```

**Verification (all run in the worktree):**
- `npx tsc --noEmit` in `propr-ui` — exit 0, no errors.
- `npx vitest run src/pages/GoalsPage.test.tsx src/components/Goals/goalTimeline.test.ts` — 2 files, 40 tests passed.
- `npx eslint src/pages/GoalsPage.test.tsx` — clean.

The desktop half of `desktop:typecheck` runs before the UI half and had already passed in CI, so it was unaffected.

No preview files were generated: this is a type-annotation change in a test file with no user-visible rendering difference.

PR: #2469
Comment by: @propr-dev[bot] (ID: 5791679305)
Model: claude-opus-5
@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @propr-dev[bot]

Analysis Summary

All three CI comments point at the same run (35837671501, commit 6bf4cb98d180) and the same root cause — the shared Typecheck and test unsigned desktop runtime step in the Validate unsigned <platform>-<arch> package matrix job.

What actually failed

.github/workflows/desktop-release-guard.yml:259 runs npm run desktop:typecheck, which chains tsc --noEmit for @propr/desktop and then for propr-ui. The renderer half failed with:

src/pages/GoalsPage.test.tsx(662,19): error TS2345: Argument of type 'Element' is not assignable to parameter of type 'HTMLElement'.

That is the single exit code 2, and it explains all three jobs failing identically — the matrix shares that step across linux-x64, linux-arm64 and darwin-x64.

The extra linux-x64 evidence line — No files were found with the provided path: desktop-acceptance-artifacts — is a downstream symptom, not a separate defect. The acceptance-capture steps (desktop-release-guard.yml:336 and :351) sit after the typecheck step, so they were skipped; the mandatory upload at :367 runs under if: always() with if-no-files-found: error, so it necessarily errored on the missing directory. It clears itself once typecheck passes.

State of the fix

That TypeScript error was already fixed on this branch by the current HEAD commit 5cd43ed6b, which landed after run 35837671501 was queued, so the run never saw it. propr-ui/src/pages/GoalsPage.test.tsx:662 now passes the type argument explicitly:

const pending = screen.getByText('Also update the changelog').closest<HTMLElement>('[data-testid="goal-user-message"]')!;

Element.closest() defaults its type parameter to Element; the two calls on lines 660–661 are inlined as within(...) arguments so contextual typing narrows them to HTMLElement, while line 662 stored the result in a const first and kept the Element default that within() rejects.

Verification on HEAD (run in the worktree)

  • npm run typecheck -w @propr/desktop — clean, exit 0.
  • npx tsc --noEmit in propr-ui — clean, exit 0. Together these are exactly what CI's desktop:typecheck runs.
  • npx vitest run src/pages/GoalsPage.test.tsx src/components/Goals/goalTimeline.test.ts — 2 files, 40 tests passed.
  • npx eslint over all 10 changed files (run from propr-ui, which has its own flat config) — 0 problems.

I made no code changes: the reported failure is already resolved on this branch and I could not reproduce it against HEAD. The three checks should go green on the next run now that 5cd43ed6b is included. I did not touch npm run desktop:test (the second half of that CI step) — it exercises @propr/desktop only and never ran in the failed jobs, and this PR changes only packages/api and propr-ui.

No preview files were generated — there is no implementation change in this follow-up to show.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: Claude Opus 5 (high)
  • Time: 3m 26s
  • Tokens: 425,526 (418,204 in / 7,322 out)
  • Cost: $0.57

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment IDs: 5791681676✓, 5791682135✓, 5791701122✓

@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR adds operator steering messages to both goal-output views, orders delivered inputs by delivery time, distinguishes queued/failed delivery states, and removes attachment filesystem paths from the projection. It needs one minor correctness fix before merge.

✅ Correct chronological source — mergeGoalTimeline uses deliveredAt for delivered corrections and keeps pending inputs at the end.

✅ Good data-boundary handling — Goal-list responses omit inputs, detail queries remain owner-scoped, and message/count limits bound the new projection.

✅ Strong verification — Focused API, timeline, and page tests cover filtering, ordering, states, attachments, truncation, and both output modes; all 25 current checks pass.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F1: 🔴 Attachment framing can erase user text

  • Required behavior: Operator-authored correction bodies must be displayed faithfully while stripping only system-generated attachment metadata.
  • Evidence: packages/api/services/goalAttachmentService.ts:64-72 — stripGoalAttachmentSection unconditionally treats the last occurrence of a natural-language marker as generated metadata. A legitimate correction containing Files uploaded with this prompt are available at these paths: after a blank line will have that marker and everything following it silently removed, even when no attachments were supplied.
  • Minimum fix: Make the attachment framing unambiguous—such as persisting the display message and attachment count separately or using an escaped/structured delimiter—and add a regression test proving user-authored occurrences of the heading remain intact.

Suggestions

These are optional follow-ups and are not sent to /fix.

No suggestions.

Score

The core implementation is well scoped and thoroughly tested, but the new projection can deterministically corrupt valid free-text corrections. The fix is localized, and no current-head checks are failing.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 3m 22s
  • Tokens: 58,530 (52,430 in / 6,100 out)
  • Cost: $0.31

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 0d08e4d

Addressed 1 AI review comment (IDs: 5792078968)

Summary of Changes

F1 is fixed by making the attachment framing explicit in storage rather than re-parsed from prose.

What changed

  • New migration packages/core/src/db/migrations/20260923000000_add_goal_input_display_body.js adds goal_inputs.display_message (text) and goal_inputs.attachment_count (integer, default 0).
  • packages/api/routes/goalRoutes.ts:576 — addGoalInput now persists the operator-authored body and the attachment count alongside the provider-facing message; addInput passes message.trim() as the display body. The delivered message (with absolute attachment paths) is untouched, so provider delivery is unchanged.
  • packages/api/services/goalProjection.ts:112 — the timeline projection reads display_message/attachment_count when present, so nothing is ever parsed out of an operator's text for new rows.
  • packages/api/services/goalAttachmentService.ts:56 — the legacy parse path (rows written before the new column) now only strips a trailing block where every line is a generated entry: - "<json name>" (<mime>): <path under /tmp/git-processor/goal-attachments/>. A quoted heading, prose after the heading, a non-storage path, or any text following the block leaves the message intact and reports 0 attachments.

Tests

  • packages/api/test/goalAttachmentService.test.ts — regression test covering a user-authored occurrence of the heading (with and without a - bullet), a heading followed by a non-storage path, prose after a genuine section, and the genuine generated section still stripping to { message, attachmentCount: 1 }.
  • packages/api/test/goalProjection.test.ts — new test proving a correction that quotes the heading survives verbatim both via display_message and via the legacy fallback; plus a test that a stored row with display_message reports the count without leaking storage paths. The pre-existing strip test now covers the legacy-row path explicitly.
  • packages/api/test/goalRoutes.test.ts — applies the new migration and asserts both the plain and attachment-bearing input rows store the display body and count.
  • test/goalMigration.test.ts — covers the new columns and their rollback.

Verification: goalAttachmentService, goalProjection, goalMigration, goalRoutes, mcpWorkflows, processGoalJob, goalRecovery, goalTaskIsolation and databaseMigrationGate suites all pass; packages/api eslint and tsc --noEmit plus the root tsc --noEmit are clean.

No preview files were generated: this follow-up changes persistence and projection only — no UI component, layout, or styling changed, and the difference is the text content already rendered by unchanged timeline code.


🤖 Implementation Details

  • Model: Claude Opus 5 (high)
  • Requested By: @propr-ultrafix
  • Time: 7m 4s
  • Tokens: 2,979,144 (2,956,126 in / 23,018 out)
  • Cost: $2.51

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…orage rather than re-parsed from prose.

F1 is fixed by making the attachment framing explicit in storage rather than re-parsed from prose.

**What changed**

- New migration `packages/core/src/db/migrations/20260923000000_add_goal_input_display_body.js` adds `goal_inputs.display_message` (text) and `goal_inputs.attachment_count` (integer, default 0).
- `packages/api/routes/goalRoutes.ts:576` — `addGoalInput` now persists the operator-authored body and the attachment count alongside the provider-facing `message`; `addInput` passes `message.trim()` as the display body. The delivered `message` (with absolute attachment paths) is untouched, so provider delivery is unchanged.
- `packages/api/services/goalProjection.ts:112` — the timeline projection reads `display_message`/`attachment_count` when present, so nothing is ever parsed out of an operator's text for new rows.
- `packages/api/services/goalAttachmentService.ts:56` — the legacy parse path (rows written before the new column) now only strips a trailing block where *every* line is a generated entry: `- "<json name>" (<mime>): <path under /tmp/git-processor/goal-attachments/>`. A quoted heading, prose after the heading, a non-storage path, or any text following the block leaves the message intact and reports 0 attachments.

**Tests**

- `packages/api/test/goalAttachmentService.test.ts` — regression test covering a user-authored occurrence of the heading (with and without a `- ` bullet), a heading followed by a non-storage path, prose after a genuine section, and the genuine generated section still stripping to `{ message, attachmentCount: 1 }`.
- `packages/api/test/goalProjection.test.ts` — new test proving a correction that quotes the heading survives verbatim both via `display_message` and via the legacy fallback; plus a test that a stored row with `display_message` reports the count without leaking storage paths. The pre-existing strip test now covers the legacy-row path explicitly.
- `packages/api/test/goalRoutes.test.ts` — applies the new migration and asserts both the plain and attachment-bearing input rows store the display body and count.
- `test/goalMigration.test.ts` — covers the new columns and their rollback.

Verification: `goalAttachmentService`, `goalProjection`, `goalMigration`, `goalRoutes`, `mcpWorkflows`, `processGoalJob`, `goalRecovery`, `goalTaskIsolation` and `databaseMigrationGate` suites all pass; `packages/api` eslint and `tsc --noEmit` plus the root `tsc --noEmit` are clean.

No preview files were generated: this follow-up changes persistence and projection only — no UI component, layout, or styling changed, and the difference is the text content already rendered by unchanged timeline code.

PR: #2469
Comment by: @propr-ultrafix (ID: 0)
Model: claude-opus-5
@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

The PR correctly persists and interleaves operator steering messages in both goal-output views, but it needs a minor correction before merge because valid long messages are projected lossily.

✅ Safe message separation — display_message and attachment_count preserve operator content without exposing provider-only attachment paths.

✅ Well-scoped projection — Only owner-scoped kind = 'input' rows are exposed, while control, context, and resume rows remain hidden.

✅ Strong verification — Tests cover projection filtering, legacy attachments, ordering, pending states, both UI views, and schema migration; all 31 current checks pass.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F2: 🔴 Long messages are not verbatim

  • Required behavior: Timeline entries must show the exact operator-authored message body; valid messages accepted by the input route must not lose content in the new projection.
  • Evidence: packages/api/services/goalProjection.ts:96 and packages/api/services/goalProjection.ts:126 — the new projection imposes a 4,000-character limit and slices longer messages, although goal input accepts messages up to 65,536 characters.
  • Minimum fix: Return the complete display_message for each projected entry. If response-size control is necessary, paginate inputs or load full bodies on demand instead of slicing the message.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Signal omitted input history

The projection returns only the newest 200 inputs without telling the client that older durable messages exist. Pagination or an inputsTruncated/cursor field would make unusually long-running goal histories discoverable. This is optional because the current bound covers ordinary use and does not affect messages within the returned window.

Score

The implementation is otherwise focused, secure, well tested, and backed by fully passing checks, but the lossy body projection conflicts with the central verbatim-display requirement.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 5m 3s
  • Tokens: 62,361 (53,083 in / 9,278 out)
  • Cost: $0.40

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit ecf2483

Addressed 1 AI review comment (IDs: 5792517616)

Summary of Changes

F2 is fixed: the goal timeline now projects operator messages verbatim.

What changed

  • packages/api/services/goalProjection.ts — dropped GOAL_INPUT_MESSAGE_LIMIT and the slicing; projectGoalInput returns the complete display_message (or the legacy parsed body) and no longer emits a truncated flag. The row cap (GOAL_INPUT_PROJECTION_LIMIT = 200, newest rows) is untouched, so response-size control stays at the list level rather than clipping bodies.
  • Removed the now-dead truncation plumbing it fed: truncated on GoalInput (propr-ui/src/api/goals.ts), its mapping in goalTimeline.ts, the truncated?: boolean field added to LiveEvent by this PR (TaskDetails/types.ts), and the … (truncated) marker in both renderers (ThinkingLog.tsx, ExecutionEventLog.tsx).
  • Tests updated: the API test that asserted a 4,000-character clip now inserts a 65,536-character body (the longest the input route at packages/api/routes/goalRoutes.ts:871 accepts) and asserts the projection returns it byte-for-byte; a new goalTimeline case asserts a 10,000-character message reaches the merged event intact; the truncated fixtures were dropped from goalTimeline.test.ts and GoalsPage.test.tsx.

Verification

  • packages/api/test/goalProjection.test.ts — 8/8 pass; goalRoutes + goalAttachmentService — 4/4 pass (run with PROPR_DEMO_MODE=true NODE_ENV=test, since the suite otherwise exits on missing GitHub auth).
  • propr-ui vitest for goalTimeline.test.ts + GoalsPage.test.tsx — 41/41 pass.
  • npm run typecheck (root) and npm run typecheck -w propr-ui clean; eslint clean.

Preview evidence: captured with the repo's existing esbuild + Tailwind + Playwright Chromium pattern (as used by apps/desktop/scripts/desktop-sidebar-layout.test.mjs), rendering a 6,090-character operator message in both the readable log and the raw terminal view — both render the full body with no clipping marker. The one-off capture script was run from the worktree and removed afterward, so only the source changes remain in the tree.

Visual preview

Readable log — full operator message

Readable log — full operator message

A 6,090-character steering message in the goal readable log, rendered end to end with no clipping and no '… (truncated)' marker.

Original unavailable: managed storage is unavailable or the upload has expired.

Raw terminal view — full operator message

Raw terminal view — full operator message

The same 6,090-character message expanded in the raw terminal event log, showing the complete body the operator sent.

Original unavailable: managed storage is unavailable or the upload has expired.


🤖 Implementation Details

  • Model: Claude Opus 5 (high)
  • Requested By: @propr-ultrafix
  • Time: 6m 16s
  • Tokens: 2,487,977 (2,469,572 in / 18,405 out)
  • Cost: $2.13
  • Subscription usage: Session +1%

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…es verbatim.

F2 is fixed: the goal timeline now projects operator messages verbatim.

**What changed**

- `packages/api/services/goalProjection.ts` — dropped `GOAL_INPUT_MESSAGE_LIMIT` and the slicing; `projectGoalInput` returns the complete `display_message` (or the legacy parsed body) and no longer emits a `truncated` flag. The row cap (`GOAL_INPUT_PROJECTION_LIMIT = 200`, newest rows) is untouched, so response-size control stays at the list level rather than clipping bodies.
- Removed the now-dead truncation plumbing it fed: `truncated` on `GoalInput` (`propr-ui/src/api/goals.ts`), its mapping in `goalTimeline.ts`, the `truncated?: boolean` field added to `LiveEvent` by this PR (`TaskDetails/types.ts`), and the `… (truncated)` marker in both renderers (`ThinkingLog.tsx`, `ExecutionEventLog.tsx`).
- Tests updated: the API test that asserted a 4,000-character clip now inserts a 65,536-character body (the longest the input route at `packages/api/routes/goalRoutes.ts:871` accepts) and asserts the projection returns it byte-for-byte; a new `goalTimeline` case asserts a 10,000-character message reaches the merged event intact; the `truncated` fixtures were dropped from `goalTimeline.test.ts` and `GoalsPage.test.tsx`.

**Verification**

- `packages/api/test/goalProjection.test.ts` — 8/8 pass; `goalRoutes` + `goalAttachmentService` — 4/4 pass (run with `PROPR_DEMO_MODE=true NODE_ENV=test`, since the suite otherwise exits on missing GitHub auth).
- `propr-ui` vitest for `goalTimeline.test.ts` + `GoalsPage.test.tsx` — 41/41 pass.
- `npm run typecheck` (root) and `npm run typecheck -w propr-ui` clean; `eslint` clean.

**Preview evidence**: captured with the repo's existing esbuild + Tailwind + Playwright Chromium pattern (as used by `apps/desktop/scripts/desktop-sidebar-layout.test.mjs`), rendering a 6,090-character operator message in both the readable log and the raw terminal view — both render the full body with no clipping marker. The one-off capture script was run from the worktree and removed afterward, so only the source changes remain in the tree.

PR: #2469
Comment by: @propr-ultrafix (ID: 0)
Model: claude-opus-5
@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR adds durable operator-message metadata, projects it into goal details, and interleaves corrections into both readable and raw timelines. The implementation is well tested and all 31 current checks pass, but two correctness gaps mean it needs minor changes before merge.

✅ Clear operator distinction — Both timeline views render operator input with a dedicated YOU category, amber styling, delivery-state badges, and attachment counts.

✅ Sound persistence model — New rows store the operator-authored body separately from provider-only attachment framing, while control, context, and resume rows are excluded.

✅ Robust timeline tests — Coverage includes delivery ordering, pending inputs, malformed timestamps, attachments, long messages, and both UI views.

Merge blockers

Every finding below was introduced by this PR and must be resolved before merging.

F3: 🔴 Global redaction rewrites operator messages

  • Required behavior: The timeline must show the text the operator actually sent verbatim; synthetic attachment paths may be removed, but operator-authored content must not be rewritten.
  • Evidence: packages/api/services/goalProjection.ts:284-286 — inputs are added to the projection before the entire object is passed through redactVisualPreviewValue, whose existing recursive behavior rewrites local preview paths inside arbitrary strings. An operator message containing such a path will therefore differ from what was sent.
  • Minimum fix: Apply preview redaction before attaching the already-sanitized inputs, or otherwise exempt each projected input’s message field from redaction; add a regression test with an operator-authored preview-like path.

F4: 🔴 Timeline silently drops older corrections

  • Required behavior: Persisted operator corrections must remain visible as evidence in the goal timeline rather than disappearing at an undocumented threshold.
  • Evidence: packages/api/services/goalProjection.ts:138-146 — loadGoalInputs unconditionally selects only the newest 200 rows and returns no truncation marker or pagination mechanism; the first correction disappears once a goal receives 201 inputs.
  • Minimum fix: Remove the limit for the detail projection, or implement pagination that the goal timeline consumes so all persisted corrections remain accessible.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Add a projection index

The new query filters by goal_id, owner_id, and kind while ordering by sequence. A matching composite index would avoid extra scanning and sorting for heavily steered goals. This is optional performance hardening rather than a correctness requirement.

Score

The core design and coverage are strong, and all current checks pass, but verbatim display and complete timeline history are central to the objective and still have localized correctness gaps.

Score: 6/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 4m 40s
  • Tokens: 62,046 (53,522 in / 8,524 out)
  • Cost: $0.36

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 47d7c9f

Addressed 1 AI review comment (IDs: 5792926972)

Summary of Changes

Both findings are fixed in packages/api/services/goalProjection.ts.

F3 — global redaction rewriting operator messages

serializeGoal now redacts the ProPR-authored projection first and attaches the already-sanitized operator inputs afterwards:

const redacted = redactVisualPreviewValue(projection) as typeof projection;
return { ...redacted, ...optionalInputs };

Everything ProPR writes into the payload (objective, failure reason, checkpoint fields, live summary) is still redacted exactly as before; only the inputs bodies — which already have their generated attachment paths stripped via display_message/stripGoalAttachmentSection — bypass it, so a correction is projected byte-for-byte as sent. Confirmed the old ordering did rewrite such text: redactVisualPreviewPaths turns [local preview omitted] into ... at [local preview omitted] is stale.

F4 — timeline silently dropping older corrections

loadGoalInputs drops GOAL_INPUT_PROJECTION_LIMIT and the .limit(), and reads in ascending sequence order directly (no reverse), so every persisted kind = 'input' row reaches the detail projection. The goal list still pays nothing for this — includeInputs: false skips the query entirely.

Tests (packages/api/test/goalProjection.test.ts)

  • The former "bounds the input list" test now inserts 205 rows and asserts all 205 project, that input-0 (the first correction) is still first, and that the 65,536-character body is intact.
  • New regression test: an operator message containing [local preview omitted] projects verbatim while failureReason on the same goal is still redacted to [local preview omitted].

Verification: packages/api/test/goalProjection.test.ts 9/9 pass; goalRoutes + goalAttachmentService 4/4 pass (run with PROPR_DEMO_MODE=true NODE_ENV=test); tsc --noEmit -p packages/api and the package's eslint config are both clean.

Preview evidence: captured with the repo's esbuild + Tailwind + Playwright Chromium pattern — a goal steered 205 times, rendered through mergeGoalTimeline into both ThinkingLog (readable log) and ExecutionEventLog (raw terminal view). Correction 1 of 205 is present in both, and the operator's own preview path renders intact. The one-off harness was removed from the worktree after capture.

Visual preview

Goal timeline: every correction, message text verbatim

Goal timeline: every correction, message text verbatim

A goal steered 205 times. Correction 1 of 205 is still in the timeline (the 200-row cap is gone), and the operator message mentioning [local preview omitted] renders with that path intact in both the readable log and the raw terminal view, because preview redaction now runs before the operator

Original unavailable: managed storage is unavailable or the upload has expired.


🤖 Implementation Details

  • Model: Claude Opus 5 (high)
  • Requested By: @propr-ultrafix
  • Time: 5m 55s
  • Tokens: 2,241,795 (2,224,025 in / 17,770 out)
  • Cost: $1.97

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR

…ction.ts`.

Both findings are fixed in `packages/api/services/goalProjection.ts`.

**F3 — global redaction rewriting operator messages**

`serializeGoal` now redacts the ProPR-authored projection first and attaches the already-sanitized operator inputs afterwards:

```ts
const redacted = redactVisualPreviewValue(projection) as typeof projection;
return { ...redacted, ...optionalInputs };
```

Everything ProPR writes into the payload (objective, failure reason, checkpoint fields, live summary) is still redacted exactly as before; only the `inputs` bodies — which already have their generated attachment paths stripped via `display_message`/`stripGoalAttachmentSection` — bypass it, so a correction is projected byte-for-byte as sent. Confirmed the old ordering did rewrite such text: `redactVisualPreviewPaths` turns `The screenshot at .propr/previews/dashboard.png is stale` into `... at [local preview omitted] is stale`.

**F4 — timeline silently dropping older corrections**

`loadGoalInputs` drops `GOAL_INPUT_PROJECTION_LIMIT` and the `.limit()`, and reads in ascending `sequence` order directly (no reverse), so every persisted `kind = 'input'` row reaches the detail projection. The goal *list* still pays nothing for this — `includeInputs: false` skips the query entirely.

**Tests** (`packages/api/test/goalProjection.test.ts`)

- The former "bounds the input list" test now inserts 205 rows and asserts all 205 project, that `input-0` (the first correction) is still first, and that the 65,536-character body is intact.
- New regression test: an operator message containing `.propr/previews/dashboard.png` projects verbatim while `failureReason` on the same goal is still redacted to `[local preview omitted]`.

**Verification**: `packages/api/test/goalProjection.test.ts` 9/9 pass; `goalRoutes` + `goalAttachmentService` 4/4 pass (run with `PROPR_DEMO_MODE=true NODE_ENV=test`); `tsc --noEmit -p packages/api` and the package's eslint config are both clean.

**Preview evidence**: captured with the repo's esbuild + Tailwind + Playwright Chromium pattern — a goal steered 205 times, rendered through `mergeGoalTimeline` into both `ThinkingLog` (readable log) and `ExecutionEventLog` (raw terminal view). Correction 1 of 205 is present in both, and the operator's own preview path renders intact. The one-off harness was removed from the worktree after capture.

PR: #2469
Comment by: @propr-ultrafix (ID: 0)
Model: claude-opus-5
@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: Validate unsigned darwin-x64 package

Please investigate and fix this CI failure.

  • Check: Validate unsigned darwin-x64 package
  • Result: failure
  • Commit: 47d7c9f72a32 (47d7c9f72a32529cedc19adb91e20b14fbd3ece0)
  • Details: View CI failure

Failure evidence

.github:62
Process completed with exit code 1.

@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit d8c64f4

Summary of Changes

What failed

The Validate unsigned darwin-x64 package job failed in the step Exercise staged native install, deep-link, relaunch, and removal lifecycle:

NativeLifecycleFailure: Native lifecycle cleanup failed: launchservices-postcondition

The primary error slot was empty, so the whole macOS lifecycle (extract → launch → deep links → relaunch → remove) actually passed. Only the LaunchServices cleanup postcondition failed, and only on the Intel leg — darwin-arm64 and both Linux legs were green in the same run, and this workflow had passed three times earlier on this branch. Nothing in PR #2469 touches the desktop app; the workflow just fires on propr-ui/**.

Root cause

LaunchServicesAuthority.isListed() in apps/desktop/scripts/test-native-artifact-lifecycle.mjs:1138 probed registration by reading lsregister -dump through the shared bounded command helper. That helper caps output at OUTPUT_CAP (64 KiB) and appendBounded keeps the trailing window — while a real lsregister -dump emits megabytes. Two consequences:

  1. The probe never saw the bundle record section at all on a normal run, so the postcondition passed vacuously. stdoutOverflow was also ignored here, unlike inspectRunningProcessGroupMembers (:398), which explicitly rejects truncated output as unusable.
  2. Whatever landed in that tail decided the answer. The match was a loose substring-with-delimiters test, so a claimed-URL-scheme / handler-binding line echoing the copied app path counted as "still registered" — and those tables sit at the end of the dump. The copied app had just claimed propr:// via lsregister -f plus open -a, so the echo persisted across all 10 re-probes (~18s of extra runtime, matching the observed 91s vs. the 73s arm64 leg).

Fix

In apps/desktop/scripts/test-native-artifact-lifecycle.mjs:

  • Added scanCommandLinesForMatch, a streaming line scanner that reads the entire dump and retains at most one bounded line, stopping at the first match. Failure classification (COMMAND_FAILED / COMMAND_SIGNALLED / COMMAND_DEADLINE / COMMAND_SPAWN_FAILED) matches the existing runner and still leaks no command output. LaunchServicesAuthority takes it as an injectable scanCommand.
  • Added launchServicesRecordMatchesApplication, which matches only the bundle path: record for the exact application root — the record lsregister -f creates and -u removes. Stale scheme/binding echoes, sibling paths, and nested helper bundles no longer count as registration.
  • assertGone() now re-issues lsregister -u on each re-probe, since a bundle opened through LaunchServices can be re-registered by the system after the first -u returns.

Verification

  • node --test apps/desktop/scripts/test-native-artifact-lifecycle.test.mjs — 31/31 pass.
  • Full npm run test -w @propr/desktop (what the CI step runs) — 961 tests, 927 pass, 0 fail, 34 skipped.
  • ESLint clean on both changed files.

New tests cover: the exact-record matcher's accept/reject set; a ~512 KiB stream with the record placed far outside the 64 KiB tail (found by the scanner, and asserted lost by the bounded runner, which pins the regression); a final record with no trailing newline; and each probe failure classification. The stale-registration test now asserts the re-issued -u calls.

I did not generate visual previews — this is a CI test-script fix with no user-perceptible UI change.

One caveat worth stating: I can't execute lsregister here, so the macOS-side behavior is reasoned from the job logs and the code rather than reproduced. If the postcondition still fails after this, the next thing to capture is the actual matching dump line, which the sanitized NativeLifecycleFailure message deliberately withholds today.


🤖 Implementation Details

  • Model: Claude Opus 5 (high)
  • Requested By: @propr-dev[bot]
  • Time: 12m 28s
  • Tokens: 3,229,928 (3,198,682 in / 31,246 out)
  • Cost: $2.90
  • Subscription usage: Session +3%, Weekly +1%

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Implement fixes for issues found by /review /fix or /fix address the null check issue
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 5793356720✓

## What failed

The `Validate unsigned darwin-x64 package` job failed in the step *Exercise staged native install, deep-link, relaunch, and removal lifecycle*:

```
NativeLifecycleFailure: Native lifecycle cleanup failed: launchservices-postcondition
```

The primary error slot was empty, so the whole macOS lifecycle (extract → launch → deep links → relaunch → remove) actually passed. Only the LaunchServices *cleanup postcondition* failed, and only on the Intel leg — `darwin-arm64` and both Linux legs were green in the same run, and this workflow had passed three times earlier on this branch. Nothing in PR #2469 touches the desktop app; the workflow just fires on `propr-ui/**`.

## Root cause

`LaunchServicesAuthority.isListed()` in `apps/desktop/scripts/test-native-artifact-lifecycle.mjs:1138` probed registration by reading `lsregister -dump` through the shared bounded command helper. That helper caps output at `OUTPUT_CAP` (64 KiB) and `appendBounded` keeps the **trailing** window — while a real `lsregister -dump` emits megabytes. Two consequences:

1. The probe never saw the bundle record section at all on a normal run, so the postcondition passed vacuously. `stdoutOverflow` was also ignored here, unlike `inspectRunningProcessGroupMembers` (`:398`), which explicitly rejects truncated output as unusable.
2. Whatever landed in that tail decided the answer. The match was a loose substring-with-delimiters test, so a claimed-URL-scheme / handler-binding line echoing the copied app path counted as "still registered" — and those tables sit at the end of the dump. The copied app had just claimed `propr://` via `lsregister -f` plus `open -a`, so the echo persisted across all 10 re-probes (~18s of extra runtime, matching the observed 91s vs. the 73s arm64 leg).

## Fix

In `apps/desktop/scripts/test-native-artifact-lifecycle.mjs`:

- Added `scanCommandLinesForMatch`, a streaming line scanner that reads the *entire* dump and retains at most one bounded line, stopping at the first match. Failure classification (`COMMAND_FAILED` / `COMMAND_SIGNALLED` / `COMMAND_DEADLINE` / `COMMAND_SPAWN_FAILED`) matches the existing runner and still leaks no command output. `LaunchServicesAuthority` takes it as an injectable `scanCommand`.
- Added `launchServicesRecordMatchesApplication`, which matches only the bundle `path:` record for the exact application root — the record `lsregister -f` creates and `-u` removes. Stale scheme/binding echoes, sibling paths, and nested helper bundles no longer count as registration.
- `assertGone()` now re-issues `lsregister -u` on each re-probe, since a bundle opened through LaunchServices can be re-registered by the system after the first `-u` returns.

## Verification

- `node --test apps/desktop/scripts/test-native-artifact-lifecycle.test.mjs` — 31/31 pass.
- Full `npm run test -w @propr/desktop` (what the CI step runs) — 961 tests, 927 pass, 0 fail, 34 skipped.
- ESLint clean on both changed files.

New tests cover: the exact-record matcher's accept/reject set; a ~512 KiB stream with the record placed far outside the 64 KiB tail (found by the scanner, and asserted *lost* by the bounded runner, which pins the regression); a final record with no trailing newline; and each probe failure classification. The stale-registration test now asserts the re-issued `-u` calls.

I did not generate visual previews — this is a CI test-script fix with no user-perceptible UI change.

One caveat worth stating: I can't execute `lsregister` here, so the macOS-side behavior is reasoned from the job logs and the code rather than reproduced. If the postcondition still fails after this, the next thing to capture is the actual matching dump line, which the sanitized `NativeLifecycleFailure` message deliberately withholds today.

PR: #2469
Comment by: @propr-dev[bot] (ID: 5793356720)
Model: claude-opus-5
@propr-dev

propr-dev Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @propr-ultrafix

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-5.6-sol

Overall Evaluation

This PR is ready to merge. It durably preserves operator-authored text, projects only genuine steering inputs, and interleaves those inputs into both readable and raw goal timelines with strong coverage.

✅ Safe message projection — display_message and attachment_count separate operator-visible content from provider-only attachment paths, including a conservative legacy-row fallback.

✅ Correct timeline semantics — Delivered inputs use delivery time, pending inputs remain visibly queued at the end, and provider event ordering is preserved.

✅ Thorough verification — Tests cover ownership-sensitive projection, control-row filtering, long histories, maximum-size messages, attachment privacy, both UI modes, and migration rollback. All authoritative head checks pass.

Merge blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Handle pre-start relative times

goalTimeline.ts calculates relative time from createdAt for pending inputs. A correction submitted before goal.startedAt can therefore display a negative duration after execution begins. Omitting or clamping that cosmetic timestamp would avoid confusing output, but the message, state, and timeline evidence remain correct without it.

S2: 🟢 Separate lifecycle changes

The LaunchServices streaming and unregister changes in apps/desktop/scripts/test-native-artifact-lifecycle.mjs are well tested but unrelated to goal-input timelines. Moving such maintenance into a separate PR would reduce review surface and simplify future regression analysis; this is organizational rather than a correctness requirement.

Score

The implementation fulfills the objective with careful data handling, comprehensive edge-case tests, and a fully passing check suite. The remaining follow-ups are optional refinements.

Score: 9/10


🤖 Review Details

  • Model: GPT-5.6 Sol
  • Time: 3m 11s
  • Tokens: 66,692 (61,025 in / 5,667 out)
  • Cost: $0.34

View Task


💡 Next step: Comment /fix to address F# merge blockers only.
F# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. Suggestions require a separate ordinary follow-up request.

🤖 Review by ProPR

@propr-dev propr-dev Bot removed the ultrafix label Sep 23, 2026
@integry
integry merged commit 76940a7 into main Sep 23, 2026
40 checks passed
@integry
integry deleted the 2467/claude-opus-5-show-user-corrective-mess-20260923-0819-buv branch September 23, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show user corrective messages in the goal execution timeline (readable log and raw terminal view)

1 participant