Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

This PR refactors the Tavern C2 internal API handlers to adhere to DRY principles using composition.

Changes:

  • Created tavern/internal/c2/validation for request validation.
  • Created tavern/internal/c2/services/registration for host/beacon lifecycle.
  • Created tavern/internal/c2/services/context for entity context loading.
  • Created tavern/internal/c2/services/transaction for safe transaction execution.
  • Updated ClaimTasks, ReportProcessList, and ReverseShell to utilize these components.

PR created automatically by Jules for task 14867414180317172930 started by @KCarretto

Extracted duplicate behavior into composable services:
- `validation.BeaconValidator`: Centralized beacon request validation.
- `registration.Service`: Encapsulated Host and Beacon upsertion logic.
- `transaction.Run`: Helper for executing transactions with safe rollback/recovery.
- `context.Service`: Helper for loading task related entities.

Refactored `ClaimTasks`, `ReportProcessList`, and `ReverseShell` to use these new services.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@github-actions
Copy link

Summary

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
1577    ±0 1577    ±0 0    ±0 0    ±0 0    ±0 0    ±0 1ms    ±0

Previous Results

Build 🏗️ Result 🧪 Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Other ❓ Flaky 🍂 Duration ⏱️
#143 1577 1577 0 0 0 0 not captured

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
1577 0 0 35.5s

Slowest Tests

Test 📝 Results 📊 Duration (avg) ⏱️ Duration (p95) ⏱️
eldritch: random::string_impl::tests::test_string_uniform 2 34.4s 35.5s
eldritch: random::string_impl::tests::test_string_uniform 2 34.4s 35.5s
eldritch: random::string_impl::tests::test_string_length 2 5.3s 5.5s
eldritch: random::string_impl::tests::test_string_length 2 5.3s 5.5s
eldritch-stdlib-tests: tests::test_all_tomes 2 5.1s 5.2s
eldritch-stdlib-tests: tests::test_all_tomes 2 5.1s 5.2s
eldritch: time::sleep_impl::tests::test_sleep 2 5.1s 5.1s
eldritch: time::sleep_impl::tests::test_sleep 2 5.1s 5.1s
eldritch: pivot::arp_scan_impl::tests::test_lock_failure 2 3.1s 3.2s
eldritch: pivot::arp_scan_impl::tests::test_lock_failure 2 3.1s 3.2s

🎉 No failed tests in this run. | 🍂 No flaky tests in this run.

Github Test Reporter by CTRF 💚

@KCarretto KCarretto closed this Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants