Skip to content

Unify execution timeline formatting across web and Discord#204

Merged
jbax1899 merged 2 commits intomainfrom
feat/execution-timeline-parity
Mar 27, 2026
Merged

Unify execution timeline formatting across web and Discord#204
jbax1899 merged 2 commits intomainfrom
feat/execution-timeline-parity

Conversation

@jbax1899
Copy link
Copy Markdown
Member

@jbax1899 jbax1899 commented Mar 27, 2026

Summary by CodeRabbit

  • New Features

    • API responses now include a new execution array with per-step records (kind, status, reasonCode, duration, metadata).
    • UI and integrations now surface a compact execution timeline summary instead of raw execution payloads; serialized payloads emit a summarized execution field for display.
  • Deprecations

    • modelVersion is deprecated; prefer the execution array as the canonical runtime timeline.

@jbax1899 jbax1899 self-assigned this Mar 27, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a623989d-a0fc-4e48-8ee6-ee4a62f1ea84

📥 Commits

Reviewing files that changed from the base of the PR and between e902e4b and b06daa0.

📒 Files selected for processing (2)
  • docs/api/openapi.yaml
  • packages/contracts/src/ethics-core/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/contracts/src/ethics-core/index.ts

📝 Walkthrough

Walkthrough

Adds a new execution array to ResponseMetadata (with constrained enums and no additional properties), marks modelVersion deprecated, and introduces a shared formatExecutionTimelineSummary utility used by UI and bot code to render execution timelines.

Changes

Cohort / File(s) Summary
API Schema
docs/api/openapi.yaml
Adds execution array schema to ResponseMetadataBase with kind, status, reasonCode, durationMs, and additionalProperties: false; marks modelVersion as deprecated with guidance to prefer execution[].
Contracts — validation & types
packages/contracts/src/web/schemas.ts, packages/contracts/src/ethics-core/types.ts
Zod shape updated to accept modelVersion (kept for compatibility but deprecated) and to recognize execution[]; JSDoc deprecation added to ResponseMetadata.modelVersion.
New shared utility
packages/contracts/src/ethics-core/executionFormatting.ts
New export formatExecutionTimelineSummary(execution) that formats ExecutionEvent[] into a compact one-line timeline string or returns null for empty/undefined input.
Contracts — exports
packages/contracts/src/ethics-core/index.ts, packages/contracts/src/index.ts
Re-exports formatExecutionTimelineSummary from ethics-core through the contracts package public surface.
Consumers — UI & Bot
packages/web/src/components/ProvenanceFooter.tsx, packages/web/src/pages/TracePage.tsx, packages/discord-bot/src/interactions/button/provenanceButtons.ts
Replaces local execution-formatting logic with formatExecutionTimelineSummary; Discord bot serializes an executionSummary (JSON string or null) instead of emitting raw execution in the serialized payload.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Poem

🐰 A small hop for code, a tidy line,
Execution events now march in time.
One summary string, neat and spry,
modelVersion waves goodbye.
The rabbit cheers: "Unified!" 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main objective of the changeset: introducing a shared formatExecutionTimelineSummary utility and consolidating execution timeline formatting logic across the web and Discord bot packages.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/execution-timeline-parity

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as resolved.

…lds. Update ethics-core index to clarify the purpose of re-exported types and runtime helpers.
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