Skip to content

Cycle 011: complete autonomy and runtime repair - #81

Open
drzo wants to merge 10 commits into
mainfrom
manus/cycle-011-autonomy-repair-20260813
Open

drzo wants to merge 10 commits into
mainfrom
manus/cycle-011-autonomy-repair-20260813

Conversation

@drzo

@drzo drzo commented Aug 13, 2026 •

Copy link
Copy Markdown

Summary

This Cycle 011 repair completes a broad set of previously simulated, incomplete, or unregistered ElizaOS C++ paths while preserving canonical parity across the o9nn and hurdcog-lineage implementations.

The change enforces nonempty theme-aligned goal evidence, active-goal plan precedence, repository-root-aware autonomy probes, and center-specific HomeworkLoop telemetry. It adds real plugin automation, transactional persistence for ElizasWorld, TrustScoreboard, Workgroups, and TheOrg, stateful Discord and LiveVideoChat local transports, native-memory locking fixes, Vercel domain REST behavior, validated Spartan RPC boundaries, a lifecycle-safe GitHub.io watcher, and a complete Next.js/WebSocket starter that passes its own TypeScript and production build.

Test Surface

Nineteen compatible hand-written suites that were previously dormant are now compiled and registered. Their stale API assumptions were repaired without fabricating missing subsystems, and the canonical KSM aggregate now builds all valuable activated suites.

Validation gate Result
Complete native build graph Passed
Complete CTest graph 130/130
Canonical/KSM lane 91/91
ASan + UBSan critical lane 17/17, no diagnostics
Modified-production Cppcheck Zero error/warning/portability findings
Repeated autonomy convergence lane Passed
Generated Next.js tsc --noEmit Passed
Generated Next.js production build Passed
Canonical cross-fork tree parity Zero mismatches

Boundaries

Remote Discord/WebRTC/Solana/GitHub/Vercel operations still require their respective authenticated or native adapters. The local/reference implementations now validate configuration, expose truthful failure when an adapter is absent, and no longer report synthetic remote success.

Cross-Fork Note

The originally supplied hurdcog/elizaos.cpp endpoint is unavailable. The authenticated user-owned successor drzo/elizaos.cpp was verified as the accessible hurdcog lineage. Its mirror-only workflow history was preserved while coherent o9nn history and this validated repair commit were synchronized.


Note

Cursor Bugbot is generating a summary for commit 83f4a25. Configure here.

Require theme-aligned nonempty goal evidence and live curriculum telemetry.

Replace simulated automation, persistence, media, starter, and external-integration paths with real stateful behavior and truthful boundaries.

Activate and harden canonical coverage: 130/130 full tests, 91/91 KSM tests, 17/17 sanitizer tests, native libsndfile I/O, and a production-building generated Next.js project.
const auto channel = client_->getChannel(channelId);
if (!channel.name.empty()) summary.channelName = channel.name;
}
dataManager_.storeSummary(summary);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Async summaries outlive summarizer

High Severity

generateChannelSummary and generateGuildSummary now launch std::async work that captures this, but the destructor only stops monitoring and disconnects the client. Destroying a DiscordSummarizer while a returned future is still running can use freed members (client_, dataManager_, summarizer_).

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 83f4a25. Configure here.

std::scoped_lock lock(scoresMutex_, eventsMutex_);
scoreSnapshot = scores_;
eventSnapshot = eventHistory_;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Trust save deadlocks with record

High Severity

New saveTrustData takes scoresMutex_ and eventsMutex_ together with std::scoped_lock, while recordEvent holds scoresMutex_ and then locks eventsMutex_ again. Concurrent save and event recording can form an ABBA deadlock and hang the scoreboard.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 83f4a25. Configure here.

{"saved_at_ms", trustTimeToMilliseconds(std::chrono::system_clock::now())},
{"last_decay_ms", trustTimeToMilliseconds(lastDecayTime_)},
{"config", trustConfigToJson(config_)},
{"scores", std::move(scores)}, {"event_history", std::move(histories)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unsynced trust snapshot fields

Medium Severity

After releasing the score/event locks, saveTrustData reads config_ and lastDecayTime_ with no synchronization, while updateConfig and decay paths mutate them. Concurrent save can persist a torn or mismatched config relative to the score snapshot.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 83f4a25. Configure here.

addMemory(createMemory("Processed community message: " + *message,
MemoryType::MESSAGE));
trackUserActivity("system", "message_processed");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Community loop misattributes activity

Medium Severity

The new CommunityManagerAgent::processLoop calls trackUserActivity with a fixed "system" user for every drained message. Community metrics then treat one synthetic actor as the member base instead of real senders.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 83f4a25. Configure here.

for (const auto& channelId : dataManager->getCachedChannelIds()) {
summaries.push_back(summarizeChannel(channelId, startTime, endTime));
}
return summaries;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Guild filter ignored in summarize

Medium Severity

summarizeAllChannels accepts guildId but explicitly discards it and summarizes every cached channel. Callers requesting a single guild receive cross-guild summaries.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 83f4a25. Configure here.

std::lock_guard<std::mutex> lock(communityEventMutex_);
communityEvents_[event.id] = std::move(event);
++nextEventId_;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Event schedule overwrites by name

Medium Severity

scheduleEvent stores events under eventName as the id while still incrementing unused nextEventId_. Scheduling another event with the same name replaces the prior record and drops its participants and channel state.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 83f4a25. Configure here.

Dan (KSM Repair) added 3 commits August 13, 2026 05:58
Prefer system packages when available, but compile checksum-pinned upstream Gumbo and SQLite fallbacks when PkgConfig or development packages are absent.

Remove the Windows-only PkgConfig failure, reuse the canonical SQLite target in Village, and expose force-bundled switches for deterministic validation.

Validated both forced fallbacks, AgentBrowser and persistence E2E targets, Village linkage, and the complete 130-test graph in both forks.
Invoke the existing tracked case-collision validator instead of a nonexistent scripts path, and install Python in the minimal Ubuntu packaging containers before running it.

Validated the collision check from both repository roots and preserved identical packaging, APT, and Chocolatey workflow behavior across forks.
Provide a checksum-pinned static curl fallback with Schannel for Windows hosts lacking development files, while retaining canonical system targets and deterministic forced-fallback validation.

Reuse CURL::libcurl across AgentBrowser, EasyCompletion, the API client, Village, and tests. Make the case-collision validator safe in root-owned container workspaces without changing global Git configuration.

Validated all bundled curl/SQLite/Gumbo fallbacks, HTTP and persistence E2E targets, Village linkage, and all 130 tests in both repositories.
Comment thread CMakeLists.txt
unset(BUILD_TESTING CACHE)
endif()
unset(_ELIZAOS_BUILD_TESTING_WAS_DEFINED)
unset(_ELIZAOS_BUILD_TESTING_SAVED)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shared libs cache not restored

Medium Severity

The bundled curl path forces BUILD_SHARED_LIBS off in the CMake cache but never restores it, unlike BUILD_TESTING. On Windows CI this always runs, so the sticky cache value can change later targets and reconfigures that rely on the original shared-library setting.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit d3738d3. Configure here.

Dan (KSM Repair) added 4 commits August 13, 2026 06:57
Express the updatedAt invariant as a boolean comparison instead of asking GoogleTest 1.12 on GCC 11 to print std::chrono::time_point values.

Reproduced with GCC/G++ 11.5 in Release mode and validated the focused autonomy evolution suite in both forks.
Construct LocalHttpServer routes with an explicit unordered_map at every fixture site, avoiding GCC 11 ambiguity between the route constructor and generated special members.

Validated real_agentbrowser_test with GCC/G++ 11.5 Release and in both fork build trees.
Avoid capturing a structured-binding name in the channel preservation predicate, which Clang 14 rejects under the C++17 build. Use an explicit map entry and direct std::find instead.

Validated with Clang 14.0.6 Release and the real stage-six automation suite in both forks.
Replace non-standard M_PI use with a shared C++17 constant so Antikythera and its tests compile under MSVC.

Keep GroupManager timestamps in the village tick domain, decay cohesion incrementally from monotonic per-group cursors, bound formation and event effects, reset cursors on interactions, and clean lifecycle state.

Expose received-knowledge totals and expand Village E2E coverage for exact decay, stale ticks, event resets, and KSM aggregate accounting.

Validated in both forks with GCC 11, Clang 14, the native Debug builds, elizad, and the 59-case Village E2E suite.
group.cohesion = std::clamp(
group.cohesion - config_.cohesionDecayRate * (elapsedTicks / 60.0),
0.0,
1.0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale cohesion path skips dissolution

Medium Severity

updateCohesion returns early when currentTick is at or before the decay baseline and never checks dissolutionThreshold. recordGroupEvent can already push cohesion below that threshold via negative emotionalValence while advancing lastCohesionUpdateTick_, so a same-timestamp tick (or any tick still behind a future event time) leaves an under-threshold group alive instead of dissolving it.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 78c3079. Configure here.

Dan (KSM Repair) added 2 commits August 13, 2026 10:07
Discover the ElizaOS source root from an explicit override, workspace ancestors, process directory, or compiled source location instead of a fixed four-level shell walk. This restores aligned evidence and intent-continuity convergence from external GCC and Clang build trees.

Also turn a dormant endocrine expectation into a bound, assert focus lifecycle completion, and remove two unused test helpers so the expanded regression graph remains warning-clean.

Validated in both forks with native builds plus GCC 11 and Clang 14 across AutonomousStarter, intent continuity, endocrine, self-modification, and autonomy pipeline suites.
Keep full coverage data in artifacts while reducing the PR summary to aggregate metrics and changed files. Bound the comment body below GitHub’s 65,536-character limit, update one stable bot comment, declare explicit pull-request write permission, and keep optional commenting non-fatal for restricted fork tokens.

This repairs the reproduced 422 IssueComment rejection while preserving successful coverage collection and analysis. YAML, cross-fork parity, and a 20,000-line report fixture were validated locally.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 9 total unresolved issues (including 8 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1922bed. Configure here.


permissions:
contents: read
pull-requests: write

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Wrong permission blocks PR comments

Medium Severity

The new workflow permissions grant pull-requests: write, but the coverage comment step calls github.rest.issues.listComments, updateComment, and createComment, which need issues: write. Declaring an explicit permissions block removes the default issue write scope, so upserts fail with a 403. continue-on-error: true then hides that failure, so PR coverage comments never appear.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1922bed. Configure here.

@github-actions

Copy link
Copy Markdown

Coverage Diff Report

Pull Request Coverage

Current PR Coverage

Total Line Coverage: 36.7%
Total Function Coverage: 31.8%

The complete per-file report is available in the coverage artifacts.

Files Changed in PR

cpp/external/characterfile/src/characterfile.cpp
cpp/external/discord_summarizer/src/discord_summarizer.cpp
cpp/external/discrub_ext/src/discrub_ext.cpp
cpp/external/discrub_ext/src/discrub_ext_complete.cpp
cpp/external/easycompletion/src/easycompletion.cpp
cpp/external/elizaos_github_io/src/elizaos_github_io.cpp
cpp/external/elizas_world/src/elizas_world.cpp
cpp/external/livevideochat/src/livevideochat.cpp
cpp/external/spartan/src/spartan.cpp
cpp/external/the_org/src/the_org_impl.cpp
cpp/external/the_org/src/the_org_impl2.cpp
cpp/external/trust_scoreboard/src/trust_scoreboard.cpp
cpp/external/vercel_api/src/vercel_api.cpp
cpp/external/workgroups/src/workgroups.cpp
cpp/packages/core/agentmemory/src/agentmemory.cpp
cpp/packages/integration/autonomous_starter/src/autonomous_starter.cpp
cpp/packages/integration/cognitive_curriculum/src/homework_loop.cpp
cpp/packages/plugins/plugins_automation/src/plugins_automation.cpp
cpp/packages/starters/eliza_nextjs_starter/src/eliza_nextjs_starter.cpp
cpp/tests/autonomous_starter_test.cpp
cpp/tests/discord_summarizer_test.cpp
cpp/tests/eliza_nextjs_starter_test.cpp
cpp/tests/elizaos_github_io_test.cpp
cpp/tests/elizas_world_test.cpp
cpp/tests/plugins_automation_test.cpp
cpp/tests/spartan_test.cpp
cpp/tests/src/test_agentbrowser.cpp
cpp/tests/src/test_agentshell.cpp
cpp/tests/src/test_autonomy_evolution.cpp
cpp/tests/src/test_autonomy_pipeline_integration_e2e.cpp
cpp/tests/src/test_brandkit.cpp
cpp/tests/src/test_characterfile.cpp
cpp/tests/src/test_easycompletion.cpp
cpp/tests/src/test_eliza.cpp
cpp/tests/src/test_endocrine.cpp
cpp/tests/src/test_hat.cpp
cpp/tests/src/test_integration.cpp
cpp/tests/src/test_intent_continuity.cpp
cpp/tests/src/test_livevideochat.cpp
cpp/tests/src/test_mcp_gateway.cpp
cpp/tests/src/test_self_modification_adapter.cpp
cpp/tests/src/test_stage6_automation.cpp
cpp/tests/src/test_the_org.cpp
cpp/tests/src/test_trust_scoreboard.cpp
cpp/tests/src/test_village_e2e.cpp
cpp/tests/test_awesome_eliza.cpp
cpp/tests/vercel_api_test.cpp
cpp/tests/workgroups_test.cpp
include/elizaos/core.hpp
include/elizaos/discord_summarizer.hpp

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.

1 participant