Skip to content

Use QA sheet prompts in Reborn live QA - #5406

Merged
serrrfirat merged 13 commits into
mainfrom
codex/reborn-qa-sheet-prompts
Jun 29, 2026
Merged

serrrfirat merged 13 commits into
mainfrom
codex/reborn-qa-sheet-prompts

Conversation

@serrrfirat

@serrrfirat serrrfirat commented Jun 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • hardcode the QA sheet user prompts in the Reborn WebUIv2 live QA runner
  • submit sheet-matching prompts for chat/connect/routine user-story cases instead of prescriptive harness instructions
  • remove the harness GitHub latest-release prefetch from QA 4C so the agent decides how to answer from the sheet prompt
  • keep fixture-only prompts for side-effect rows that have no user prompt in the sheet
  • keep Google Drive spreadsheet lookup guidance generic instead of leaking QA fixture names into product metadata

Known Product Gap Surfaced

  • QA 7C exposed that Reborn Slack currently has inbound Slack Events API/channel plumbing, but the model-visible automation creation path only persists scheduled triggers. It does not yet expose a first-class “when my Slack message starts with bug:, append a row to this Google Sheet” Slack-event trigger workflow. That case should not require an outbound Slack delivery target; Slack is the event source and Google Sheets is the side effect.

Verification

  • python3 -m pytest scripts/reborn_webui_v2_live_qa/test_run_live_qa.py scripts/live-canary/test_notify_slack.py -q
  • cargo test -p ironclaw_reborn_composition bundled_google_sheet_queries_discover_drive_lookup_tool
  • cargo fmt --check
  • git diff --check

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 10:55 Destroyed
@serrrfirat

Copy link
Copy Markdown
Collaborator Author

/canary all

@github-actions github-actions Bot added size: L 200-499 changed lines risk: low Changes to docs, tests, or low-risk modules labels Jun 29, 2026
@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Live QA now runs in sharded mode and uses sheet-sourced prompts for selected scenarios.
    • Slack QA coverage expanded to validate signed DM delivery and end-to-end acceptance.
  • Bug Fixes
    • Improved live-chat and extension-chat validation when reply markers aren’t required.
    • Routine creation checks now fail when expected trigger activity doesn’t occur.
    • Slack DM routing/targets and signed message grounding are enforced more strictly.
  • Documentation
    • Clarified Google Drive/Sheets tool descriptions and prompts for spreadsheet lookup by name/title.
    • Updated Live Canary Slack DM routing requirements.
  • Chores
    • Refined built-in memory search scope messaging to clearly reflect internal persistent memory only.

Walkthrough

Live QA now reads sheet prompts, allows optional marker checks, routes Slack DM acceptance through signed-event polling, shards live-canary execution, and updates Slack payload grouping. Drive/Sheets lookup text now centers name/title resolution, and memory search is limited to internal persistent memory.

Changes

Live QA harness and workflow routing

Layer / File(s) Summary
QA prompt registry
scripts/reborn_webui_v2_live_qa/run_live_qa.py
Adds QA_SHEET_PROMPTS and _qa_sheet_prompt(case_name) with shared QA constants.
Optional marker and trigger validation
scripts/reborn_webui_v2_live_qa/run_live_qa.py, scripts/reborn_webui_v2_live_qa/google_api_helpers.py
Makes marker handling optional in live chat and routine helpers, records prompts in probe details, adds trigger-count validation, and creates Google Sheets fixtures for the bug logger routine.
Live-canary shard routing
.github/workflows/live-canary.yml, scripts/live-canary/ACCOUNTS.md, scripts/reborn_webui_v2_live_qa/slack_helpers.py
Converts live-canary to shard-based execution, adds the route-user workflow variable and docs, and opens Slack DMs with configured users while reporting DM user metadata.
Harness test updates
scripts/reborn_webui_v2_live_qa/test_run_live_qa.py
Tightens prompt and capability assertions, adds trigger-record failure coverage, and adds Slack DM routing, endpoint-status, fixture, and shard coverage checks.

Reborn Slack payload formatting

Layer / File(s) Summary
Reborn QA block formatting
scripts/live-canary/notify_slack.py
Trims blocked failure text, formats per-case failure lines, splits Reborn QA groups into multiple Slack section blocks, and gates rich diagnostics and reason/tools/notable rendering when Reborn QA groups are present.
Reborn QA Slack payload tests
scripts/live-canary/test_notify_slack.py
Updates the Reborn QA Slack payload test to add a third case report, adjust lane counts, and assert the new failure text.

Google Drive and Sheets Discovery Metadata

