Skip to content

feat: complete #330 startup staged-image reaper and #365 missing session/memory i18n#459

Merged
yacosta738 merged 12 commits into
mainfrom
feat/330-365-runtime-i18n-followups
Apr 8, 2026
Merged

feat: complete #330 startup staged-image reaper and #365 missing session/memory i18n#459
yacosta738 merged 12 commits into
mainfrom
feat/330-365-runtime-i18n-followups

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

Summary

  • implement #330 by adding a startup-only staged image temp-file reaper with strict matching for current and legacy staged-image filenames
  • complete #365 by adding the missing session and memory i18n keys, including parity coverage and session sidebar pluralization fixes
  • clean docs reduced-motion CSS warnings so the current quality checks pass cleanly for the touched surfaces
  • persist the updated sprint planning artifact in tmp/planning/2026-04-08-sprint-planning-next-issues.md for delivery context

Issues

Validation

  • make check-all
  • pre-push Rust checks and tests
  • pre-push web lint/check suite

Notes

  • #330 was completed through the OpenSpec flow and archived under:
    • openspec/changes/archive/2026-04-08-startup-staged-image-reaper/
  • startup reaper wiring was added at command startup boundaries to avoid duplicate runtime-level execution
  • session/memory locale coverage now includes regression checks in shared locales and chat component coverage

yacosta738 and others added 10 commits April 8, 2026 10:23
Fixed 3 file(s) based on 2 unresolved review comments.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Add the startup staged-image reaper and fill the missing session/memory i18n coverage so runtime hygiene and session UX stay aligned with the image-ingestion and memory follow-up work.

Refs: #330

Refs: #365
Persist the current sprint planning state for the completed #330 and #365 work even though the planning directory is normally ignored, so the delivery context is preserved alongside the branch.

Refs: #330

Refs: #365
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Warning

Rate limit exceeded

@yacosta738 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 55 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 3 minutes and 55 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a8be3fc4-bbe4-41f8-b566-33e52508db41

📥 Commits

Reviewing files that changed from the base of the PR and between 802af47 and 7767d11.

📒 Files selected for processing (20)
  • .gitignore
  • clients/agent-runtime/src/channels/media.rs
  • clients/agent-runtime/src/channels/mod.rs
  • clients/agent-runtime/src/config/schema.rs
  • clients/agent-runtime/src/main.rs
  • clients/web/apps/chat/src/components/SessionSidebar.spec.ts
  • clients/web/apps/chat/src/components/SessionSidebar.vue
  • clients/web/apps/docs/src/styles/custom.css
  • clients/web/packages/locales/src/en.json
  • clients/web/packages/locales/src/es.json
  • clients/web/packages/locales/src/parity.spec.ts
  • openspec/changes/archive/2026-04-08-startup-staged-image-reaper/design.md
  • openspec/changes/archive/2026-04-08-startup-staged-image-reaper/proposal.md
  • openspec/changes/archive/2026-04-08-startup-staged-image-reaper/specs/channel-image-ingestion/spec.md
  • openspec/changes/archive/2026-04-08-startup-staged-image-reaper/specs/runtime-image-pipeline/spec.md
  • openspec/changes/archive/2026-04-08-startup-staged-image-reaper/state.yaml
  • openspec/changes/archive/2026-04-08-startup-staged-image-reaper/tasks.md
  • openspec/changes/archive/2026-04-08-startup-staged-image-reaper/verify-report.md
  • openspec/specs/channel-image-ingestion/spec.md
  • openspec/specs/runtime-image-pipeline/spec.md
📝 Walkthrough

Walkthrough

This PR implements a startup-time cleanup mechanism for orphaned staged image temp files. It adds configuration for a reaper threshold, integrates reaper invocation across startup paths, and provides internationalization keys for session history and memory components.

Changes

Cohort / File(s) Summary
Startup Staged Image Reaper - Core Implementation
clients/agent-runtime/src/channels/media.rs
Adds reap_startup_staged_images() function that scans std::env::temp_dir() for Corvus staged-image files (current corvus-{channel}-img-{sha}-{nonce}.* and legacy corvus-tg-img-{sha}.* patterns), deletes only those older than a configurable threshold, and returns a report with scanned/matched/deleted counts. Includes 274 lines of strict filename validation, age-based deletion logic, best-effort error handling, and comprehensive unit tests. Exports DEFAULT_STAGED_IMAGE_REAPER_THRESHOLD_MINUTES constant and StagedImageReaperReport struct.
Startup Staged Image Reaper - Configuration
clients/agent-runtime/src/config/schema.rs
Adds optional staged_image_reaper_threshold_minutes field to MultimodalConfig with a computed effective-default method and validation that rejects explicit Some(0) values. Includes tests for field defaults, TOML deserialization, effective-threshold fallback, and validation rejection.
Startup Staged Image Reaper - Command Wiring
clients/agent-runtime/src/main.rs
Integrates reaper invocation across startup paths: gateway commands, daemon commands, channel-start commands, and onboarding autostart. Introduces helper functions for threshold computation, reaper execution with info-level logging, and command-path gating. Adds env-var and command-dispatch tests with timer control and log assertions.
Minor Configuration Helper
clients/agent-runtime/src/channels/mod.rs
Updates test helper make_multimodal_test_config to use ..Default::default() update syntax for complete field population.
Repository Gitignore
.gitignore
Appends /tmp/ pattern to ignore root-level temp directory specifically.
Frontend - Session Sidebar Localization
clients/web/apps/chat/src/components/SessionSidebar.vue, clients/web/apps/chat/src/components/SessionSidebar.spec.ts
Updates relative-time and message-count i18n calls to pass count values as third argument. Adds test coverage with fake timers for deterministic relative-time, pluralization, and aria-label assertions.
Frontend - Style Updates
clients/web/apps/docs/src/styles/custom.css
Removes !important flags from animation/transition overrides under prefers-reduced-motion: reduce, reducing specificity to allow other rules to take effect.
Localization - English and Spanish
clients/web/packages/locales/src/en.json, clients/web/packages/locales/src/es.json
Adds session.* keys (history, relative-time labels, message counts, sidebar controls), extended memory.* keys (stats labels, table columns, delete actions, filters), and new pagination.* keys. Spanish translations mirror English structure.
Localization - Parity Testing
clients/web/packages/locales/src/parity.spec.ts
Adds requiredSessionAndMemoryKeys constant and new test that validates presence of all session, memory, and pagination keys in both English and Spanish locales.
Specification and Documentation
openspec/changes/archive/2026-04-08-startup-staged-image-reaper/*, openspec/specs/channel-image-ingestion/spec.md, openspec/specs/runtime-image-pipeline/spec.md
Adds design, proposal, architecture specs, task plan, and verification report documenting the staged-image reaper feature, including filename conventions, threshold configuration, startup routing, and validation behavior. Updates existing specs to reflect new behavior.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

The PR touches critical startup paths in main.rs with multi-branch control flow routing, introduces substantial new validation logic in config schema, implements strict filename parsing in media.rs, and coordinates cross-locale i18n changes across frontend. The distributed nature of changes and behavioral wiring complexity across startup phases warrants close scrutiny for regressions, particularly around command dispatch routing and error tolerance in cleanup operations.

Suggested labels

risk:high

Suggested reviewers

  • yuniel-acosta
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning PR title exceeds 72 character limit (84 chars) required by Conventional Commits style guidelines. Shorten title to ≤72 characters, e.g. 'feat: implement #330 reaper and #365 i18n' or split into separate PRs by objective.
Docstring Coverage ⚠️ Warning Docstring coverage is 53.13% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed PR description covers all required sections: summary, related issues, validation steps, notes, and addresses documentation/breaking changes requirements.
Linked Issues check ✅ Passed Code changes fully satisfy both linked issues: #330 adds startup staged-image reaper with threshold config, logging, and tests; #365 adds all required session/memory i18n keys for English/Spanish with component coverage and pluralization support.
Out of Scope Changes check ✅ Passed All changes directly support #330 (startup reaper), #365 (session/memory i18n), design system alignment documented in OpenSpec archive, and sprint planning artifact tracking; no unrelated modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/330-365-runtime-i18n-followups

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.

Drop the accidentally force-added tmp planning file so the branch respects the repository rule that tmp artifacts stay untracked.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 8, 2026

Deploying corvus with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7767d11
Status: ✅  Deploy successful!
Preview URL: https://400a8845.corvus-42x.pages.dev
Branch Preview URL: https://feat-330-365-runtime-i18n-fo.corvus-42x.pages.dev

View logs

…i18n-followups

# Conflicts:
#	clients/web/apps/docs/src/styles/custom.css
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

✅ Contributor Report

User: @yacosta738
Status: Passed (12/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 90% >= 30%
Repo Quality Repos with ≥100 stars 0 >= 0
Positive Reactions Positive reactions received 10 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 3085 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 530 >= 0
Merger Diversity Unique maintainers who merged PRs 2 >= 0
Repo History Merge Rate Merge rate in this repo 91% >= 0%
Repo History Min PRs Previous PRs in this repo 212 >= 0
Profile Completeness Profile richness (bio, followers) 90 >= 0
Suspicious Patterns Spam-like activity detection 1 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-04-08 to 2026-04-08

@yacosta738 yacosta738 merged commit 77d96e9 into main Apr 8, 2026
12 checks passed
@yacosta738 yacosta738 deleted the feat/330-365-runtime-i18n-followups branch April 8, 2026 16:22
@coderabbitai coderabbitai Bot added risk:high and removed area:rust labels Apr 8, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 8, 2026

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.

Add missing i18n keys for session sidebar and memory components feat: startup temp file reaper for staged images

1 participant