Skip to content

fix(reborn): persist chat timeline timestamps - #5764

Merged
think-in-universe merged 25 commits into
mainfrom
issue-3535-chat-timestamps
Jul 8, 2026
Merged

think-in-universe merged 25 commits into
mainfrom
issue-3535-chat-timestamps

Conversation

@italic-jinxin

@italic-jinxin italic-jinxin commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds durable per-message created_at / updated_at timestamps to Reborn thread timeline records.
  • Validates new transcript writes carry timestamps and prevents updates from clearing existing timestamp metadata.
  • Stamps and preserves message/thread activity timestamps across in-memory and filesystem thread stores.
  • Updates WebChat timeline rendering to prefer durable server timestamps, with finalized records using updated_at.
  • Adds store contract tests and WebUI presenter tests for durable timestamp projection.
image

Linked Issue

Closes #3535

Validation

  • cargo fmt --all -- --check
  • git diff --check
  • cargo test -p ironclaw_threads
  • node --test crates/ironclaw_webui_v2/static/js/pages/chat/lib/history-messages.test.mjs
  • cargo test -p ironclaw_webui_v2 chat_message_grouping_hoists_only_final_replies --features webui-v2-beta

Security Impact

No auth, secret, network, or sandbox behavior changes.

Database Impact

No schema or migration changes. Filesystem transcript JSON gains optional timestamp fields; legacy rows deserialize with None.

Blast Radius

Limited to Reborn thread timeline records and WebChat timestamp presentation, plus test/helper construction sites for ThreadMessageRecord.

Rollback Plan

Revert this PR to return timeline messages to timestamp-less records and prior WebUI timestamp fallback behavior.

@italic-jinxin italic-jinxin added size: L 200-499 changed lines risk: medium Business logic, config, or moderate-risk modules skip-regression-check Bypass regression test CI gate (tests exist but not in tests/ dir) labels Jul 7, 2026
@ironloopai

ironloopai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

🔎 IronLoop Review Status

Head: 35631262ccbf9d046c42187030ac03914d5afa9d
Result: No reviewer jobs are scheduled yet.
Next: Run @ironloopai review to start reviewers.
Updated: 2026-07-08T15:33:27.973Z

Current reviewers:

Reviewer State Verdict Findings Last update
none Queued N/A No reviewer jobs scheduled yet. N/A
Reviewer summaries
Reviewer Detail
none No reviewer jobs scheduled yet.
Recent activity
Time Reviewer State Detail
N/A N/A Waiting No progress events recorded yet.
Available commands
  • @ironloopai help
  • @ironloopai agents
  • @ironloopai review
  • @ironloopai review --agent <agent-id-or-alias>
  • @ironloopai status
Run metadata

Admission: webhook accepted the request and IronLoop persisted review state before this projection.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 7, 2026 11:05 Destroyed
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 90daa36b-a83d-47a3-8342-281654d18287

📥 Commits

Reviewing files that changed from the base of the PR and between 396095b and 3563126.

📒 Files selected for processing (3)
  • crates/ironclaw_product_workflow/src/reborn_services.rs
  • crates/ironclaw_product_workflow/tests/reborn_services_contract.rs
  • crates/ironclaw_reborn/src/loop_exit_applier/tests/mod.rs

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Timeline and history views now preserve durable message timestamps, including when messages were created and last updated.
  • Bug Fixes

    • Improved timestamp handling for messages so finalized content shows the correct time information after updates and reloads.
    • Updated error handling so invalid message timestamp states are treated as recoverable service issues.
  • Tests

    • Expanded coverage for message history, timestamp formatting, and related integration flows.

Walkthrough

ThreadMessageRecord gains optional durable created_at/updated_at fields with serde defaults for legacy compatibility. Filesystem and in-memory session-thread backends stamp and validate these timestamps across message lifecycle operations, project them in history reads, and surface violations via a new SessionThreadError::InvalidMessageTimestamp variant. Frontend timestamp selection and several test fixtures/integration tests are updated accordingly; unrelated test infra converts three integration test files to use a larger-stack synchronous test runner.

Changes

Durable message timestamps

Layer / File(s) Summary
Timestamp contract and errors
crates/ironclaw_threads/src/contract.rs, crates/ironclaw_threads/src/error.rs
ThreadMessageRecord adds optional created_at/updated_at with serde defaults; validate_new_message_timestamps and validate_message_timestamp_fields_not_cleared enforce invariants; TimestampViolation enum and SessionThreadError::InvalidMessageTimestamp are added.
Filesystem stamping and projection
crates/ironclaw_threads/src/filesystem_service.rs, crates/ironclaw_threads/src/filesystem_service/thread_index.rs, crates/ironclaw_threads/tests/filesystem_session_thread_contract.rs
New/updated message writes validate and stamp timestamps from a shared now; thread touch helpers accept explicit updated_at; history projection returns timestamps; new contract test asserts durable timestamp behavior.
In-memory stamping and projection
crates/ironclaw_threads/src/in_memory.rs, crates/ironclaw_threads/tests/session_thread_contract.rs
Mirrors filesystem stamping/validation logic for the in-memory backend across inbound, draft, finalize, tool-result, preview, update, and redact paths, plus a matching contract test.
Timestamp error mapping
crates/ironclaw_product_workflow/src/reborn_services.rs, tools/ironclaw_stress/src/user_turn.rs
InvalidMessageTimestamp is mapped to retryable/unavailable responses and to a dedicated stress-test failure bucket.
Web UI timestamp selection and fixtures
crates/ironclaw_webui_v2/frontend/.../history-messages.ts, tests/integration/webui_v2_product_api.rs, and misc test fixtures across ironclaw_loop_support, ironclaw_product_workflow, ironclaw_reborn, ironclaw_reborn_composition
Frontend prefers received_at, then status-based updated_at/created_at fallback; integration test asserts RFC3339 timestamps in history; test-only ThreadMessageRecord constructors set explicit None values to match the new shape.

Estimated code review effort: 4 (Complex) | ~60 minutes

Async Test Stack Wrapper

Layer / File(s) Summary
Stacked async test runner
tests/integration/outbound_target.rs, tests/integration/skill_activate.rs, tests/integration/project_create.rs
Multiple integration tests are converted from #[tokio::test] to synchronous #[test] wrappers that run the async body via a new run_async_test_with_stack helper spawning a 16MB-stack thread with a current-thread Tokio runtime.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • nearai/ironclaw#5002: Both change filesystem_service.rs/in_memory.rs thread activity timestamp update paths (accept_inbound_message, touch_thread_updated_at).
  • nearai/ironclaw#5455: Both modify the same finalized assistant message append and thread touch logic in the persistence paths.
  • nearai/ironclaw#5726: Both touch touch_thread_index_updated_at; this PR changes its signature while the other introduces/uses the thread-index CAS layer.

Suggested reviewers: think-in-universe, ilblackdragon

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The async stack-helper rewrites in outbound_target, skill_activate, and project_create are unrelated to chat timestamp persistence. Move the stack-helper/test-runtime refactor into a separate PR, or justify why those integration test changes are required for the timestamp fix.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Conventional-commits style and accurately summarizes the durable chat timestamp persistence fix.
Description check ✅ Passed The description covers summary, linked issue, validation, impact, and rollback; only non-critical template sections are left blank.
Linked Issues check ✅ Passed The changes address #3535 by persisting durable timestamps and updating timeline rendering to use them after refresh.

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.

@italic-jinxin

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions github-actions Bot added size: M 50-199 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs and removed size: L 200-499 changed lines risk: medium Business logic, config, or moderate-risk modules labels Jul 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces durable server-side timestamps (created_at and updated_at) to ThreadMessageRecord to track when messages are first persisted and when they are materially changed, such as when a draft is finalized. These fields are integrated into both the filesystem and in-memory session thread services, and the frontend chat UI is updated to prefer these durable timestamps when rendering message times. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@ironloopai ironloopai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ IronLoop Review: reviewer

Verdict: ✅ Approved
Findings: 0 blocking / 0 notes
Next: No reviewer action needed.
Head: 045a60cdb010edafa6f2ee4045f35435cb2a8d34

Run details

Status: Current
Needs human: no
Needs validation: no

**Inline candidates:** 0

Summary

No concrete, actionable issues found in the timestamp persistence and WebUI timeline rendering changes.

Findings

None.

Developer follow-up

After fixing this feedback:

  1. Push the fix to this PR branch.
  2. Re-run this reviewer with @ironloopai review --agent reviewer if you only changed this reviewer's findings.
  3. Re-run all reviewers with @ironloopai review when the fix may affect multiple areas.
  4. Use @ironloopai status to check queued/running/completed/stale/stalled state while reviewers run.

@claude

This comment was marked as resolved.

@github-actions

github-actions Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Coverage ratchet

Ratchet mode: ENFORCING

RATCHET PASS: global
  observed: 85.16% (282265 / 331443 lines)
  floor:    85.3% (tolerance 0.5pp -> effective floor 84.8%)
  denominator: 331443 lines now vs 320188 at floor capture (+11255 lines, +3.52%) — not a material change

⚠️ 3 Reborn crate(s) have 0 int-tier coverage (target: 0) — ironclaw_prompt_envelope, ironclaw_scripts, ironclaw_skill_learning

Reborn integration-tier coverage

Line coverage (Reborn crates): 85.16% — 282265 / 331443 lines

Per-crate breakdown (65 crates, lowest-covered first)
Crate Line % Covered / Total
ironclaw_prompt_envelope 0% 0 / 88
ironclaw_scripts 0% 0 / 347
ironclaw_skill_learning 0% 0 / 61
ironclaw_wasm_sandbox_core 7.37% 7 / 95
ironclaw_runtime_policy 33.2% 80 / 241
ironclaw_event_projections 43.34% 673 / 1553
ironclaw_run_state 52.36% 222 / 424
ironclaw_authorization 53.54% 461 / 861
ironclaw_triggers 59.99% 1736 / 2894
ironclaw_observability 61.54% 16 / 26
ironclaw_webui_v2 63.12% 2543 / 4029
ironclaw_mcp 63.15% 581 / 920
ironclaw_reborn_cli 63.41% 3816 / 6018
ironclaw_reborn_migration 67.01% 1172 / 1749
ironclaw_memory 67.12% 747 / 1113
ironclaw_dispatcher 67.15% 92 / 137
ironclaw_filesystem 67.44% 3815 / 5657
ironclaw_trust 72.88% 661 / 907
ironclaw_capabilities 74.08% 1658 / 2238
ironclaw_wasm_limiter 74.6% 47 / 63
ironclaw_reborn_event_store 74.61% 958 / 1284
ironclaw_extractors 74.72% 538 / 720
ironclaw_first_party_extensions 77.62% 5411 / 6971
ironclaw_llm 77.88% 19479 / 25013
ironclaw_product_context 78.57% 11 / 14
ironclaw_wasm_product_adapters 80.58% 1510 / 1874
ironclaw_process_sandbox 80.65% 671 / 832
ironclaw_reborn_openai_compat 80.95% 956 / 1181
ironclaw_memory_native 81.86% 3226 / 3941
ironclaw_wasm 82.54% 950 / 1151
ironclaw_secrets 82.7% 2791 / 3375
ironclaw_events 83.47% 1762 / 2111
ironclaw_processes 84.06% 965 / 1148
ironclaw_turns 84.24% 13099 / 15549
ironclaw_host_api 85.17% 2549 / 2993
ironclaw_product_workflow 85.74% 10626 / 12393
ironclaw_projects 85.92% 659 / 767
ironclaw_network 86.12% 670 / 778
ironclaw_common 86.59% 1472 / 1700
ironclaw_threads 86.62% 4132 / 4770
ironclaw_slack_v2_adapter 86.79% 1806 / 2081
ironclaw_auth 86.96% 2995 / 3444
ironclaw_reborn_config 86.98% 1730 / 1989
ironclaw_reborn_identity 87.03% 557 / 640
ironclaw_product_adapters 87.29% 3207 / 3674
ironclaw_skills 87.35% 4336 / 4964
ironclaw_hooks 87.84% 9916 / 11289
ironclaw_product_adapter_registry 87.96% 526 / 598
ironclaw_reborn_traces 88.23% 11707 / 13268
ironclaw_extensions 88.26% 2631 / 2981
ironclaw_reborn_composition 88.77% 69714 / 78535
ironclaw_host_runtime 88.95% 17523 / 19700
ironclaw_reborn 89.14% 15703 / 17616
ironclaw_conversations 90% 2924 / 3249
ironclaw_approvals 90.51% 1507 / 1665
ironclaw_event_streams 91.48% 1009 / 1103
ironclaw_loop_support 92.46% 14725 / 15926
ironclaw_resources 92.89% 4599 / 4951
ironclaw_attachments 93.06% 630 / 677
ironclaw_reborn_webui_ingress 93.19% 2217 / 2379
ironclaw_telegram_v2_adapter 94.01% 2447 / 2603
ironclaw_agent_loop 94.58% 8776 / 9279
ironclaw_safety 94.8% 3668 / 3869
ironclaw_first_party_extension_ports 95% 3094 / 3257
ironclaw_outbound 95.59% 3556 / 3720

