Skip to content

test(reborn): add extension_activate int-tier scenario (T0-EXTACT) - #5433

Merged
henrypark133 merged 4 commits into
mainfrom
reborn-cov-T0-EXTACT
Jul 1, 2026
Merged

henrypark133 merged 4 commits into
mainfrom
reborn-cov-T0-EXTACT

Conversation

@henrypark133

Copy link
Copy Markdown
Collaborator

What

Closes the T0-EXTACT coverage gap from the reborn backend coverage roadmap: reborn_group_extensions covered extension_search/install/remove at the integration tier cross-thread, but extension_activate had no int-tier coverage. The tools were already wired in the extension_lifecycle() group harness; this PR is pure authoring.

Scenario added

tests/reborn_group_extensions/scenario_activate_then_active_cross_thread.rs (registered as Scenario 3 in main.rs), mirroring the two existing cross-thread lifecycle scenarios:

  • Thread A installs the web-access bundled extension → asserts "installed":true.
  • Thread B (different conversation, same Arc-shared HostRuntimeCapabilityHarness) activates it → asserts "activated":true and that the activate payload's visible_capability_ids publishes web-access.search (the capability surface coming online).
  • Thread C (third conversation) searches web-access → asserts "installation_phase":"active", proving the activation persisted cross-thread.

Guards: a discriminating guard (absence of installation_phase:"installed") catches a no-op activation, and a non-vacuity guard requires the web-access catalog entry to appear so the active-phase assertion is meaningful.

Why web-access

It is the only bundled extension that activates without raising a credential auth gate (confirmed by local_dev_extension_activate_returns_auth_gate_for_missing_extension_credentials), so activation reaches a SUCCESS result rather than blocking on credentials. It is also untouched by the existing github/notion scenarios, so the install→activate cycle is a genuine fresh transition over the shared store.

Mutation proof

Forcing commit_activation (extension_lifecycle.rs) to persist ExtensionActivationState::Installed instead of Enabled (activation no-op) turns only this scenario RED with:

activate_then_active_cross_thread: no recorded capability result containing
"\"installation_phase\":\"active\""; saw results for ["builtin.extension_search"]

The sibling install/remove scenarios stay green. Reverted before commit.

Verification

  • cargo clippy --all --tests --all-features -- -D warnings — clean
  • reborn_group_extensions green: 3/3 under --features libsql, 5/5 under --all-features
  • One intermittent failure observed matched the known pre-existing harness flake (panic at tests/support/reborn/group.rs:498, driver_protocol_violation, surfaced by T0-CI) — NOT this scenario's assertion (which produces the distinct installation_phase:"active" message seen during mutation testing). group.rs was not touched.

Notes / deferred

  • Post-impl review (thermo-nuclear + code-review lenses, Sonnet) returned only LOW findings; applied module-order + escaping consistency + doc trim. Kept the web-access.search capability-surface assertion because the task explicitly requires asserting "its capability surfaces"; its comment notes it is a distinct (publication) invariant from cross-thread persistence.

🤖 Generated with Claude Code

@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5433 June 30, 2026 05:57 Destroyed
@github-actions github-actions Bot added the size: XS < 10 changed lines (excluding docs) label Jun 30, 2026
@coderabbitai

coderabbitai Bot commented Jun 30, 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: 9698350f-c965-4a59-8b4b-2074feb8783c

📥 Commits

Reviewing files that changed from the base of the PR and between e54f3d4 and c4cd41f.

📒 Files selected for processing (1)
  • tests/reborn_group_extensions/main.rs

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Added new end-to-end scenario covering extension lifecycle across multiple threads for the install → activate → active flow.
    • Verifies installation and activation in separate threads, then confirms—via a third thread’s shared store lookup—that the extension’s observable installation_phase reaches active.
    • Includes capability-surface assertions after activation and guard checks to prevent false positives (e.g., still showing installed).

Walkthrough

Adds a new cross-thread E2E scenario that installs web-access in one thread, activates it in another through a shared harness, and verifies a later thread observes installation_phase:"active" and the published capability surface.

Changes

Cross-thread activation E2E scenario

Layer / File(s) Summary
Scenario wiring and runner
tests/reborn_group_extensions/main.rs
Adds the new scenario module and records Scenario 3 after the existing E2E cases.
Cross-thread install activate assert
tests/reborn_group_extensions/scenario_activate_then_active_cross_thread.rs
Implements the three-thread flow that installs web-access, activates it in a second conversation, and checks a third conversation sees installation_phase:"active" plus web-access.search, with guards against stale or empty results.

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

Possibly related PRs

  • nearai/ironclaw#5402: Shares the same reborn_group_extensions E2E harness and extension lifecycle wiring.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed, but it omits most required template sections like Change Type, Linked Issue, Security, and Rollback. Rework it to match the template: add Summary bullets, Change Type, Linked Issue, Validation, Security Impact, trust-boundary, DB Impact, Blast Radius, Rollback, Review Follow-Through, and Review track.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title uses Conventional Commits and accurately summarizes the new extension-activate cross-thread scenario.
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 risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels Jun 30, 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 a new integration test scenario, scenario_activate_then_active_cross_thread, to verify cross-thread extension activation persistence. The test ensures that when an extension (specifically web-access) is installed in one thread and activated in another, a third thread correctly observes the extension as active with its capabilities published. There are no review comments, and 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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94db3bbcd7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// is the observable proof that activation published the extension's tool
// surface (mere install does NOT publish capabilities).
activator
.assert_tool_result_contains(r#""web-access.search""#)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Verify the post-activation tool surface

This assertion only checks the extension_activate result payload for web-access.search; that field is derived from the package's visible_capability_ids, so it can still be present even if activation updates the lifecycle state but fails to publish the tool into the model-visible surface for later turns. In that scenario Thread C would still see installation_phase:"active", so the scenario would pass while the advertised capability is not actually available. Please assert the post-activation surface itself, e.g. by having a later turn verify/invoke web-access.search or otherwise inspect the advertised provider tools after activation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not valid for this code path. In commit_activation (extension_lifecycle.rs:552-579), active_extensions.publish(&active_package) runs before the success payload is built; if publish fails it rolls back (disable + restore previous activation state) and returns Err. So activated:true and visible_capability_ids are only ever emitted after publish succeeds — the failure mode described here (lifecycle state advanced but tool not published) short-circuits to an error and never produces this payload. The web-access.search assertion therefore already gates on publish success.

Asserting later-turn invocability of the published tool would test the publish→model-visible-surface wiring end-to-end, which is a distinct invariant from the cross-thread activation persistence this scenario covers (and is out of scope for this coverage PR). Keeping the assertion as-is.

@railway-app

railway-app Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated (UTC)
ironclaw ✅ Success (View Logs) Web Jul 1, 2026 at 5:22 am

henrypark133 and others added 2 commits June 30, 2026 17:12
Close the `extension_activate` integration-tier coverage gap in
`reborn_group_extensions`: install/search/remove already had cross-thread
coverage, activation did not.

Scenario `activate_then_active_cross_thread` installs the credential-free
"web-access" bundled extension in thread A, activates it in thread B (a
different conversation over the shared HostRuntimeCapabilityHarness store),
and searches in thread C asserting the extension now renders
`installation_phase:"active"`. It also asserts the activate payload carries
`activated:true` and publishes the `web-access.search` capability surface,
with a discriminating guard (absence of `installation_phase:"installed"`)
and a non-vacuity guard. "web-access" is used because it is the only bundled
extension that activates without raising a credential auth gate, and it is
untouched by the existing github/notion scenarios.

Mutation-verified: forcing `commit_activation` to leave the installation in
the `Installed` state turns the scenario RED with
`no recorded capability result containing "installation_phase":"active"`,
while the sibling install/remove scenarios stay green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
No behavior change: rustfmt reordered the mod declarations and wrapped a
long builder chain in scenario_activate_then_active_cross_thread.rs.
This is a style-only commit on a test-only PR, so no new regression test
is added — the touched test scenario itself is the coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 1, 2026 00:28
@henrypark133
henrypark133 force-pushed the reborn-cov-T0-EXTACT branch from 94db3bb to 7e96b50 Compare July 1, 2026 00:28
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5433 July 1, 2026 00:28 Destroyed

Copilot AI 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.

Pull request overview

Adds missing integration-tier coverage for cross-thread builtin.extension_activate persistence in the Reborn extension lifecycle group, ensuring activation is durably visible across distinct conversations sharing the same HostRuntimeCapabilityHarness.

Changes:

  • Added Scenario 3 to install web-access in one conversation, activate it in a second, and assert installation_phase:"active" via search in a third.
  • Added assertions that activation returns "activated":true and publishes at least one expected capability ID (web-access.search).
  • Registered the new scenario in the reborn_group_extensions orchestrator test.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tests/reborn_group_extensions/scenario_activate_then_active_cross_thread.rs New cross-thread install→activate→search scenario covering extension_activate at the integration tier.
tests/reborn_group_extensions/main.rs Wires Scenario 3 into the group runner and documents the intended execution order.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/reborn_group_extensions/main.rs Outdated

@henrypark133 henrypark133 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Code Review (multi-agent)

Intent: Add integration-tier Reborn extension_activate coverage for cross-thread install, activation, capability publication, and active persistence.

Stats: 0 net-new findings (2 raw reviewer findings, both already covered by unresolved live review threads) across 0 new files. Reviewers run: security, bugs, performance, tests, conventions, local-patterns, maintainability, approach. Reviewers failed: none. Body-only: 0. Inline comments: 0.

Duplicate-Suppressed Findings

  1. Medium Cross-thread activation does not prove the published tool is callable (tests/reborn_group_extensions/scenario_activate_then_active_cross_thread.rs:85-90, confidence 75) — already covered by unresolved thread PRRT_kwDORHZ7Z86NLNck at line 90.
  2. Low Module-order comment contradicts the declarations (tests/reborn_group_extensions/main.rs:20-24, confidence 100) — already covered by unresolved thread PRRT_kwDORHZ7Z86NcAx5 at line 24.

No additional blocker or merge-risk finding survived the forced multi-agent pass beyond those existing unresolved threads.

Copilot PR review flagged the module-order comment in
tests/reborn_group_extensions/main.rs claiming "install → remove →
activate" while the mod declarations were alphabetical (activate first).
Reorder the three scenario mod decls to match the stated execution
order. Mod declaration order is compile-irrelevant; no behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5433 July 1, 2026 01:44 Destroyed
…XTACT)

Prior commit reordered the scenario `mod` decls to match the comment,
but rustfmt enforces alphabetical `mod` ordering (reorder_modules), so
`cargo fmt --all --check` failed in CI. Revert to alphabetical order and
fix the comment instead: it now states decls are alphabetical (rustfmt)
and that execution order (install → remove → activate) is defined by the
report.record call sequence in extensions_group_e2e, not decl order.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 1, 2026 05:16
@railway-app
railway-app Bot temporarily deployed to ironclaw-ci-preview / ironclaw-pr-5433 July 1, 2026 05:16 Destroyed

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@henrypark133 henrypark133 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Code Review (multi-agent)

Intent: Add integration coverage for extension_activate cross-thread lifecycle persistence and capability surface publication.

Stats: 0 findings (from 0 raw, 0 after dedup) across 0 files. Reviewers run: security, bugs, performance, tests, conventions, local-patterns, maintainability, approach. Reviewers failed: none. Body-only: 0.

All eight reviewer lenses returned no actionable findings on the refreshed head c4cd41fbfa480bfff01e5487a9494e4fde35d6fa.

Note: I re-ran the review after the PR head moved from e54f3d48c02355ee8a7e4c7925a3e38bf44bb68f to c4cd41fbfa480bfff01e5487a9494e4fde35d6fa, so this result is attached to the current head. GitHub rejected APPROVE on this self-authored PR, so this is posted as COMMENT instead.

This branch was successfully deployed

No deployments
ironclaw-ci-preview / ironclaw-pr-5433 — c4cd41fb Deployed Jul 1, 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: low Changes to docs, tests, or low-risk modules size: XS < 10 changed lines (excluding docs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants