Skip to content

[WIP] Optimize code for new OpenAI poetic brain integration#4

Merged
DHCross merged 1 commit intomainfrom
copilot/optimize-poetic-brain-interaction
Dec 24, 2025
Merged

[WIP] Optimize code for new OpenAI poetic brain integration#4
DHCross merged 1 commit intomainfrom
copilot/optimize-poetic-brain-interaction

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 24, 2025

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Make sure my code is optimized for the new open AI poetic brain that I inserted to replace the Perplexity version, especially how it interacts with the persona law file and make recommendations


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
shipyard Ready Ready Preview, Comment Dec 24, 2025 3:46pm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DHCross DHCross marked this pull request as ready for review December 24, 2025 15:47
@DHCross DHCross merged commit 586610d into main Dec 24, 2025
2 of 3 checks passed
Copilot AI requested a review from DHCross December 24, 2025 15:48
@DHCross DHCross deleted the copilot/optimize-poetic-brain-interaction branch December 30, 2025 03:39
DHCross added a commit that referenced this pull request Mar 2, 2026
…ge clarity

HIGH priority:
- #6 symbolicWeather: soft-fail instead of re-throwing AuthorityViolationError
- #7 TTS: add 10s AbortController timeout to ElevenLabs fetch (504 on timeout)
- #9 injectProtocols: wrap in try/catch, continue without corpus on failure

MEDIUM priority:
- #2 LLM auth: normalize 401/403 to user-friendly message
- #3 LLM timeout: add one retry in generateReplyWithRetry
- #4 Empty LLM response: distinguish content_filter from true empty
- #5 AuthorityViolation outer catch: hide internal module names

LOW priority:
- #1 Missing LLM key 503: clearer operator message
- #8 useOracleChat: map 413 to user-friendly 'message too long' text
- #10 Remove void-cast needsConcreteRetry/needsProtocolRepair calls
DHCross added a commit that referenced this pull request Apr 28, 2026
…structure failures (invariant #4)

When the stream finalize block catches an error but a hardened reply or
accumulated buffer is still salvageable, the failure is post-process
decoration (hash computation, metadata stamping, etc.) — not a true
infrastructure outage. Stop stapling a SYSTEM/REASON/ACTION banner to
narrated prose in that case.

- Salvageable path: emit the prose alone with
  systemNotice='POSTPROCESS_DEGRADED', isFallback=true,
  generated=true, llmFailureReason='stream_finalize_postprocess_degraded'.
  No SYSTEM banner appears in the visible reply.
- Unsalvageable path: keep the existing
  buildStreamFinalizeFailedMessage SYSTEM string with
  systemNotice='FINALIZE_FAILED'. The user must see infrastructure
  failure when there is no narrated content to surface.

Adds two behavioral assertions in recoveryMessages.test.ts:
- The helper still emits a SYSTEM/REASON/ACTION banner on the no-salvage
  path (the genuine infrastructure-failure contract).
- The helper prefers finalizedReply over accumulatedReply in the
  appended-banner composite.

Doctrine boundary preserved: SYSTEM/REASON/ACTION schema lives only in
recoveryMessages.ts and is reached only when nothing salvageable exists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants