You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 77ffd92
Browse filesBrowse the repository at this point in the historyBrowse files
Triage of automated review feedback on #888 — addresses the genuine
findings, skips the rest with reasons.
## Addressed
**Trust provenance for `<system-reminder>` hoisting**
(CodeRabbit `llm.ts:106`, cubic `llm.ts:94` — both P1/Major)
Moves the hoist from `llm.ts` to `prompt.ts`, where the `synthetic`
flag on `MessageV2.TextPart` is still available. The hoist now
qualifies a part only if `synthetic === true` AND text begins with
`<system-reminder>` — raw user text starting with the same characters
is left in place and never gains system-role priority. The synthetic
flag is the trust boundary: it is only set by `insertReminders` when
altimate-code itself injects PROMPT_PLAN / BUILD_SWITCH. The
`isAnthropicLikeModel` helper is colocated with the new hoist.
**Safe default for unknown families on altimate-backend**
(cubic `system.ts:46` — P2)
`SystemPrompt.provider` previously fell through to
`PROMPT_ANTHROPIC_WITHOUT_TODO` when an altimate-backend model had a
family value not in the explicit list — recreating the original
routing problem the moment a new family value appears in config. Now
defaults unknown families to `PROMPT_CODEX` because the gateway is
registered as `@ai-sdk/openai-compatible`. Regression test added.
**Case-insensitive family lookup**
(cubic `system.ts:45` — P2)
`family` is a free-form string in the model schema. Now compared via
`?.toLowerCase()`. Regression test covers `Anthropic` / `ANTHROPIC` /
`anthropic` parity.
**Biome `noSwitchDeclarations` lint**
(CodeRabbit `processor.ts:367` — Minor)
Wraps the `finish-step` case body in a block so
`sessionHasPriorToolCalls` can't leak.
**Strengthened anthropic-family regression test**
(CodeRabbit `system.test.ts:62` — Minor)
Asserts exact equality with a baseline anthropic routing call instead
of two loose negative regex checks.
**Removed conversation artifact**
Test comment referenced "the 2026-06-04 comment claimed" — date was
a leftover from the investigation timeline. Reworded to describe the
behavior directly without anchoring to today's date.
**Reframed `system.ts` routing comment**
Earlier wording attributed the GPT-5.x refusal fix to this routing
change. The actual fix is the user-message `<system-reminder>` hoist
in `prompt.ts`. Comment now correctly frames this as defense in depth.
## Skipped (with reasons)
- **dev-punia-altimate `llm.ts:78`** — "may incorrectly drop user
messages that contain both a `<system-reminder>` part and other
valid content." Misreads the code. The filter only drops messages
where `content.length === 0` AFTER extraction; messages with both a
reminder and other content keep their other content. Not applicable
to the new prompt.ts hoist either, which operates on parts not
whole messages.
- **dev-punia-altimate `processor.ts:355`** — "tool calls in earlier
steps may not be preserved in current `streamInput.messages`." Not
the case: `message-v2.ts` `toModelMessages` (lines 707-769) emits
every completed tool call as a `tool-${name}`-typed part on the
assistant message, which AI SDK's `convertToModelMessages` lowers
to `tool-call` content. Verified by reading the conversion path.
- **dev-punia-altimate `llm.ts:64`** — "`altimate_change` marker
is not permitted in CLAUDE.md, use `// NOTE: altimate`." Incorrect
— the `// altimate_change start/end` convention is used throughout
the codebase (grep finds hundreds of occurrences across packages/
opencode/src). Matching existing project style.
Typecheck clean. 605 of 612 session tests pass (7 unrelated skips).
0 commit comments