Layer / File(s) Summary
Google Drive capability surface
crates/ironclaw_first_party_extensions/assets/google-drive/manifest.toml, crates/ironclaw_first_party_extensions/assets/google-drive/prompts/google-drive/list_files.md, crates/ironclaw_first_party_extensions/assets/google-drive/schemas/google-drive/list_files.input.v1.json, crates/ironclaw_first_party_extensions/assets/google-drive/wasm-src/src/lib.rs, tools-src/google-drive/google-drive-tool.capabilities.json, tools-src/google-drive/src/lib.rs
Expands Google Drive descriptions and examples to cover searching/listing files and folders, including Sheets/Docs/Slides by name or title.
Google Sheets capability surface
crates/ironclaw_first_party_extensions/assets/google-sheets/manifest.toml, crates/ironclaw_first_party_extensions/assets/google-sheets/prompts/google-sheets/*.md, tools-src/google-sheets/google-sheets-tool.capabilities.json, tools-src/google-sheets/src/lib.rs, crates/ironclaw_reborn_composition/src/available_extensions.rs
Expands Sheets descriptions and prompts to resolve spreadsheet IDs through Google Drive, and adds catalog-search coverage for spreadsheet lookup queries.

Memory Search Scope Boundary

Layer / File(s) Summary
Memory search scope boundary
crates/ironclaw_host_runtime/src/first_party_tools/memory.rs, crates/ironclaw_host_runtime/src/first_party_tools/schemas.rs, crates/ironclaw_host_runtime/tests/first_party_builtin_tools.rs
Adds internal scope metadata to memory_search, updates the schema description, and asserts the visible capability surface matches the internal-only boundary.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • nearai/ironclaw#4969: Changes live-QA text and forbidden-text expectations in the same area as the current prompt/marker rewiring.
  • nearai/ironclaw#5397: Modifies the same live-canary workflow lane and case-selection path.
  • nearai/ironclaw#5399: Also changes the live-canary workflow control flow for reborn-webui-v2-live-qa.

Suggested reviewers

  • think-in-universe
  • abbyshekit

Poem

A sheet sang out the prompt anew,
Slack DMs hopped, then drifted through.
Shards took their turns in tidy rows,
While memory kept the scope it knows.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and verification, but most required template sections are missing or not filled in. Fill in the required template sections: Change Type, Linked Issue, checkbox-style Validation, Security Impact, Trust-Boundary, Database Impact, Blast Radius, Rollback Plan, and Review Track.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: switching Reborn live QA to QA sheet prompts.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

@github-actions github-actions Bot added the contributor: core 20+ merged PRs label Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Started Reborn WebUI v2 live canary for 10dcf89800 with cases all: https://github.com/nearai/ironclaw/actions/runs/28366985244

@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 refactors the live QA script to centralize test prompts into a new QA_SHEET_PROMPTS dictionary, replacing various inline hardcoded strings. It also updates test cases to handle optional markers (marker: str | None) and adjusts database trigger checks. Feedback on the changes points out that the prompt for qa_3c_endpoint_status_slack_routine contains a literal [endpoint URL] placeholder that is not replaced with a real URL, which could cause the automated test to fail.

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.

Comment on lines 2557 to 2566
async def case_qa_3c_endpoint_status_slack_routine(ctx: LiveQaContext) -> ProbeResult:
marker = "REBORN_QA_3C_ENDPOINT_STATUS_ROUTINE_DONE"
routine_name = "reborn-qa-3c-endpoint-status-slack"
return await _routine_creation_case(
ctx,
case_name="qa_3c_endpoint_status_slack_routine",
routine_name=routine_name,
marker=marker,
marker=None,
required_text=["routine"],
prompt=(
f"QA case 3C: create a routine named {routine_name}. Every 5 minutes, "
"ping https://cloud-api.near.ai, check whether it returns HTTP 200, "
"and send the result in a Slack DM. Create the routine now; do not run "
"the check immediately. In the final answer include the exact marker "
f"{marker} and include the text routine."
),
prompt=_qa_sheet_prompt("qa_3c_endpoint_status_slack_routine"),
)

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.

high

The prompt retrieved from _qa_sheet_prompt("qa_3c_endpoint_status_slack_routine") contains the literal placeholder [endpoint URL]. Since this is not replaced with a real URL (such as https://cloud-api.near.ai), the agent will receive a prompt with [endpoint URL] and will likely fail to create a valid routine or ask for clarification, causing the automated test to fail or timeout. Please replace [endpoint URL] with a valid URL before passing the prompt to _routine_creation_case.

async def case_qa_3c_endpoint_status_slack_routine(ctx: LiveQaContext) -> ProbeResult:
    routine_name = "reborn-qa-3c-endpoint-status-slack"
    prompt = _qa_sheet_prompt("qa_3c_endpoint_status_slack_routine").replace(
        "[endpoint URL]", "https://cloud-api.near.ai"
    )
    return await _routine_creation_case(
        ctx,
        case_name="qa_3c_endpoint_status_slack_routine",
        routine_name=routine_name,
        marker=None,
        required_text=["routine"],
        prompt=prompt,
    )

@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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py`:
- Line 126: The qa_3c_endpoint_status_slack_routine prompt still contains an
unresolved “[endpoint URL]” placeholder, so the generated routine will have a
bogus ping target. Update the string in _qa_sheet_prompt / run_live_qa.py to use
a concrete endpoint value or an explicit template variable that is filled before
use, and make sure the routine creation path cannot pass the placeholder through
unchanged.
🪄 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: 43320b8c-d9e5-4c9d-b110-bbd88b0594db

📥 Commits

Reviewing files that changed from the base of the PR and between fbf3a2e and 10dcf89.

📒 Files selected for processing (2)
  • scripts/reborn_webui_v2_live_qa/run_live_qa.py
  • scripts/reborn_webui_v2_live_qa/test_run_live_qa.py

Comment thread scripts/reborn_webui_v2_live_qa/run_live_qa.py
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 11:12 Destroyed
@serrrfirat

Copy link
Copy Markdown
Collaborator Author

/canary all

@github-actions

Copy link
Copy Markdown
Contributor

Started Reborn WebUI v2 live canary for c1a02ea1a8 with cases all: https://github.com/nearai/ironclaw/actions/runs/28367873699

@railway-app

railway-app Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jun 29, 2026 at 7:46 pm

@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

Caution

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

⚠️ Outside diff range comments (3)
scripts/reborn_webui_v2_live_qa/run_live_qa.py (3)

1156-1164: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Assert the live status code, not just the word status.

Line 1157 computes live_status, but Line 1163 never requires it. A failure reply like “I can’t check the status” can pass.

Proposed fix
-        required_text=["status"],
+        required_text=["status", str(live_status)],
🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` around lines 1156 - 1164, The
live QA check in _live_chat_case is only asserting the presence of the word
“status” and not the actual live status code computed by _live_http_status.
Update the qa_3b_endpoint_status_live_chat call to require the
expected_status_code value (or equivalent exact status text) in required_text or
the assertion logic, so the response must match the live result rather than a
generic status mention.

2533-2549: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Do not validate markerless routines with an unscoped trigger count.

Line 2533 sets count_name=None when marker is absent, so Lines 2547-2549 can pass if any unrelated trigger record appears. Validate a record tied to this request instead: timestamp/session/user prompt/routine id, or keep a deterministic QA marker in the created routine.

🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` around lines 2533 - 2549, The
trigger-count check in the live QA flow is too broad when `marker` is absent
because `count_name` becomes None and `_trigger_record_count` can be satisfied
by unrelated records. Update the logic around `count_name`,
`_trigger_record_count`, and `_live_chat_case` so the post-run validation is
scoped to this specific request, using a deterministic routine marker or another
unique identifier such as routine id/session/prompt/timestamp. Ensure the
success condition compares the same request-bound record before and after,
rather than any global trigger record.

846-851: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Bind markerless waits to the newly submitted prompt.

Line 1005 makes marker=None accept any assistant text with required_text. After the markerless migrations, stale chat history can satisfy the probe before the new answer arrives. Capture the assistant-message count before Line 830 and only inspect messages added after submission.

Proposed fix
+        assistant_count_before = await page.locator("[data-testid='msg-assistant']").count()
         await composer.fill(prompt)
         await composer.press("Enter")
@@
         observed["text_excerpt"] = await _wait_for_assistant_reply(
             page,
             marker=marker,
             required_text=required_text,
             timeout=timeout,
+            assistant_count_before=assistant_count_before,
         )
@@
 async def _wait_for_assistant_reply(
     page: object,
     *,
     marker: str | None,
     required_text: list[str],
     timeout: float,
+    assistant_count_before: int = 0,
 ) -> str:
@@
-    assistant = page.locator("[data-testid='msg-assistant']").last  # type: ignore[attr-defined]
+    assistants = page.locator("[data-testid='msg-assistant']")  # type: ignore[attr-defined]
@@
-        if await assistant.count() > 0:
+        assistant_count = await assistants.count()
+        if assistant_count > assistant_count_before:
+            assistant = assistants.nth(assistant_count - 1)

Also applies to: 985-1007

🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` around lines 846 - 851, The
markerless wait in _wait_for_assistant_reply can match stale assistant text from
earlier chat history instead of the newly submitted prompt. Capture the
assistant-message count before the submission in the surrounding live QA flow,
then update _wait_for_assistant_reply so it only inspects assistant messages
added after that baseline when marker is None. Make the change in the wait/probe
logic used by observed["text_excerpt"] and the related markerless path so the
returned text is bound to the latest prompt.
🤖 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 `@scripts/reborn_webui_v2_live_qa/test_run_live_qa.py`:
- Around line 256-281: Tighten the test for
case_qa_3c_endpoint_status_slack_routine so it also verifies the markerless
contract, not just ENDPOINT_STATUS_URL substitution. Update the
_trigger_record_count stub and assertions to confirm the routine passes
marker=None into _live_chat_case, using the captured kwargs in
fake_live_chat_case to assert the marker field is absent or explicitly None.
This keeps the test anchored to case_qa_3c_endpoint_status_slack_routine,
_live_chat_case, and _trigger_record_count.

---

Outside diff comments:
In `@scripts/reborn_webui_v2_live_qa/run_live_qa.py`:
- Around line 1156-1164: The live QA check in _live_chat_case is only asserting
the presence of the word “status” and not the actual live status code computed
by _live_http_status. Update the qa_3b_endpoint_status_live_chat call to require
the expected_status_code value (or equivalent exact status text) in
required_text or the assertion logic, so the response must match the live result
rather than a generic status mention.
- Around line 2533-2549: The trigger-count check in the live QA flow is too
broad when `marker` is absent because `count_name` becomes None and
`_trigger_record_count` can be satisfied by unrelated records. Update the logic
around `count_name`, `_trigger_record_count`, and `_live_chat_case` so the
post-run validation is scoped to this specific request, using a deterministic
routine marker or another unique identifier such as routine
id/session/prompt/timestamp. Ensure the success condition compares the same
request-bound record before and after, rather than any global trigger record.
- Around line 846-851: The markerless wait in _wait_for_assistant_reply can
match stale assistant text from earlier chat history instead of the newly
submitted prompt. Capture the assistant-message count before the submission in
the surrounding live QA flow, then update _wait_for_assistant_reply so it only
inspects assistant messages added after that baseline when marker is None. Make
the change in the wait/probe logic used by observed["text_excerpt"] and the
related markerless path so the returned text is bound to the latest prompt.
🪄 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: 786fdae1-b093-43c7-89cd-3ec6f6305456

📥 Commits

Reviewing files that changed from the base of the PR and between 10dcf89 and c1a02ea.

📒 Files selected for processing (2)
  • scripts/reborn_webui_v2_live_qa/run_live_qa.py
  • scripts/reborn_webui_v2_live_qa/test_run_live_qa.py

Comment thread scripts/reborn_webui_v2_live_qa/test_run_live_qa.py
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 12:10 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

Caution

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

⚠️ Outside diff range comments (1)
scripts/live-canary/test_notify_slack.py (1)

336-360: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a regression for the multi-block QA path.

This test still only proves the single-section case. The new split logic in scripts/live-canary/notify_slack.py can break overflow rendering without failing CI. Please force one QA group past the Slack limit and assert that every emitted section still carries the same group label and all failure lines survive.

🤖 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 `@scripts/live-canary/test_notify_slack.py` around lines 336 - 360, The Slack
notification test only covers a single QA block, so it misses regressions in
overflow splitting. Extend the existing assertions in test_notify_slack.py
around the QA 2 section to force one QA group past the Slack limit and verify
the split output from notify_slack.py still repeats the same group label in
every emitted section. Also assert all expected failure lines remain present
across the split sections, using the existing qa_sections/qa_text checks as the
anchor.
🤖 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 `@scripts/live-canary/notify_slack.py`:
- Around line 643-667: The Slack section chunking logic in notify_slack.py drops
the QA group header on overflow blocks, making continuation sections ambiguous.
Update the block-building flow in the loop that appends to blocks so each new
section created after a split includes the same `QA {group}` label/header before
the continuation content. Keep the fix localized to the chunking code that uses
`current`, `candidate`, and `_trim_slack_block_text`, and ensure the repeated
header is preserved whenever a long group spans multiple Slack sections.

---

Outside diff comments:
In `@scripts/live-canary/test_notify_slack.py`:
- Around line 336-360: The Slack notification test only covers a single QA
block, so it misses regressions in overflow splitting. Extend the existing
assertions in test_notify_slack.py around the QA 2 section to force one QA group
past the Slack limit and verify the split output from notify_slack.py still
repeats the same group label in every emitted section. Also assert all expected
failure lines remain present across the split sections, using the existing
qa_sections/qa_text checks as the anchor.
🪄 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: df58f72d-1908-4aaa-8e25-a45ed08a6189

📥 Commits

Reviewing files that changed from the base of the PR and between c1a02ea and 1c3fb1f.

📒 Files selected for processing (2)
  • scripts/live-canary/notify_slack.py
  • scripts/live-canary/test_notify_slack.py

Comment thread scripts/live-canary/notify_slack.py
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 12:28 Destroyed
@github-actions github-actions Bot added scope: ci CI/CD workflows scope: docs Documentation size: XL 500+ changed lines risk: medium Business logic, config, or moderate-risk modules and removed size: L 200-499 changed lines risk: low Changes to docs, tests, or low-risk modules labels Jun 29, 2026

@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

♻️ Duplicate comments (1)
scripts/reborn_webui_v2_live_qa/run_live_qa.py (1)

126-126: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not pass the endpoint placeholder into the routine prompt.

_qa_sheet_prompt("qa_3c_endpoint_status_slack_routine") still returns [endpoint URL] verbatim, so the routine can be created with a bogus ping target instead of ENDPOINT_STATUS_URL or a filled template value.

🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` at line 126, The
qa_3c_endpoint_status_slack_routine prompt still contains the literal endpoint
placeholder, so it can produce a bogus ping target. Update the prompt source in
run_live_qa.py and the _qa_sheet_prompt("qa_3c_endpoint_status_slack_routine")
flow so it uses ENDPOINT_STATUS_URL or a substituted runtime value instead of
passing "[endpoint URL]" through verbatim. Verify the routine text is fully
templated before the Slack DM instruction is generated.
🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py`:
- Around line 3003-3005: The Slack payload built in run_live_qa.py is using the
QA sheet prompt instead of a real bug report, which weakens the trigger canary.
Update the logic around the slack_user_id/text/event_id setup so the observed
field can still keep _qa_sheet_prompt(case_name), but the actual text sent to
Slack is a deterministic concrete bug fixture like “bug: reborn QA bug logger
smoke {suffix}”. Keep the change localized to the live QA event construction so
the sent message no longer mirrors the operator instruction.
- Around line 3214-3231: The custom prompt flow in run_live_qa.py is reusing
stale capability history by accepting any prior "completed" status for the
capability IDs. Update the loop around _approve_visible_tool_gate and
_capability_run_statuses so it only accepts capability evidence generated after
this prompt has been submitted and the assistant has replied in the current
chat, rather than trusting pre-existing completed entries. Use the existing
capability_ids, observed, and ctx.reborn_home helpers to scope the status check
to the current run before returning success.

---

Duplicate comments:
In `@scripts/reborn_webui_v2_live_qa/run_live_qa.py`:
- Line 126: The qa_3c_endpoint_status_slack_routine prompt still contains the
literal endpoint placeholder, so it can produce a bogus ping target. Update the
prompt source in run_live_qa.py and the
_qa_sheet_prompt("qa_3c_endpoint_status_slack_routine") flow so it uses
ENDPOINT_STATUS_URL or a substituted runtime value instead of passing "[endpoint
URL]" through verbatim. Verify the routine text is fully templated before the
Slack DM instruction is generated.
🪄 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: 099f412f-c816-40f5-9ce3-294ef93618b5

📥 Commits

Reviewing files that changed from the base of the PR and between 1c3fb1f and 3e4748c.

📒 Files selected for processing (5)
  • .github/workflows/live-canary.yml
  • scripts/live-canary/ACCOUNTS.md
  • scripts/reborn_webui_v2_live_qa/run_live_qa.py
  • scripts/reborn_webui_v2_live_qa/slack_helpers.py
  • scripts/reborn_webui_v2_live_qa/test_run_live_qa.py

Comment thread scripts/reborn_webui_v2_live_qa/run_live_qa.py
Comment thread scripts/reborn_webui_v2_live_qa/run_live_qa.py Outdated
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 12:57 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 (2)
scripts/reborn_webui_v2_live_qa/run_live_qa.py (2)

2596-2603: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Don't send the clarification turn solely on missing trigger growth.

This retry fires whenever the count has not increased yet, even if the first assistant reply already completed the request and the trigger write is just lagging. In live QA that can send an extra instruction into a successful conversation and create or mutate the routine twice.

🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` around lines 2596 - 2603, The
retry logic in _live_chat_case is too eager: it sends clarification whenever
after_count does not exceed before_count, even if the first assistant response
already satisfied the request. Update the condition around clarification_reply
so it only retries when the conversation actually needs it, not just because
trigger growth is missing or delayed; keep the check localized to the live QA
flow where after_count, before_count, and clarification_reply are evaluated.

2580-2581: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Keep trigger counting scoped to routine_name for markerless routines.

When marker is None, count_name becomes None, so both the success gate and the clarification retry use the global trigger count. Any unrelated trigger write in this case home can make the routine look created, or suppress the follow-up, even when routine_name itself never produced a record.

Proposed fix
-    count_name = routine_name if marker else None
+    count_name = routine_name
🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` around lines 2580 - 2581, The
trigger counting in the routine creation flow is too broad for markerless
routines because `count_name` becomes `None`, causing `_trigger_record_count`
and the success/clarification checks to use the global count instead of the
specific routine. Update the logic around `routine_name`, `marker`,
`count_name`, and `_trigger_record_count` so markerless routines still count
only records tied to `routine_name`, and keep the success gate plus
clarification retry scoped to that routine rather than any unrelated trigger
writes.
🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py`:
- Around line 2596-2603: The retry logic in _live_chat_case is too eager: it
sends clarification whenever after_count does not exceed before_count, even if
the first assistant response already satisfied the request. Update the condition
around clarification_reply so it only retries when the conversation actually
needs it, not just because trigger growth is missing or delayed; keep the check
localized to the live QA flow where after_count, before_count, and
clarification_reply are evaluated.
- Around line 2580-2581: The trigger counting in the routine creation flow is
too broad for markerless routines because `count_name` becomes `None`, causing
`_trigger_record_count` and the success/clarification checks to use the global
count instead of the specific routine. Update the logic around `routine_name`,
`marker`, `count_name`, and `_trigger_record_count` so markerless routines still
count only records tied to `routine_name`, and keep the success gate plus
clarification retry scoped to that routine rather than any unrelated trigger
writes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c355298c-b6bf-455e-bd4a-20e3035e869d

📥 Commits

Reviewing files that changed from the base of the PR and between 3e4748c and 8eb3f62.

📒 Files selected for processing (4)
  • scripts/live-canary/ACCOUNTS.md
  • scripts/reborn_webui_v2_live_qa/run_live_qa.py
  • scripts/reborn_webui_v2_live_qa/slack_helpers.py
  • scripts/reborn_webui_v2_live_qa/test_run_live_qa.py

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 13:12 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 14:41 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: 2

🤖 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 @.github/workflows/live-canary.yml:
- Around line 586-589: The live-canary workflow is checking out and later
executing code from inputs.target_ref, which can let PR-controlled code run with
live secrets. Update the checkout in the live-secret path to use only a trusted
ref, and ensure the secret-bearing steps around the harness execution do not
consume code from the untrusted target ref. If target code must still be tested,
split it into a separate no-secret checkout or path before the privileged steps
that run after secrets are materialized.
- Around line 573-577: The shard-skip branch in the live-canary workflow
currently treats an empty `selected` set as a harmless skip, which lets invalid
`inputs.cases` values pass green across all matrix shards. Add a pre-matrix or
global validation step in the workflow to compare the requested case names
against the full union of known shard cases before the shard-selection logic
runs, and fail the job when any requested name is unknown. Keep the existing
shard skip path only for valid requests that simply do not belong to the current
shard, and use the `selected`/`skip_shard` flow to distinguish that case from
invalid input.
🪄 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: aa869006-e69a-4474-a61a-e3e9b9a98629

📥 Commits

Reviewing files that changed from the base of the PR and between 677a90f and 1931944.

📒 Files selected for processing (2)
  • .github/workflows/live-canary.yml
  • scripts/reborn_webui_v2_live_qa/test_run_live_qa.py

Comment thread .github/workflows/live-canary.yml
Comment thread .github/workflows/live-canary.yml Outdated
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 16:07 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 `@scripts/reborn_webui_v2_live_qa/test_run_live_qa.py`:
- Around line 306-318: Tighten the test doubles to match the real helper
contracts instead of accepting arbitrary kwargs. Update the fake helpers used in
fake_live_chat_with_extensions_case and the related routine creation cases so
they explicitly assert the expected arguments, including access_token forwarding
from case_qa_7c_slack_bug_logger_routine and marker=None plus required_text in
_routine_creation_case. This should make the tests fail if those required
parameters stop being passed, rather than silently swallowing regressions
through **kwargs.
🪄 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: f98f45d8-61f0-4197-a2df-b0ac617ac840

📥 Commits

Reviewing files that changed from the base of the PR and between 1931944 and a0b5d7b.

📒 Files selected for processing (3)
  • scripts/reborn_webui_v2_live_qa/google_api_helpers.py
  • scripts/reborn_webui_v2_live_qa/run_live_qa.py
  • scripts/reborn_webui_v2_live_qa/test_run_live_qa.py

Comment thread scripts/reborn_webui_v2_live_qa/test_run_live_qa.py Outdated
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 17:05 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 18:18 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: 3

Caution

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

⚠️ Outside diff range comments (1)
scripts/live-canary/notify_slack.py (1)

697-729: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Gate the fallback text on appended QA blocks, not reborn_qa_cases.

renders_reborn_qa_groups = bool(r.reborn_qa_cases) suppresses the lane-level failure/reason/tools/notable text before you know whether any grouped QA blocks will fit under SLACK_MAX_BLOCKS. If the remaining capacity is 0, this lane renders only the summary header and drops all failure context. Base the guard on the sliced _format_reborn_qa_groups(...) result you actually append.

Possible fix
-        renders_reborn_qa_groups = bool(r.reborn_qa_cases)
+        qa_group_blocks = _format_reborn_qa_groups(r.reborn_qa_cases) if r.reborn_qa_cases else []
+        remaining_qa_group_blocks = max(0, SLACK_MAX_BLOCKS - (len(blocks) + 1))
+        rendered_qa_group_blocks = qa_group_blocks[:remaining_qa_group_blocks]
+        renders_reborn_qa_groups = bool(rendered_qa_group_blocks)
@@
-        if renders_reborn_qa_groups:
-            ...
+        if renders_reborn_qa_groups:
+            blocks.extend(rendered_qa_group_blocks)
🤖 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 `@scripts/live-canary/notify_slack.py` around lines 697 - 729, The lane summary
in the Slack formatter is suppressing failure/reason/tools/notable text based on
reborn_qa_cases instead of what actually gets appended, which can drop context
when grouped QA blocks do not fit. Update the logic in the Slack block builder
around the header_line/lines assembly to base the fallback-text guard on the
sliced _format_reborn_qa_groups(...) result you append, and only suppress the
lane-level details when those QA blocks are truly rendered.
🤖 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 @.github/workflows/live-canary.yml:
- Around line 551-558: ALL_SHARD_CASES is manually duplicated and can drift from
the matrix definition, so update the live-canary workflow to derive this value
from the same shard case source used by the matrix instead of hardcoding a
second list. Adjust the workflow logic around ALL_SHARD_CASES so it is generated
or validated from the matrix cases, keeping the shard names in sync
automatically.

In `@scripts/reborn_webui_v2_live_qa/test_run_live_qa.py`:
- Around line 534-535: The test stub in fake_capability_run_statuses should
verify the capability IDs it receives instead of ignoring them, so the case
stays pinned to QA_7A_CHAT_CONNECT_CAPABILITY_IDS. Update the stub to assert the
_capability_ids argument matches the expected set used by
case_qa_7a_slack_product_channel_connect(), while keeping the existing
status_sequence behavior for polling.
- Around line 624-633: The ordering evidence in captured_routine is using
mutable references for extensions and extra_details, so later mutations can
invalidate the test without failing. Update the snapshot logic in
test_run_live_qa.py around captured_routine to deep-copy those values before
storing them, and add the stdlib copy import near the other imports. Keep the
fix localized to the captured_routine update and the related assertions that
rely on it.

---

Outside diff comments:
In `@scripts/live-canary/notify_slack.py`:
- Around line 697-729: The lane summary in the Slack formatter is suppressing
failure/reason/tools/notable text based on reborn_qa_cases instead of what
actually gets appended, which can drop context when grouped QA blocks do not
fit. Update the logic in the Slack block builder around the header_line/lines
assembly to base the fallback-text guard on the sliced
_format_reborn_qa_groups(...) result you append, and only suppress the
lane-level details when those QA blocks are truly rendered.
🪄 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: a513be1b-9f09-4bfc-9766-180a3e1cff23

📥 Commits

Reviewing files that changed from the base of the PR and between ae1cae2 and c8856bb.

📒 Files selected for processing (5)
  • .github/workflows/live-canary.yml
  • scripts/live-canary/notify_slack.py
  • scripts/live-canary/test_notify_slack.py
  • scripts/reborn_webui_v2_live_qa/run_live_qa.py
  • scripts/reborn_webui_v2_live_qa/test_run_live_qa.py

Comment on lines +551 to +558
ALL_SHARD_CASES: >-
qa_2a_gmail_connect,qa_2b_calendar_connect,qa_2c_drive_connect,qa_2d_calendar_prep_live_chat,qa_2e_calendar_prep_email_routine,qa_2f_calendar_prep_email_delivery,
qa_3a_slack_connect,qa_3b_endpoint_status_live_chat,qa_3c_endpoint_status_slack_routine,qa_3d_endpoint_status_slack_delivery,
qa_4a_gmail_connect,qa_4b_github_connect,qa_4c_github_release_live_chat,qa_4d_github_release_slack_routine,qa_4e_github_release_email_delivery,
qa_5a_slack_connect,qa_5b_drive_connect,qa_5c_strategy_doc_knowledge_base,qa_5d_slack_strategy_doc_answer,
qa_6a_gmail_connect,qa_6b_sheets_connect,qa_6c_gmail_to_sheet_live_chat,qa_6d_gmail_to_sheet_routine,qa_6e_gmail_to_sheet_delivery,
qa_7a_slack_product_channel_connect,qa_7b_sheets_connect,qa_7c_slack_bug_logger_routine,qa_7d_slack_bug_message_trigger,qa_7e_slack_bug_sheet_delivery,
qa_8a_slack_connect,qa_8b_hn_keyword_live_chat,qa_8c_hn_keyword_slack_routine,qa_8d_hn_keyword_slack_delivery

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Confirm matrix.cases union == ALL_SHARD_CASES (order-independent set compare)
f=.github/workflows/live-canary.yml
python3 - "$f" <<'PY'
import sys,re,yaml
doc=yaml.safe_load(open(sys.argv[1]))
job=doc['jobs']['reborn-webui-v2-live-qa']
matrix=set()
for inc in job['strategy']['matrix']['include']:
    matrix |= {c.strip() for c in inc['cases'].split(',') if c.strip()}
allc=set()
for step in job['steps']:
    env=step.get('env',{})
    if 'ALL_SHARD_CASES' in env:
        allc={c.strip() for c in env['ALL_SHARD_CASES'].split(',') if c.strip()}
print("only in matrix:", sorted(matrix-allc))
print("only in ALL_SHARD_CASES:", sorted(allc-matrix))
print("in sync:", matrix==allc)
PY

Repository: nearai/ironclaw

Length of output: 214


Derive ALL_SHARD_CASES from the matrix cases instead of hand-maintaining a second copy. Drift here can reject valid QA shards or admit invalid ones; a small sync guard or generated list removes that risk.

🤖 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 @.github/workflows/live-canary.yml around lines 551 - 558, ALL_SHARD_CASES is
manually duplicated and can drift from the matrix definition, so update the
live-canary workflow to derive this value from the same shard case source used
by the matrix instead of hardcoding a second list. Adjust the workflow logic
around ALL_SHARD_CASES so it is generated or validated from the matrix cases,
keeping the shard names in sync automatically.

Source: Path instructions

Comment on lines +534 to +535
def fake_capability_run_statuses(_reborn_home, _capability_ids):
return status_sequence.pop(0) if status_sequence else fresh

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Assert the queried capability IDs in the stub.

Lines 534-535 ignore _capability_ids, so this test still passes if case_qa_7a_slack_product_channel_connect() starts polling the wrong capability set. That weakens the exact QA_7A_CHAT_CONNECT_CAPABILITY_IDS contract this case is supposed to pin.

Suggested fix
-        def fake_capability_run_statuses(_reborn_home, _capability_ids):
+        def fake_capability_run_statuses(_reborn_home, queried_capability_ids):
+            self.assertEqual(queried_capability_ids, capability_ids)
             return status_sequence.pop(0) if status_sequence else fresh
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
def fake_capability_run_statuses(_reborn_home, _capability_ids):
return status_sequence.pop(0) if status_sequence else fresh
def fake_capability_run_statuses(_reborn_home, queried_capability_ids):
self.assertEqual(queried_capability_ids, capability_ids)
return status_sequence.pop(0) if status_sequence else fresh
🧰 Tools
🪛 Ruff (0.15.20)

[warning] 534-534: Missing return type annotation for private function fake_capability_run_statuses

(ANN202)

🤖 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 `@scripts/reborn_webui_v2_live_qa/test_run_live_qa.py` around lines 534 - 535,
The test stub in fake_capability_run_statuses should verify the capability IDs
it receives instead of ignoring them, so the case stays pinned to
QA_7A_CHAT_CONNECT_CAPABILITY_IDS. Update the stub to assert the _capability_ids
argument matches the expected set used by
case_qa_7a_slack_product_channel_connect(), while keeping the existing
status_sequence behavior for polling.

Comment on lines +624 to +633
captured_routine.update(
{
"case_name": case_name,
"prompt": prompt,
"marker": marker,
"routine_name": routine_name,
"required_text": required_text,
"extensions": extensions,
"extra_details": extra_details,
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Snapshot mutable args before using them as ordering evidence.

Lines 624-633 store extensions and extra_details by reference. If case_qa_7c_slack_bug_logger_routine() mutates either after awaiting _routine_creation_case(), the assertions at Lines 688-691 still pass, so this test no longer proves the sheet fixture existed before the routine call.

Suggested fix
-            captured_routine.update(
-                {
-                    "case_name": case_name,
-                    "prompt": prompt,
-                    "marker": marker,
-                    "routine_name": routine_name,
-                    "required_text": required_text,
-                    "extensions": extensions,
-                    "extra_details": extra_details,
-                }
-            )
+            captured_routine.update(
+                copy.deepcopy(
+                    {
+                        "case_name": case_name,
+                        "prompt": prompt,
+                        "marker": marker,
+                        "routine_name": routine_name,
+                        "required_text": required_text,
+                        "extensions": extensions,
+                        "extra_details": extra_details,
+                    }
+                )
+            )

Also add import copy with the stdlib imports.

🤖 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 `@scripts/reborn_webui_v2_live_qa/test_run_live_qa.py` around lines 624 - 633,
The ordering evidence in captured_routine is using mutable references for
extensions and extra_details, so later mutations can invalidate the test without
failing. Update the snapshot logic in test_run_live_qa.py around
captured_routine to deep-copy those values before storing them, and add the
stdlib copy import near the other imports. Keep the fix localized to the
captured_routine update and the related assertions that rely on it.

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 19:05 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_host_runtime/src/first_party_tools/schemas.rs`:
- Around line 49-53: Update the `builtin.memory_search` schema in `schemas.rs`
so its `description` and `properties.query.description` match the current-scope
contract from `memory.rs` and do not imply a broader “internal persistent
memory” surface. Use the same tenant/user/agent/project/mission/thread scope
wording already advertised by the runtime, and add or adjust the relevant
surface test to pin this exact schema text so the model-facing contract stays
consistent.
🪄 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: 97b19587-14a0-41c0-9026-6cc81013ef59

📥 Commits

Reviewing files that changed from the base of the PR and between c8856bb and 3145687.

📒 Files selected for processing (3)
  • crates/ironclaw_host_runtime/src/first_party_tools/memory.rs
  • crates/ironclaw_host_runtime/src/first_party_tools/schemas.rs
  • crates/ironclaw_host_runtime/tests/first_party_builtin_tools.rs

Comment on lines +49 to +53
"description": "Searches only Reborn internal persistent memory. This does not search connected app or extension data.",
"properties": {
"query": {
"type": "string",
"description": "Preferred natural language search query for persistent memory"
"description": "Preferred natural language search query for Reborn internal persistent memory"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Schema wording drops the caller-scope boundary.

crates/ironclaw_host_runtime/src/first_party_tools/memory.rs still advertises builtin.memory_search as limited to the current tenant/user/agent/project scope, but this schema now only says “Reborn internal persistent memory.” That weakens the model-facing contract across layers and can imply a broader search surface than the runtime actually exposes. Mirror the current-scope wording in both the schema description and properties.query.description, then pin it in the surface test. As per path instructions, "Preserve tenant/user/agent/project/mission/thread scope on authority, state, memory, process, network, outbound, resource, and event records."

Suggested patch
-            "description": "Searches only Reborn internal persistent memory. This does not search connected app or extension data.",
+            "description": "Searches only Reborn internal persistent memory in the current tenant/user/agent/project scope. This does not search connected app or extension data.",
             "properties": {
                 "query": {
                     "type": "string",
-                    "description": "Preferred natural language search query for Reborn internal persistent memory"
+                    "description": "Preferred natural language search query for Reborn internal persistent memory in the current tenant/user/agent/project scope"
                 },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"description": "Searches only Reborn internal persistent memory. This does not search connected app or extension data.",
"properties": {
"query": {
"type": "string",
"description": "Preferred natural language search query for persistent memory"
"description": "Preferred natural language search query for Reborn internal persistent memory"
"description": "Searches only Reborn internal persistent memory in the current tenant/user/agent/project scope. This does not search connected app or extension data.",
"properties": {
"query": {
"type": "string",
"description": "Preferred natural language search query for Reborn internal persistent memory in the current tenant/user/agent/project scope"
🤖 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_host_runtime/src/first_party_tools/schemas.rs` around lines
49 - 53, Update the `builtin.memory_search` schema in `schemas.rs` so its
`description` and `properties.query.description` match the current-scope
contract from `memory.rs` and do not imply a broader “internal persistent
memory” surface. Use the same tenant/user/agent/project/mission/thread scope
wording already advertised by the runtime, and add or adjust the relevant
surface test to pin this exact schema text so the model-facing contract stays
consistent.

Source: Path instructions

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 19:28 Destroyed
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5406 June 29, 2026 19:45 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 (3)
scripts/reborn_webui_v2_live_qa/run_live_qa.py (3)

3291-3298: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Don’t pin HN success to the raw hostname.

The QA sheet only requires reporting matching Hacker News posts. Requiring news.ycombinator.com rejects valid replies that say “Hacker News” or summarize titles without the literal host string, so this adds avoidable false negatives to the canary.

🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` around lines 3291 - 3298, The
`case_qa_8b_hn_keyword_live_chat` check is too strict by requiring the raw
hostname `news.ycombinator.com`, which causes false negatives for otherwise
valid Hacker News responses. Update the `required_text` in `_live_chat_case` for
this case to accept the QA sheet’s intended HN wording (for example, “Hacker
News” or equivalent post summaries) instead of pinning validation to the literal
host string. Keep the change localized to `case_qa_8b_hn_keyword_live_chat` so
the canary still verifies the right content without overfitting to a URL.

112-174: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Stop sending Expected result: text to the agent.

_qa_sheet_prompt() returns the full QA row, and every mapped value here includes an Expected result: line. The live chat/routine helpers submit that verbatim, so the oracle is now in the prompt body and cases can pass by echoing the expected text instead of actually doing the work.

Patch sketch
 def _qa_sheet_prompt(case_name: str) -> str:
     try:
-        return QA_SHEET_PROMPTS[case_name]
+        entry = QA_SHEET_PROMPTS[case_name]
     except KeyError as exc:
         raise AssertionError(f"QA sheet prompt is not hardcoded for {case_name}") from exc
+    return entry.split("\nExpected result:", 1)[0].strip()
🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` around lines 112 - 174, The
QA prompt mapping in QA_SHEET_PROMPTS is leaking oracle text into the agent
input because _qa_sheet_prompt() returns rows that include the “Expected
result:” line. Update the prompt construction used by the live chat/routine
helpers so they only send the task instructions and strip or exclude the
expected-outcome text; keep QA_SHEET_PROMPTS focused on the action text, and
make sure _qa_sheet_prompt() no longer returns the expected-result portion for
any case_name.

3159-3165: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Treat “Routine/trigger created” as an OR, not an AND.

required_text=["trigger", "bug"] can fail a valid success like “I created the routine to log bug messages,” even after _trigger_record_count proves the trigger was created. Keep the DB check as the creation proof and loosen the reply matcher here.

🤖 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py` around lines 3159 - 3165, The
success check in qa_7c_slack_bug_logger_routine is too strict because it
requires both “trigger” and “bug” in the reply, which can reject valid
confirmations even when _trigger_record_count already proves creation. Update
_routine_creation_case usage here to loosen the required_text matcher so the
response can pass with either routine/trigger creation wording or bug logging
wording, while keeping the database count check as the 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 `@scripts/reborn_webui_v2_live_qa/run_live_qa.py`:
- Around line 3291-3298: The `case_qa_8b_hn_keyword_live_chat` check is too
strict by requiring the raw hostname `news.ycombinator.com`, which causes false
negatives for otherwise valid Hacker News responses. Update the `required_text`
in `_live_chat_case` for this case to accept the QA sheet’s intended HN wording
(for example, “Hacker News” or equivalent post summaries) instead of pinning
validation to the literal host string. Keep the change localized to
`case_qa_8b_hn_keyword_live_chat` so the canary still verifies the right content
without overfitting to a URL.
- Around line 112-174: The QA prompt mapping in QA_SHEET_PROMPTS is leaking
oracle text into the agent input because _qa_sheet_prompt() returns rows that
include the “Expected result:” line. Update the prompt construction used by the
live chat/routine helpers so they only send the task instructions and strip or
exclude the expected-outcome text; keep QA_SHEET_PROMPTS focused on the action
text, and make sure _qa_sheet_prompt() no longer returns the expected-result
portion for any case_name.
- Around line 3159-3165: The success check in qa_7c_slack_bug_logger_routine is
too strict because it requires both “trigger” and “bug” in the reply, which can
reject valid confirmations even when _trigger_record_count already proves
creation. Update _routine_creation_case usage here to loosen the required_text
matcher so the response can pass with either routine/trigger creation wording or
bug logging wording, while keeping the database count check as the source of
truth.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a45368b3-47b9-4cb7-9ee9-ac119fa1bc43

📥 Commits

Reviewing files that changed from the base of the PR and between 44ee63a and 43082cd.

📒 Files selected for processing (2)
  • scripts/reborn_webui_v2_live_qa/run_live_qa.py
  • scripts/reborn_webui_v2_live_qa/test_run_live_qa.py

@serrrfirat
serrrfirat merged commit d65475f into main Jun 29, 2026
141 of 148 checks passed
@serrrfirat
serrrfirat deleted the codex/reborn-qa-sheet-prompts branch June 29, 2026 20:10

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-5406 — 43082cd3 Deployed Jun 29, 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 risk: medium Business logic, config, or moderate-risk modules scope: ci CI/CD workflows scope: docs Documentation size: XL 500+ changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant