docs: plan psychiatrist workflow#30
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds the complete Task 24 Psychiatrist Memory Assistant specification across nine documents under ChangesTask 24 Psychiatrist Assistant Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b752986f11
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/workflows/task-24-psychiatrist-assistant/07-psychiatrist-skill-and-runtime-policy.md (1)
69-70: ⚡ Quick winMake the permission-to-runtime mapping explicit to prevent contract drift.
The spec uses three related literal families (
web_source_permission,web_source_policy.reason,networkAccess) but only implies their mapping. Add a small canonical mapping table (or normative bullet list) so API route, turn runner, and tests cannot diverge on values/translation logic.Suggested doc addition
## Pair And Network Flow + +Canonical mapping (normative): + +- `web_source_permission: "deny"` -> `networkAccess: "disabled"` and no + `web_source_policy.reason`. +- `web_source_permission: "allow_for_this_turn"` -> + `networkAccess: "user_approved_web_sources"` and + `web_source_policy.reason = "user_approved_for_turn"`. +- Any other value must be rejected at route validation.Also applies to: 81-82, 94-95, 143-145
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/workflows/task-24-psychiatrist-assistant/07-psychiatrist-skill-and-runtime-policy.md` around lines 69 - 70, Add a canonical, normative mapping between web_source_permission values, web_source_policy.reason, and the runtime networkAccess value so implementers cannot drift: explicitly list each permission string (e.g., "user_approved_web_source", "no_web_source", etc.), the corresponding web_source_policy.reason that API routes must set, and the exact networkAccess literal that runConversationTurn() should receive (e.g., "enabled" or "disabled"); update the doc section around runConversationTurn(), the API route guidance, and the turn-runner/tests notes to reference this single mapping so all three (API route, runConversationTurn, and tests) use the same translation logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@docs/workflows/task-24-psychiatrist-assistant/07-psychiatrist-skill-and-runtime-policy.md`:
- Around line 69-70: Add a canonical, normative mapping between
web_source_permission values, web_source_policy.reason, and the runtime
networkAccess value so implementers cannot drift: explicitly list each
permission string (e.g., "user_approved_web_source", "no_web_source", etc.), the
corresponding web_source_policy.reason that API routes must set, and the exact
networkAccess literal that runConversationTurn() should receive (e.g., "enabled"
or "disabled"); update the doc section around runConversationTurn(), the API
route guidance, and the turn-runner/tests notes to reference this single mapping
so all three (API route, runConversationTurn, and tests) use the same
translation logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 907f14f7-fbc7-4019-ae3c-56bc9ae3e89d
📒 Files selected for processing (9)
docs/workflows/README.mddocs/workflows/task-24-psychiatrist-assistant/01-codex-conversation-adapter.mddocs/workflows/task-24-psychiatrist-assistant/02-memory-context-and-prompt-contract.mddocs/workflows/task-24-psychiatrist-assistant/03-thread-storage-api-and-streaming-events.mddocs/workflows/task-24-psychiatrist-assistant/04-reader-floating-dock-and-chat-ui.mddocs/workflows/task-24-psychiatrist-assistant/05-safety-freshness-and-errors.mddocs/workflows/task-24-psychiatrist-assistant/06-docs-browser-verification-handoff.mddocs/workflows/task-24-psychiatrist-assistant/07-psychiatrist-skill-and-runtime-policy.mddocs/workflows/task-24-psychiatrist-assistant/README.md
✅ Files skipped from review due to trivial changes (7)
- docs/workflows/task-24-psychiatrist-assistant/02-memory-context-and-prompt-contract.md
- docs/workflows/task-24-psychiatrist-assistant/03-thread-storage-api-and-streaming-events.md
- docs/workflows/task-24-psychiatrist-assistant/06-docs-browser-verification-handoff.md
- docs/workflows/task-24-psychiatrist-assistant/05-safety-freshness-and-errors.md
- docs/workflows/task-24-psychiatrist-assistant/04-reader-floating-dock-and-chat-ui.md
- docs/workflows/task-24-psychiatrist-assistant/01-codex-conversation-adapter.md
- docs/workflows/README.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 218b78f528
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c4ce40fae9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6771ee8615
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Implement Psychiatrist memory assistant
|
@codex review Please review again at 19f4484. Summary: processed all six unresolved Codex threads with per-thread replies, reactions, and resolutions; scoped public Psychiatrist thread reads to the owning memory with cross-memory regression coverage; clarified Task 24 route-test sequencing and backup-status bookkeeping; and hardened the E2E readonly SQLite fixture after a CI SQLITE_BUSY failure. Validation: local full verify passed (116 files, 1026 tests passed, 5 todo, production build); full Playwright E2E passed 53/53; GitHub Actions Verify passed; CodeRabbit passed; final unresolved non-outdated thread count is 0; mergeStateStatus is CLEAN. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19f44845a6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Local implementation/security audit and all review follow-ups are complete. Final implementation commit: 41cece3 Verification:
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ffc8b8358
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Review trace for review 4680524779: the review body is a generic container with no standalone actionable claim, so it is classified not_valid as an independent item; its five inline findings were adjudicated separately. All five inline findings were fixed in signed commit c5a2f22, replied to inline, reacted to, and resolved. Local verification passed (117 test files / 1064 tests + build, 60/60 Playwright, dev smoke), and the pushed Verify and CodeRabbit checks are green. @codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary:
threads/subtree, not SQLite.PAIRS.jsonlpair revision storage, keeping each assistant response tied to the user prompt it answers.thread_idandpair_id, overwriteRESPONSE.md/THREAD.md, and do not create a new pair/thread.psychiatrist_thread_updateandpsychiatrist_response_regeneratecommit actions.psychiatristskill, deterministic runtime prompt policy, streaming continuity, Stop, Regenerate, and backup behavior.Verification:
git diff --checkbun run typecheckfrom the Task 24 temp worktree with dependency resolution fixedSummary by CodeRabbit
.eda/directory.