This table itself is informational and never gates the PR on its own — not the percentage, not the per-crate holes, not the 0-coverage callout. A separate coverage ratchet (dry-run until enforce=true; see tests/integration/coverage-floor.toml) can fail the build on specific configured floors.

Exemptions (4 entry/entries excluded from the accounting above)
Module / Crate Reason Issue
crate: ironclaw_embeddings v1-only: consumed only by root ironclaw (src/app.rs, src/tools/builtin/memory.rs, src/workspace/mod.rs, src/config/{mod,embeddings}.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_gateway v1-only: consumed only by root ironclaw (src/channels/web/platform/static_files.rs, src/channels/web/handlers/frontend.rs); no crates/* dependents. Covered by "Tests (Legacy)". #5657
crate: ironclaw_oauth v1-only: consumed only by root ironclaw (src/auth/oauth.rs); no crates/* dependents. Crate's own doc comment confirms v1-only. Covered by "Tests (Legacy)". #5657
crate: ironclaw_tui v1-only: consumed only by root ironclaw (src/main.rs, src/channels/tui.rs); no crates/* dependents. Crate's own doc comment confirms it bridges INTO v1, not Reborn. Covered by "Tests (Legacy)". #5657

@italic-jinxin
italic-jinxin marked this pull request as ready for review July 7, 2026 11:27
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 7, 2026 11:27 Destroyed
@github-actions github-actions Bot added size: XL 500+ changed lines and removed size: M 50-199 changed lines labels Jul 7, 2026
@railway-app

railway-app Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the ironclaw-pr-5764 environment in ironclaw-ci-preview

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 8, 2026 at 3:43 pm

@ironloopai ironloopai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ IronLoop Review: reviewer

Verdict: ✅ Approved
Findings: 0 blocking / 0 notes
Next: No reviewer action needed.
Head: 59003fbec4e32a84e850546f16b1e162e46fc21a

Run details

Status: Current
Needs human: no
Needs validation: no

**Inline candidates:** 0

Summary

No concrete blocking issues found in the reviewed diff. The change adds durable message timestamps across in-memory/filesystem thread services and consumes them in WebUI history rendering with focused contract/unit coverage.

Findings

None.

Developer follow-up

After fixing this feedback:

  1. Push the fix to this PR branch.
  2. Re-run this reviewer with @ironloopai review --agent reviewer if you only changed this reviewer's findings.
  3. Re-run all reviewers with @ironloopai review when the fix may affect multiple areas.
  4. Use @ironloopai status to check queued/running/completed/stale/stalled state while reviewers run.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/ironclaw_threads/src/filesystem_service.rs (1)

1144-1173: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

touch_thread_updated_at should never write an older stamp. list_threads_for_scope orders by thread.updated_at, so unconditionally storing the caller-captured now can overwrite a later concurrent activity and demote a freshly-active thread. Guard with >=/max before the CAS write to keep the stamp advance-only and skip the no-op retry.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/ironclaw_threads/src/filesystem_service.rs` around lines 1144 - 1173,
The touch_thread_updated_at path is unconditionally persisting the caller’s
updated_at value, which can overwrite a newer timestamp from concurrent
activity. In touch_thread_updated_at, compare the current stored
record.updated_at against the incoming DateTime<Utc> and only write when the new
value is greater, otherwise keep the newer value or return early as a no-op.
Preserve the existing CAS retry flow around read_thread_versioned and
put_with_cas, but ensure thread_entry is built from the max/advance-only
timestamp so list_threads_for_scope ordering never regresses.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/ironclaw_threads/src/contract.rs`:
- Around line 234-269: The timestamp validators in
validate_new_message_timestamps and validate_message_timestamps_not_cleared
currently return SessionThreadError::Backend(String), which hides a specific
failure mode behind a generic string. Add a typed SessionThreadError variant for
timestamp validation failures (for example, with fields like context,
message_id, and a reason enum) and update both validators to return that variant
instead of formatting a Backend string. Then adjust any call sites/tests that
currently match Backend(_) so they assert on the new structured error kind
directly.

In `@crates/ironclaw_webui_v2/static/js/pages/chat/lib/history-messages.test.mjs`:
- Around line 177-231: Add a test in messagesFromTimeline that exercises the
highest-priority record.received_at timestamp path, since the current cases only
cover created_at and updated_at fallbacks. Use the existing messagesFromTimeline
test suite in history-messages.test.mjs and assert that when a timeline record
includes received_at, the resulting message.timestamp uses it over the other
timestamp fields. Keep the test aligned with the existing
user/assistant/tool_activity coverage so it clearly validates the received_at
precedence branch.

---

Outside diff comments:
In `@crates/ironclaw_threads/src/filesystem_service.rs`:
- Around line 1144-1173: The touch_thread_updated_at path is unconditionally
persisting the caller’s updated_at value, which can overwrite a newer timestamp
from concurrent activity. In touch_thread_updated_at, compare the current stored
record.updated_at against the incoming DateTime<Utc> and only write when the new
value is greater, otherwise keep the newer value or return early as a no-op.
Preserve the existing CAS retry flow around read_thread_versioned and
put_with_cas, but ensure thread_entry is built from the max/advance-only
timestamp so list_threads_for_scope ordering never regresses.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: bee24a9a-50ad-440c-84a2-58309367e42b

📥 Commits

Reviewing files that changed from the base of the PR and between a560b55 and 59003fb.

📒 Files selected for processing (12)
  • crates/ironclaw_loop_support/src/compaction_task.rs
  • crates/ironclaw_product_workflow/src/inbound_turn.rs
  • crates/ironclaw_product_workflow/tests/reborn_services_contract.rs
  • crates/ironclaw_reborn/src/loop_exit_applier/tests/mod.rs
  • crates/ironclaw_reborn_composition/src/observability/trace_capture.rs
  • crates/ironclaw_threads/src/contract.rs
  • crates/ironclaw_threads/src/filesystem_service.rs
  • crates/ironclaw_threads/src/in_memory.rs
  • crates/ironclaw_threads/tests/filesystem_session_thread_contract.rs
  • crates/ironclaw_threads/tests/session_thread_contract.rs
  • crates/ironclaw_webui_v2/static/js/pages/chat/lib/history-messages.js
  • crates/ironclaw_webui_v2/static/js/pages/chat/lib/history-messages.test.mjs

Comment thread crates/ironclaw_threads/src/contract.rs
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 7, 2026 12:06 Destroyed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/ironclaw_threads/src/error.rs`:
- Around line 8-22: The TimestampViolation error type is using a manual Display
implementation instead of the standard error derive used elsewhere in error.rs.
Update TimestampViolation to follow the same thiserror pattern as the other
error types in this module, removing the hand-rolled fmt::Display and deriving
the error trait with appropriate messages on each variant. Use the existing
TimestampViolation enum in error.rs as the location to make the consistency
change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9eece944-2a56-40d2-bf80-b20291e4a22f

📥 Commits

Reviewing files that changed from the base of the PR and between 59003fb and 4d516b7.

📒 Files selected for processing (3)
  • crates/ironclaw_threads/src/contract.rs
  • crates/ironclaw_threads/src/error.rs
  • crates/ironclaw_webui_v2/static/js/pages/chat/lib/history-messages.test.mjs

Comment thread crates/ironclaw_threads/src/error.rs Outdated
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 7, 2026 12:10 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 09:55 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 09:59 Destroyed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/integration/outbound_target.rs (1)

358-377: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Three identical copies of run_async_test_with_stack — hoist to shared test support.

This helper is now byte-for-byte identical across tests/reborn_qa_smoke_scenarios_e2e.rs, tests/integration/outbound_target.rs, and tests/integration/skill_activate.rs. The signature divergence flagged in the prior review was fixed, but the duplication itself remains. Per coding guidelines, extract helpers when logic is reused.

♻️ Hoist into a shared test-support module

Move the helper into a shared crate (e.g., ironclaw_test_support or a tests/common/ module) and import it from all three call sites:

-fn run_async_test_with_stack<F, Fut>(name: &'static str, test: F)
-where
-    F: FnOnce() -> Fut + Send + 'static,
-    Fut: std::future::Future<Output = ()> + 'static,
-{
-    let handle = std::thread::Builder::new()
-        .name(name.to_string())
-        .stack_size(16 * 1024 * 1024)
-        .spawn(move || {
-            tokio::runtime::Builder::new_current_thread()
-                .enable_all()
-                .build()
-                .expect("tokio test runtime")
-                .block_on(test());
-        })
-        .expect("spawn stack-sized test thread");
-    if let Err(panic) = handle.join() {
-        std::panic::resume_unwind(panic);
-    }
-}
+// Import from shared test support instead.
+use ironclaw_test_support::run_async_test_with_stack;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/integration/outbound_target.rs` around lines 358 - 377, The
run_async_test_with_stack helper is duplicated across multiple test files, so
move the shared implementation into a common test-support module and reuse it
from each call site. Keep the existing behavior in the helper, but reference the
shared function from tests/reborn_qa_smoke_scenarios_e2e.rs,
tests/integration/outbound_target.rs, and tests/integration/skill_activate.rs
instead of maintaining separate copies; use the run_async_test_with_stack symbol
as the single source of truth.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@tests/integration/outbound_target.rs`:
- Around line 358-377: The run_async_test_with_stack helper is duplicated across
multiple test files, so move the shared implementation into a common
test-support module and reuse it from each call site. Keep the existing behavior
in the helper, but reference the shared function from
tests/reborn_qa_smoke_scenarios_e2e.rs, tests/integration/outbound_target.rs,
and tests/integration/skill_activate.rs instead of maintaining separate copies;
use the run_async_test_with_stack symbol as the single source of truth.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ffe7f472-f713-4391-91a0-78cae19dee1b

📥 Commits

Reviewing files that changed from the base of the PR and between 7b83ef0 and b4c5a7a.

📒 Files selected for processing (2)
  • tests/integration/outbound_target.rs
  • tests/integration/skill_activate.rs

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 10:06 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 10:09 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 10:44 Destroyed
# Conflicts:
#	crates/ironclaw_reborn_composition/tests/trigger_poller_e2e.rs
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 11:02 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 11:44 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 11:50 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 12:32 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 12:47 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5764 July 8, 2026 15:33 Destroyed
@think-in-universe
think-in-universe added this pull request to the merge queue Jul 8, 2026
Merged via the queue into main with commit 8c97d98 Jul 8, 2026
62 checks passed
@think-in-universe
think-in-universe deleted the issue-3535-chat-timestamps branch July 8, 2026 16:36

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-5764 — 35631262 Deployed Jul 8, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs human-verified Manually tested and verified risk: low Changes to docs, tests, or low-risk modules size: XL 500+ changed lines skip-regression-check Bypass regression test CI gate (tests exist but not in tests/ dir)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QA] UI Timestamps are incorrect for conversations

3 participants