Skip to content

feat: add experimental Codex statusline renderer#17

Open
terpjwu1 wants to merge 1 commit into
fiorastudio:masterfrom
terpjwu1:feat/experimental-codex-statusline
Open

feat: add experimental Codex statusline renderer#17
terpjwu1 wants to merge 1 commit into
fiorastudio:masterfrom
terpjwu1:feat/experimental-codex-statusline

Conversation

@terpjwu1
Copy link
Copy Markdown
Collaborator

Summary

  • add an optional buddy-codex-statusline renderer command
  • add tests for compact Codex footer rendering
  • document experimental setup for patched Codex builds that expose tui.status_line_command

Important

  • this is optional and disabled by default
  • no changes to the main Buddy install scripts
  • no hard dependency on codex-hud or a patched Codex build
  • stock Codex does not support this upstream yet

Verification

  • npm run build
  • npm test (246 passing)
  • exercised the renderer locally against live Buddy state

justinstimatze pushed a commit to justinstimatze/buddy that referenced this pull request Apr 22, 2026
Addresses all 25 findings from the second adversarial review.

Ship-blocker:
- cwd reliance (#1) — the extraction prompt now tells hosts cwd is
  REQUIRED for workspace isolation. The buddy_observe tool description
  marks it "strongly recommended" with explicit consequence ("without
  it, projects collapse into one graph"). DESIGN.md adds a Known
  Limitations section that names this as the #1 real-world risk.

Reliability / schema:
- FK ON DELETE CASCADE on reasoning_findings_log and
  reasoning_observe_seq (fiorastudio#3). `foreign_keys = ON` pragma set on schema
  init so the constraint actually enforces.
- Pipeline carries a comment explaining the seq-bump partial-failure
  semantics (fiorastudio#2).

Dead code:
- Removed unused currentObserveSeq export (fiorastudio#19).
- PipelineOptions fields marked @internal JSDoc (fiorastudio#18).

Security / sanitization:
- sanitize: Cyrillic (Н, А, Ѕ) + Armenian (Ս) role-marker lookalikes
  (fiorastudio#8). Generic <|...|> chat-template marker fallback. Extended XML
  role tags: context, role, task, example, document, tool_call,
  thinking (fiorastudio#9).
- buddy_forget validates session_id shape; invalid id returns an
  error instead of silently doing nothing (fiorastudio#20).

Tool surface:
- buddy_observe response now includes sessionId when max mode is on,
  so callers can correlate writes with buddy_reasoning_status (fiorastudio#6).
- buddy_observe description tightened: schema preserved but phrasing
  compacted from ~400 words to ~250 (fiorastudio#5).
- buddy_mode handler logic extracted to pure planModeChange +
  formatModeResponse functions so voice/max/legacy-alias semantics
  are unit-testable (fiorastudio#13 via testability seam).

Test coverage (45 new tests, 623 total):
- anchor-head: regression guard that chain findings anchor on HEAD
  not TAIL, for both unchallenged_chain and productive_stress_test
  (fiorastudio#11).
- pipeline-per-detector: end-to-end integration for all 6 detectors
  going through the full pipeline, not just the module core (fiorastudio#14).
- pipeline-cwd: workspace isolation — different cwds produce
  different session_ids, claims don't cross between projects, same
  cwd/day is stable regardless of time-of-day (fiorastudio#12).
- mode-handler: planModeChange covers voice-only, max-only, both
  together, legacy alias, voice+mode conflict, invalid voice,
  invalid max. formatModeResponse covers status/update/error
  branches (fiorastudio#13).
- benchmark: smoke perf test on a 200-claim dense graph with cross-
  chains; asserts all 6 detectors run under 3× the configured
  budget (fiorastudio#15).
- phrasings-tone: scans phrasings.ts for banned words signaling
  scold tone or mechanism leak. Runs phraseFinding for every
  (type, state) combination to catch missing templates (fiorastudio#24).
- sanitize-v3: Cyrillic/Armenian lookalikes, generic chat markers,
  XML role-ish tags, benign prose preservation (fiorastudio#8, fiorastudio#9).

Docs:
- DESIGN.md: 6-item Known Limitations section (cwd reliance, host
  extraction quality, mechanism-leak best-effort, graph rebuild cost,
  sanitizer scope, tone enforcement at review-time) (fiorastudio#17, fiorastudio#21, fiorastudio#25).
- README: token-cost line for max mode (fiorastudio#4).
- CHANGELOG: tool surface details and safety invariants.

All 623 tests pass. Typecheck clean.

https://claude.ai/code/session_011kbE3p1L3uFeKQPRyVpf6r
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.

1 participant